The Harmonic Addition Theorem states that: $$A\cos(x)+B\sin(x) = \operatorname{sign}(A)\sqrt{A^2+B^2}\cos\left(x-\arctan\left(\frac{B}{A}\right)\right)$$ http://mathworld.wolfram.com/HarmonicAdditionTheorem.html $$$$ But when I try using it to simplify the famous formula:
$$\cos(x)+i\sin(x)$$
I get:
$$A=1,B=i \implies \operatorname{sign}(1)\sqrt{1+(-1)}\cos(x-\arctan(i)) =0 $$
which is clearly not right. What am I doing wrong? Is there some restriction I'm missing?
Let's try and see whether $\arctan i$ is defined. Suppose $\tan z=i$; then $$ \frac{\sin z}{\cos z}=i $$ that's the same as $\sin z=i\cos z$, which becomes $$ \frac{e^{iz}-e^{-iz}}{2i}=i\frac{e^{iz}+e^{-iz}}{2} $$ that is $$ e^{iz}-e^{-iz}=-e^{iz}-e^{-iz} $$ so $e^{iz}=0$, which is impossible.
Perhaps more simply: $\sin z=i\cos z$ implies $\sin^2z=-\cos^2z=-1+\sin^2z$ that is $0=-1$.