I have a bit of difficulty with this. I am trying to express $\sin x + \cos x$ with complex exponential.
I started by using Euler's equations. Then, I used the trigonometric substitution $\sin x = \cos(x+\pi/2)$. The problem is that I always end up with $i - 1$ and $i + 1$ (by using different exponent operations), and the fact $e^{i \pi/2} = 1$ and such.
I'm lost. It would be supposed to give me $\sqrt{2}\cos(X)$, where $X$ is undetermined. I just don't get it.
Could anyone help?
Thanks
$\endgroup$ 12 Answers
$\begingroup$Your first guess (Euler's equation) was good. You have $$ e^{ix} = \cos(x) + i \sin(x), \qquad e^{-ix} = \cos(-x) + i \sin(-x) = \cos(x) - i \sin(x) $$ which implies that $$ \cos(x) = \frac {2\cos(x)}2 = \frac{\cos(x) + i \sin(x) + \cos(x) - i \sin(x)}2 = \frac{e^{ix} + e^{-ix}}2 $$ and $$ \sin(x) = \frac {2 i \sin(x)}{2i} = \frac{\cos(x) + i \sin(x) - \cos(x) + i \sin(x)}{2i} = \frac{e^{ix} - e^{-ix}}{2i}. $$ Then you can just add up the expressions and get your exponential formula.
Added : by adding up the previous two equations,
$$ \sin(x) + \cos(x) = \frac {(1-i)e^{ix}}2 + \frac{(1+i)e^{-ix}}2 = \frac 1{\sqrt 2} \left( e^{-i\pi/4}e^{ix} + e^{i\pi/4} e^{-ix} \right) = \frac {e^{i(x-\pi/4)} + e^{-i(x-\pi/4)}}{\sqrt 2} = \sqrt 2 \cos(x-\pi/4). $$
Hope that helps,
$\endgroup$ 3 $\begingroup$$$ \sin(x)+\cos(x)=\sqrt{2}\left(\frac{1}{\sqrt{2}}\sin (x) + \frac{1}{\sqrt{2}}\cos (x)\right)=\\ \sqrt{2}\left(\sin(\pi/4)\sin (x) + \cos(\pi/4)\cos (x)\right)= \sqrt{2} \cos (x-\pi/4) $$
$\endgroup$ 4