I got the following equation: $\cos{x}\cdot y'=y\sin {x} + \sin^2x$.
Probably a fairly simple equation. I run into problems with the integrating factor.
I get: $y'-y\tan x=\tan x\sin x$
So $g(x)=tan(x) \iff G(x)=-\ln|\cos x|+C$.
So the integrating factor is $e^{-ln|\cos x|} \iff \frac{1}{\cos x}$.
If we multiply in the I.G into the equation we get: $\frac{y'}{\cos x}-\frac{\sin x}{\cos^2x}y=\tan^2x$.
It is here that I run into problems. The next step would be to put: $D(\frac{y}{\cos x})=\tan^2x$
But when I controll derivate I don't get my original expression but $\frac{y'}{\cos x}+\frac{\sin x}{\cos^2x}y$
(I lose the minus sign).
Any pointers to where I went wrong would be appreciated.
$$\cos{x}\cdot y'=y\sin {x} + \sin^2x$$ $$\cos{x}\cdot y'-y\sin {x} = \sin^2x$$ $$\left(y\cos x\right)'=\sin^2x$$ $$y\cos x=\int\sin^2x dx=\frac{x}{2}-\frac{\sin{ 2 x }}{4}+C$$ $$y=\frac{x}{2 \cos{x}}-\frac{\sin{x}}{2}+\frac{C}{\cos x}$$