# Using the Harmonic Addition Theorem to simplify $\cos(x)+i\sin(x)$

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?

• $\arctan{i}$ is ‘$\infty i$’ (see: wolframalpha.com/input/?i=arctan%20i) so you essentially have a $0\cdot\infty$ scenario, so will need to proceed carefully using limits. I would suggest trying to get a more explicit form for $\arctan{x}$ for general $x$ by using the exponential definition of $\tan$ – aidangallagher4 Sep 5 '18 at 23:13

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$.