<s>[INST] Prove trigonometry identity for $\sec x -\sin x$ I'm trying to prove this equality but I' stuck at the second step.
Please give me some hints or other ways to proceed.
\begin{gather}\frac{\tan^2x + \cos^2x}{\sin x+ \sec x} \equiv \sec x - \sin x \\
\sin x = 0 \\
\cos x = y \\
\frac{\frac{x^2}{y^2}+ \frac{y^4}{y^2}}{\frac{xy}{y} + \frac{1}{y}} \equiv \frac{1}{y} - x = \frac{1-xy}{y} \tag{1} \\
\frac{ \frac{x^2+y^4}{y^2} }{ \frac{xy+1}{y} }\equiv \tag{2} \\
\frac{x^2+y^4}{y(xy+1)} \equiv\tag{3}
\end{gather}
 [/INST] $$\cos^2(x)-1=-\sin^2(x)$$
$$\tan^2(x)=\sec^2(x)-1$$
$$\frac{\tan^2(x)+\cos^2(x)}{\sin(x)+\sec(x)}=\frac{\left(\sec^2(x)-1 \right)+\cos^2(x)}{\sin(x)+\sec(x)}$$
$$=\frac{\sec^2(x)-\sin^2(x)}{\sin(x)+\sec(x)}=\frac{(\sin(x)+\sec(x))(\sin(x)-\sec(x))}{\sin(x)+\sec(x)}$$
I think you can do the rest from here. Though try not to substitute a function for the same variable (e.g. use $t=\cos(x)$ not $x=\cos(x)$)
</s>