Solve the following differential equation: (x+ y) ,dy= 2y ,dx
Question 1203 marksMedium
Solve the following differential equation:
(x+tany)dy=sin2ydx
Solution:
Key idea: When the equation is linear in x (not in y), we treat x as the dependent variable and write it as dydx+Px=Q, where P and Q are functions of y only. Then IF=e∫Pdy and the solution is x⋅IF=∫Q⋅IFdy+c, where c is the arbitrary constant.
Step 1 — Write dydx from the equation.
Here x appears only to the first power, so we divide both sides by sin2ydy.
dydx=sin2yx+tany
We bring the x term to the left.
dydx−sin2y1x=sin2ytany
Step 2 — Simplify Q.
We write tany=cosysiny and sin2y=2sinycosy; the siny cancels.
Q=2cos2y1
Step 3 — Find the integrating factor.
Here P=−cosec2y. We use ∫cosec2ydy=21logtany on 0<y<2π, where tany>0.
∫Pdy=−21logtany
So the IF is (tany)−1/2.
IF=tany1
Step 4 — Multiply by the IF and integrate.
The left side becomes dyd(tanyx), and cos2y1=sec2y.
tanyx=∫2tanysec2ydy
We put tany=t, so sec2ydy=dt, and ∫2tdt=t.
tanyx=tany+c
Step 5 — Write the answer neatly.
Since tany1=coty, the left side is xcoty.
xcoty=tany+c
Therefore, the general solution is xcoty=tany+c (for 0<y<2π).