<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] The identity is equivalent to
$$
\cos3x=\cos x(1-4\sin^2x)
$$
(except for the values where the denominators vanish). The right-hand side can be rewritten as
$$
\cos x(\cos^2x+\sin^2x-4\sin^2x)=\cos^3x-3\cos x\sin^2x
$$
which is known to be the same as $\cos3x$: by De Moivre
\begin{align}
\cos 3x+i\sin3x
&=(\cos x+i\sin x)^3 \\
&=\cos^3x+3i\cos^2x\sin x+3i^2\cos x\sin^2x+i^3\sin^3x\\
&=(\cos^3x-3\cos x\sin^2x)+i(3\cos^2x\sin x-\sin^3x)
\end{align}
Of course you can also use
\begin{align}
\cos3x
&=\cos(2x+x)\\
&=\cos2x\cos x-\sin2x\sin x\\
&=(\cos^2x-\sin^2x)\cos x-2\cos x\sin^2x\\
&=\cos^3x-3\cos x\sin^2x
\end{align}
</s>