ODE
Solve the ODE:
−ydy+(x+xy)dy=0
Rearranging the ODE:
dydx=yx+xy=yx+yx
From this form, we can try the following substitution:
z:=yx⟹x(y)=z(y)y⟹dydx=z1dydy+ydydz=z+ydydz
Substituting into our ODE, rearranging, then integrating both sides:
z+ydydz=yzy+zy2=yzy+yz=z+zydydz=zz−21dz=y1dy2z=ln∣y∣+C
Reverting the substitution, we get our solution to the ODE:
2yx=ln∣y∣+C,C∈R
OPTIONAL: We shall now verify our solution.
Rearranging our solution:
x=21y(ln∣y∣+C)⟹x=41y(ln∣y∣+C)24dydx=ydyd((ln∣y∣+C)2)+(ln∣y∣+C)21dydy=2y(ln∣y∣+C)y1+(ln∣y∣+C)2
Thus, LHS of our ODE is:
LHS=21(ln∣y∣+C)+41(ln∣y∣+C)2
For the RHS, we substitute our solution:
RHS=y41y(ln∣y∣+C)2+y41y(ln∣y∣+C)2=41(ln∣y∣+C)2+41(ln∣y∣+C)2=41(ln∣y∣+C)2+21(ln∣y∣+C)=LHS
Thus, our solution has been verified.