What is the general solution of the differential equation #(y+x)dy+(x-y)dx=0#?
1 Answer
# arctan(y/x) + 1/2ln|1+y^2/x^2| = -ln|x| + C #
Explanation:
We have:
# (y+x)dy+(x-y)dx=0 #
If we rearrange this ODE from differential form into standard form we have:
# (y+x)dy = (y-x)dx #
# :. dy/dx = (y-x)/(y+x) #
We can simplify significantly by multiplying by
# dy/dx = ( (y-x)/(y+x) )( (1/x)/(1/x) ) #
# \ \ \ \ \ \ = (y/x-1)/(y/x+1) # ..... [A]
Leading to a suggestive substitution of the form:
# y/x = u iff y = ux #
Differentiating
# dy/dx = (u)(d/dx x) + (d/dx u)(x) #
# \ \ \ \ \ \ = u + x (du)/dx #
Now if we substitute into Eq [A], we have:
# u + x (du)/dx = (u-1)/(u+1) #
# :. x (du)/dx = (u-1)/(u+1) - u#
# \ \ \ \ \ \ \ \ \ \ \ \ \ = (u-1)/(u+1) - (u(u+1))/(u+1)#
# \ \ \ \ \ \ \ \ \ \ \ \ \ = ((u-1) - u(u+1))/(u+1)#
# \ \ \ \ \ \ \ \ \ \ \ \ \ = (u-1 - u^2-u)/(u+1)#
# \ \ \ \ \ \ \ \ \ \ \ \ \ = -(1+u^2)/(u+1)#
This is now a separable ODE, do we can "separate the variables" to give:
# int \ (1+u)/(1+u^2) \ du= int -1/x \ dx #
# :. int \ 1/(1+u^2) + u/(1+u^2) \ du= int -1/x \ dx #
# :. int \ 1/(1+u^2) + 1/2 (2u)/(1+u^2) \ du= int -1/x \ dx #
Which we can now integrate to get:
# arctanu + 1/2ln|1+u^2| = -ln|x| + C #
Then if we restore the earlier substitution, we have:
# arctan(y/x) + 1/2ln|1+(y/x)^2| = -ln|x| + C #
# :. arctan(y/x) + 1/2ln|1+y^2/x^2| = -ln|x| + C #