= Solution
Here $P=y^2$ and $Q=\cos^2x+y\sin2x$. Their <derivatives> give
$$
P_y-Q_x=2y+\sin2x-2y\cos2x=2\tan x\,Q.
$$
Thus on intervals with $\cos x\ne0$, choose the <integrating factor> $\mu=e^{\int2\tan x\,dx}=\sec^2x$. The multiplied form is
$$
y^2\sec^2x\,dx+(1+2y\tan x)\,dy
=d(y+y^2\tan x).
$$
Consequently
$$
\boxed{y+y^2\tan x=C},\qquad\cos x\ne0.
$$
This implicit family includes $y=0$ and the branch $y=-\cot x$ when $C=0$. Where the coefficient of $y'$ is nonzero, its differentiated form directly recovers the original equation. A useful equivalent relation is $y\cos x+y^2\sin x=C\cos x$. At $\cos x=0$, the original equation requires $y=0$; continuation there must be checked in that original equation rather than justified by the singular <integrating factor>. In particular the zero solution extends everywhere, and $y=-\cot x$ extends smoothly across the <cosine> zeros where it is defined.
Back to article page