Demoivre’s Theorm

Recently I came across a math problem on a Facebook group I silently follow. There were a couple of solutions posted by different people. So I thought, may be I should try solving it my way. So this post. The problem statment was as follows.

Prove that


$$ \left[\frac{1 + \sin\theta + i \cos\theta}{1 + \sin\theta - i \cos\theta}\right]^n = \cos\left[\frac{n\pi}{2} - n\theta\right] + i\sin\left[\frac{n\pi}{2} - n\theta\right]\tag1 $$

Demoivre’s law says that
$$ \left(\cos\theta + i\sin\theta\right)^n = \cos{n\theta} + i\sin{n\theta} \tag2 $$

Therefor, the RHS of equation (1) becomes,


$$ \begin{align} \mathcal RHS & = \cos{n\left[\frac\pi2-\theta\right]} + i\sin{n\left[\frac\pi2 -\theta\right]}\tag3 \\ & = \cos{n\left[P\right]} + i\sin{n\left[P\right]} \\ & = \left(\cos{P} + i\sin{P}\right)^n \tag4 \end{align} $$
Now, lets simplify the LHS,


$$ \begin{align} LHS & = \left[\frac{1 + \sin\theta + i \cos\theta}{1 + \sin\theta - i \cos\theta}\right]^n \\ & = \left[\frac{1 + i\left(-i\sin\theta + \cos\theta\right)}{1 - i\left(i\sin\theta+\cos\theta\right)}\right]^n \\ & = \left[\frac{1 + i\left(\cos\theta -i\sin\theta \right)}{1 - i\left(\cos\theta+i\sin\theta\right)}\right]^n \\ & = \left[\frac{1+ie^{-i\theta}}{1-ie^{i\theta}}\right]^n \tag5 \end{align} $$

Now, compare LHS and RHS and take \(n^{th}\) root on both sides


$$ \left[\frac{1+ie^{-i\theta}}{1-ie^{i\theta}}\right] = \left(\cos{P} + i\sin{P}\right) \\ \left[\frac{1+ie^{-i\theta}}{1-ie^{i\theta}}\right] = \left[\cos{\left(\frac{\pi}{2}-\theta\right)} + i\sin{\left(\frac{\pi}{2}-\theta\right)}\right] $$

Therefore,
$$ \left[\frac{1+ie^{-i\theta}}{1-ie^{i\theta}}\right] = e^{i{\left(\frac{\pi}{2}-\theta\right)}} \tag6 $$

Now lets assume, \(K = ie^{i}\) and take natural log on both sides.


$$ \begin{align} ln(K) & = ln\left(ie^{i\theta}\right) \\ & = ln(i) + ln(e^{i\theta}) \\ & = ln(i) + i\theta.ln(e) \\ & = i\frac{\pi}{2} + i\theta \tag7 \\ & = i\left(\frac{\pi}{2}+\theta\right)\\ e^{ln(K)} & = e^{i\left(\frac{\pi}{2}+\theta\right)} \\ K & = e^{i\left(\frac{\pi}{2}+\theta\right)} \tag8 \end{align} $$

Similarly,


$$ \begin{align} ln(M) & = ln\left(ie^{-i\theta}\right) \\ M & = e^{i\left(\frac{\pi}{2}-\theta\right)}\tag9\end{align} $$

Substitute these values back to equation (6)


$$ \frac{1+ e^{i\left(\frac{\pi}{2}-\theta\right)}}{1- e^{i\left(\frac{\pi}{2}+\theta\right)}} = e^{i{\left(\frac{\pi}{2}-\theta\right)}} $$

Multiply both sides by the denominator of the LHS


$$ \begin{align} 1+e^{i\left(\frac{\pi}{2}-\theta\right)} & = e^{i{\left(\frac{\pi}{2}-\theta\right)}} * \left(1- e^{i\left(\frac{\pi}{2}+\theta\right)}\right) \\ & = e^{i{\left(\frac{\pi}{2}-\theta\right)}} - e^{i{\left(\frac{\pi}{2}-\theta\right)}} * e^{i\left(\frac{\pi}{2}+\theta\right)} \\ & = e^{i{\left(\frac{\pi}{2}-\theta\right)}} - e^{i\left(\frac{\pi}{2} - \theta + \frac{\pi}{2} +\theta\right)} \\ & = e^{i{\left(\frac{\pi}{2}-\theta\right)}} - e^{i\pi} \\ & = e^{i{\left(\frac{\pi}{2}-\theta\right)}} + 1 \\ & = LHS \end{align} $$

Thus proved. On equation (7), we used the equality, \(ln(i) = i\) Following is the reason.


$$ e^{i\theta} = \cos\theta + i\sin\theta \\ e^{i\frac{\pi}{2}} = \cos{\frac{\pi}{2}} + i\sin{\frac{\pi}{2}} \\ e^{i\frac{\pi}{2}} = 0 + i \\ ln(e^{i\frac{\pi}{2}}) = ln(i) \\ {i\frac{\pi}{2}} ln(e) = ln(i) \\ {i\frac{\pi}{2}} = ln(i) $$

This was used in equation (7)