A confusion in a calculation with complex numbers Consider the followings:
$$
1+e^{ix}+e^{2ix}+e^{3ix}= \dfrac{1-e^{4ix}}{1-e^{ix}}
$$
Then, we take absolute square to the both sides
$$
|1+e^{ix}+e^{2ix}+e^{3ix}|^{2}= \dfrac{1-\cos4x}{1-\cos x}
$$
When we put $x=0$, the left side is $|1+1+1+1|^2=16$, but the right side is ill-defined ($0/0$)
It's really confused to me. What's happened? Thanks in advanced.
Thanks for everyone's quick response.
I think the absolute square of right side is correct.
$|\dfrac{A}{B}|^{2}=\dfrac{A^*A}{B^*B}$
Consider the right side:
$$
\dfrac{1-e^{4ix}}{1-e^{ix}}=\dfrac{(1-e^{4ix})(1-e^{-4ix})}{(1-e^{ix})(1-e^{-ix})}=\dfrac{1+1-(e^{4ix}+e^{-4ix})}{1+1-(e^{ix}+e^{-ix})}= \dfrac{2-2\cos4x}{2-2\cos x}
$$
I found that my problem is due to the carelessness on the limitation of formula $1+x+...+x^{N-1}=\dfrac{1-x^{N}}{1-x}$, which is valid for x$\neq$1
Thanks
 A: There are two problems:


*

*Your first equation is only valid if $e^{ix}\neq1$.

*The absolute value of $1-e^{ix}$ is not $1-\cos(x)$.


The real part of $1-e^{ix}$ is $1-\cos(x)$, but you also need the imaginary part to calculate the norm.
A: Even if there are mistakes, as already said in comments and answers, consider Taylor series for $\cos(y)$ built at $y=0$ $$\cos(y)=1-\frac{y^2}{2!}+\cdots$$ So $$1-\cos(4x)=\frac{(4x)^2}{2!}+\cdots=8x^2+\cdots$$ $$1-\cos(x)=\frac{x^2}{2!}+\cdots=\frac{x^2}{2}+\cdots$$ and the ratio $$\dfrac{1-\cos(4x)}{1-\cos (x)} \approx 16$$
Edit
As an example with a small angle, consider $x=\frac \pi {32}$; $$\cos(\frac \pi {32})=\frac{ \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2}}}}}{2}$$ $$\cos(\frac \pi {8})=\frac{\sqrt{2+\sqrt{2}}}{2}$$ $$\dfrac{1-\cos(\frac \pi {8})}{1-\cos (\frac \pi {32})} \approx 15.8081$$
A: The absolute value of
$$
\frac{1-e^{4ix}}{1-e^{ix}}
$$
can be computed in the following way. Set $y=x/2$, so
$$
\frac{1-e^{4ix}}{1-e^{ix}}=
\frac{e^{8iy}-1}{e^{2iy}-1}=
\frac{e^{4iy}}{e^{iy}}\frac{e^{4iy}-e^{-4iy}}{e^{iy}-e^{-iy}}=
e^{3iy}\frac{2i\sin4y}{2i\sin y}=
\frac{\sin4y}{\sin y}e^{3iy}
$$
Therefore the absolute value is
$$
\left|\frac{\sin4y}{\sin y}\right|=
\left|\frac{\sin2x}{\sin(x/2)}\right|=
\sqrt{8(1+\cos x)\cos^2x}
$$
When $x=0$, the formula is still valid.
You can also use
$$
\left|\frac{1-e^{4ix}}{1-e^{ix}}\right|=
\frac{1-e^{4ix}}{1-e^{ix}}\frac{1-e^{-4ix}}{1-e^{-ix}}=
\frac{1-\cos4x}{1-\cos x}
$$
and then simplify
$$
1-\cos4x=2\sin^22x=8\sin^2x\cos^2x=8(1-\cos x)(1+\cos x)\cos^2x
$$
that gives the same as above.
