Solve the differential equation #y'=(y-x)^2#?
2 Answers
where
Explanation:
Let us change variables to
Then
where we have written the constant of integration as
# y = x+(1 + Ae^(2x))/(1 - Ae^(2x))#
Explanation:
We have:
# y' =(y-x)^2 # ..... [A]
Perform the substitution:
# u =y-x #
Then differentiating wrt
# (du)/dx = dy/dx-1 => dy/dx = 1+(du)/dx #
Substituting into the DE:
# 1+(du)/dx = u^2 #
# :. (du)/dx = u^2-1 #
Reducing the DE to a separable form:
# 1/(u^2-1) \ (du)/dx = 1 #
So we can "separate the variables" to get:
# int \ 1/(u^2-1) \ du = int \ dx #
We can perform partial fraction decomposition of the LHS integrand:
# 1/(u^2-1) -= 1/((u+1)(u-1) #
# \ \ \ \ \ \ \ \ \ \ \ \ -= A/(u+1)+B/(u-1) #
And using the "cover up" methods we get:
# A=-1/2, B= 1/2 #
Allowing us to write the equation as:
# 1/2 int \ 1/(u-1)-1/(u+1) \ du = int \ dx #
And integrating, we get:
# 1/2{ln ( u-1) - ln(u+1)} = x + C #
# :. ln ((u-1)/(u+1) ) = 2x + 2C #
# :. (u-1)/(u+1) = e^(2x + 2C) #
# :. u-1 = (u+1)Ae^(2x) #
# :. u-1 = uAe^(2x) + Ae^(2x)#
# :. u - uAe^(2x) = 1 + Ae^(2x)#
# :. u(1 - Ae^(2x)) = 1 + Ae^(2x)#
# :. u = (1 + Ae^(2x))/(1 - Ae^(2x))#
And restoring the substitution:
# y-x = (1 + Ae^(2x))/(1 - Ae^(2x)) => y = x+(1 + Ae^(2x))/(1 - Ae^(2x))#