# TrigonometryFactoring exponents from trig functions

#### daigo

##### Member
I tend to forget some of the trigonometric functions and someone showed me how to derive the double angle identities from what I think is Euler's formula:

$$e^{ix} = \cos x + i\sin x$$
=
$$e^{i2x} = \cos 2x + i\sin 2x$$
=
$$(e^{ix})^{2} = (\cos x + i\sin x)^{2}$$

I have a question about this step...I understand how the '2' from the e^(i2x) was pulled out, but is it okay to pull the '2' out from the '2x' of the trigonometric functions and to square the right hand expression? How does that work?

#### soroban

##### Well-known member
Hello, daigo!

$$\text{Euler's formula: }\:e^{ix} \:=\:\cos x + i\sin x$$

$$\text{Square both sides:}$$
. . $$(e^{ix})^2 \:=\: (\cos x + i\sin x)^2 \:=\: (\cos^2x - \sin^2x) + i(2\sin x\cos x)$$ .

$$\text{We know that:}$$
. . $$(e^{ix})^2 \:=\:e^{2ix} \:=\:e^{i(2x)} \:=\:\cos(2x) + i\sin(2x)$$ .

Equate real components and imaginary components of  and .

. . . $$\begin{Bmatrix}\cos2x &=& \cos^2x - \sin^2x \\ \sin2x &=& 2\sin x\cos x \end{Bmatrix}$$