The correct option is D y=15[2cosx+sinx]+Ce−2x
It is a linear differential equation of the form
dydx+Py=Q(x)
where P=2 and Q=cosx
Then IF=e∫Pdx=e∫2dx=e2x
Hence, the general solution is y(IF)=∫Q(IF)dx
⇒y⋅e2x=∫e2xcosxdx+C
On integrating By parts we get:
⇒y⋅e2x=e2x5[2cosx+sinx]+C
⇒y=15[2cosx+sinx]+Ce−2x