Verify that $\displaystyle y=\sin(x)\cos(x)-\cos(x)$ is solution of the initial value problem:

$\displaystyle y'+y\tan(x)=\cos^2(x)$

$\displaystyle y(0)=-1$

$\displaystyle -\frac{\pi}{2}<x<\frac{\pi}{2}$

--------------------------------------------------------------------------------------------------

I don't understand the object of this problem. Obviously the differential equation gives the derivative:

$\displaystyle y'=\cos^2(x)-y\tan(x)$

$\displaystyle =\cos^2(x)-\left(\sin(x)\cos(x)-\cos(x)\right)\tan(x)$

$\displaystyle =\cos^2(x)-\sin^2(x)-\sin(x)$

Then if I differentiation $\displaystyle y=\sin(x)\cos(x)-\cos(x)$ I obtain $\displaystyle \cos^2(x)-\sin^2(x)+\sin(x)$. This doesn't agree with the other equation, although it is close.