<s>[INST] First trigonometric differential equation 
Show that:  
$$\tan(x) \frac {dy}{dx}-y=\sin^2(x)+2\sec(x)$$ where $y=\sin^2(x)-2\cos(x)$ 

I get: 
$\frac {dy}{dx}=2sin(x)cos(x)+2sin(x)$ 
=$tan(x)(2sin(x)cos(x)+2sin(x))-sin^2(x)-2cos(x)$ 
From here I go into many directions but not towards the RHS. Guidance is much appreciated
 [/INST] You have a little sign mistake here:
$$E=\tan(x)(2\sin(x)\cos(x)+2\sin(x))-\sin^2(x)\color{red}{+2\cos(x)}$$
$$E=2\sin^2(x)+2\dfrac {\sin^2(x)}{\cos x}-\sin^2(x)+2\cos(x)$$
$$E=\sin^2(x)+2\dfrac {\sin^2(x)}{\cos x}+2\cos(x)$$
$$E=\sin^2(x)+2\dfrac {(\sin^2(x)+\cos^2(x))}{\cos x}$$
$$E=\sin^2(x)+\dfrac 2{\cos x}=\sin^2(x)+ 2{\sec x}$$

You can also solve the DE:
$$\tan(x) \frac {dy}{dx}-y=\sin^2(x)+2\sec(x)$$
Multiply by $\cos x$:
$$\sin(x) \frac {dy}{dx}-y\cos x=\sin^2(x)\cos x+2$$
Divide by $\sin^2 x$:
$$( \frac {y}{\sin x})'=\cos x+2\csc^2(x)$$
Integrate:
$$ \frac {y}{\sin x}=\sin x+2\int \csc^2(x)dx+C_1$$
$$ y(x)=\sin^2 x-2\sin x\cot(x)+C_1\sin x$$
$$ y(x)=\sin^2 x-2\cos(x)+C_1\sin x$$
Take $C_1=0$
</s>