Summation of Complex Number By considering $\sum_{k=0}^{n-1} (1+i\tan{x})^k$ , show that $\sum_{k=0}^{n-1}(\cos{kx}(\sec{x})^{k} = \cot{x}\sin{nx}(\sec{x})^n$. Provided that $x$ is not a multiple of 0.5π
I know that the show part is just the real part of the first sum given, but I have no idea how to compute that. Any suggestions?
 A: We have $$\sum_{k=0}^{n-1} (1+i\tan{x})^k=\sum_{k=0}^{n-1} \left(\frac{\cos x+i\sin x}{\cos x}\right)^k=\sum_{k=0}^{n-1}\frac{\cos kx+i\sin kx}{(\cos x)^k}$$
The real part of this expression is $$\sum_{k=0}^{n-1}\cos kx(\sec x)^k$$ and we have to show that it is equal to $$\cot{x}\sin{nx}(\sec{x})^n=\frac{\sin nx}{\sin x(\cos x)^{n-1}}$$ By induction it is clear that it is true for $n=1$ ( in whose case we have $1=1$). Let it true for $n-1$ and prove so is for $n$. Is it true that
$$\frac{\sin nx}{\sin x(\cos x)^{n-1}}+\frac{\cos nx}{(\cos x)^n}=\frac{\sin (n+1)x}{\sin x(\cos x)^n}\large?$$ Yes because LHS is equivalent to
$$\frac{\sin nx\cos x+\cos nx\sin x}{\sin x(\cos x)^n}=\frac{\sin(nx+x)}{\sin x(\cos x)^n}$$ which is equal to RHS.
A: Hint:
$$1+i \tan x = 1+i \frac{\sin x }{\cos x}$$
Thus
\begin{align}
\left(1+i \tan x \right)^{k} &= \left( 1+i \frac{\sin x }{\cos x} \right)^{k} \\
                             &= \sec^{k}x \left(\cos x + i \sin x\right)^{k} \\
&= e^{ikx} \sec ^{k}x
\end{align}
