For the given differential equation find the general solution.
dydx+2y=sinx
The given differential equation is dy/dx+2y=sinx
Comparing with the form dy/dx +Py=Q
So, P=2 and Q=sinx. ∴IF=e∫Pdx⇒e2∫1dx⇒IF=e2x
Hence, the solutions is given by
y.IF=∫Q×IFdx+C⇒y×e2x=∫sinx.e2xdx=I (say) ...(i)
∴I=sinx∫e2xdx−∫[ddxsinx∫e2xdx]dx [Integration by parts]
⇒I=sinxe2x2−12∫cosxe2xdx⇒I=sinxe2x2−12cosxe2x2+12∫[ddxcosx∫e2xdx]dx⇒I=sinxe2x2−14cosxe2x+14∫(−sinx)e2xdx⇒I=sinxe2x2−14cosxe2x−14I+C⇒5I4=e2x4(2sinx−cosx)+C⇒I=e2x5(2sinx−cosx)+C
Therefore, Eq. (i) becomes
y×e2x=e2x5[2sinx−cosx]+C⇒y=15[2sinx−cosx]+e−2xC