$$y' + (\cos x)y = 4 \cos x$$
This can be done using the differential factor. I would say that the differential factor should be $e^{D\cos x} = e^{-\sin x}$. However I know it should be $e^{\sin x}$ since the answer is $$ y = 4+Ce^{-\sin x}$$
Can someone explain this to me?
If I could get a nice way to solve
$$ \int 4 \cos x e^{sinx} dx $$
It would also be nice, I think there's a trick you can use instead of subsitute $tan \frac{x}{2} = t$