<s>[INST] Trouble proving the trigonometric identity $\frac{1-2\sin(x)}{\sec(x)}=\frac{\cos(3x)}{1+2\sin(x)}$ I have become stuck while solving a trig identity. It is:
$$\frac{1-2\sin(x)}{\sec(x)}=\frac{\cos(3x)}{1+2\sin(x)}$$
I have simplified the left side as far as I can:
\begin{align}
\frac{1-2\sin(x)}{\sec(x)}
&=\frac{1-2\sin(x)}{1/\cos(x)}=(1-2\sin(x))\cos(x)\\
&=\cos(x)-2\sin(x)\cos(x)=\cos(x)-\sin(2x)
\end{align}
However, I'm not sure what to do on the right side. I know I can use a compound angle formula to break $\cos(3x)$ into $\cos(2x)\cos(x)-\sin(2x)\sin(x)$; however, I do not know where to go after that. My main problem is with the denominator of the right side, I can't figure out how to get rid of it, either by multiplying, or by using a trig identity. Any help in solving this identity would be greatly appreciated!
 [/INST] First, in case you don't know how, I'll expand $\cos{3x}$.
$$\require{cancel}\begin{aligned}\cos{3x}&=\cos\left(x+\left(x+x\right)\right)\\&=\cos x\cos\left(x+x\right)-\sin x\sin\left(x+x\right)\\&=\cos{x}\left(\cos^{2}x-\sin^{2}x\right)-\sin{x}\left(2\sin{x}\cos{x}\right)\\&=\cos^3 x-\sin^{2}{x}\cos{x}-2\sin^{2}{x}\cos{x}\\&=\cos^3 x-3\sin^{2}{x}\cos{x}\\&=\cos^2 x\cos{x}-3\sin^{2}{x}\cos{x}\\&=\cos{x}\left(1-\sin^2{x}\right)-3\sin^{2}{x}\cos{x}\\&=\cos{x}-\sin^2{x}\cos{x}-3\sin^{2}{x}\cos{x}\\&=\cos{x}-4\sin^2{x}\cos{x}\end{aligned}$$
Let's rock!
$$\begin{aligned}\frac{1-2\sin{x}}{\sec{x}}&=\frac{1-2\sin{x}}{\frac{1}{\cos x}}\\&=\cos{x}\left(1-2\sin x\right)\\&=\cos x-2\sin{x}\cos{x}\\&=\cos x-2\sin{x}\cos{x}\cdot\frac{1+2\sin x}{1+2\sin x}\\&=\frac{\cos x\cancel{+2\sin{x}\cos{x}}\cancel{-2\sin{x}\cos{x}}-4\sin^{2}{x}\cos{x}}{1+2\sin x}\\&=\frac{\cos x-4\sin^{2}{x}\cos{x}}{1+2\sin x}\\&=\frac{\cos{3x}}{1+2\sin{x}}\end{aligned}$$
</s>