How do I prove that $\cos\left(2x\right)=1-2\sin^2\left(x\right)$? While trying to solve the equation $\sin\left(x\right)=\cos\left(2x\right)$, a user on this forum suggested that I turn the equation into a quadratic form by converting $\cos(2x)$ using the identity $\cos\left(2x\right)=1-2\sin^2\left(x\right)$.
What is the logic behind this identity and how can I derive it?

$$\cos(2x)=\cos(x+x)=\cos(x)\cos(x)-\sin(x)\sin(x)=\cos^2(x)-\sin^2(x)$$
then we know that $cos^2(x)+\sin^2(x)=1$ so:
$$cos(2x)=1-2\sin^2(x)$$
you can find proof of the compound angle formula here:
https://www.math-only-math.com/proof-of-compound-angle-formula-sin-alpha-plus-beta.html
