Solution (source code)

= Solution

Here $m=2$, so $z=1/y$ obeys $z'-2z\tan x=-\tan^2x$. An <integrating factor> is $\cos^2x$, giving
$$
(z\cos^2x)'=-\sin^2x,
\qquad z\cos^2x=C-\frac x2+\frac{\sin2x}{4}.
$$
The nonzero solutions are therefore
$$
\boxed{y(x)=\frac{\cos^2x}{C-x/2+\sin2x/4}.}
$$
The additional solution is $\boxed{y=0}$. Each formula is interpreted on an interval where $\tan x$ is defined and its displayed denominator is nonzero.