Reading a long solution I saw this a step that converts $1 + e^{2i}$ to $e^i \cos(1)$. How is this done?
How do I generalize this?
Reading a long solution I saw this a step that converts $1 + e^{2i}$ to $e^i \cos(1)$. How is this done?
How do I generalize this?
On
Using Euler's formula we get:
$$1 + e^{2i} = 1 + e^{i} \cdot e^{i} = 1 + e^i \cdot i \sin(1) + e^i \cdot \cos(1)$$
With this approach you can see, that the difference between the two expression given above is $1 + e^i \cdot i \sin(1)$.
There's a factor of $2$ missing.
Generally,
$$1 + e^{2i\varphi} = e^{i\varphi}(e^{-i\varphi} + e^{i\varphi}) = e^{i\varphi}\cdot 2\cos \varphi$$
since
$$\cos \varphi = \frac{e^{i\varphi} + e^{-i\varphi}}{2}.$$