Solve the following differential equation: xdy/dx+2y+ x(1+ x)=0
Question 1163 marksMedium
Solve the following differential equation:
sinxdxdy+2y+sinx(1+cosx)=0
Solution:
Key idea: A first-order linear equation can be written as dxdy+Py=Q, where P and Q are functions of x only. Its integrating factor is IF=e∫Pdx. Multiplying the equation by the IF turns the left side into dxd(y⋅IF), so the solution is y⋅IF=∫Q⋅IFdx+c, where c is the arbitrary constant.
Step 1 — Write the equation in standard form.
We move sinx(1+cosx) to the right and divide by sinx (with sinx=0).
dxdy+sinx2y=−(1+cosx)
So P=2cosecx and Q=−(1+cosx).
Step 2 — Find the integrating factor.
We use ∫cosecxdx=logtan2x.
∫2cosecxdx=2logtan2x
Since e2log∣u∣=u2, the modulus disappears.
IF=tan22x
Step 3 — Simplify Q⋅IF.
We use 1+cosx=2cos22x and tan22x=cos2(x/2)sin2(x/2); the cos22x cancels.
Q⋅IF=−2sin22x
Since 2sin22x=1−cosx, this is easy to integrate.
Q⋅IF=−(1−cosx)
Step 4 — Integrate.
We integrate Q⋅IF term by term and add the arbitrary constant.
ytan22x=∫(cosx−1)dx
ytan22x=sinx−x+c
Therefore, the general solution is ytan22x=sinx−x+c.