Calculating $\int_{[0,x]}e^{iz}dz$ and proving $|e^{ix}-1|\leq |x|$ for real $x$.
The integral seems immediate: $\displaystyle\int_{[0,x]}e^{iz}=(1/i)e^{iz}|_0^x=-ie^{iz}|_0^x=(1-e^{iz}).$ Is it right?
I think it should be use to prove $|e^{ix}-1|\leq |x|$, but I can't see how it follows. Actually, this formula seems false to me, because writing $e^{ix}=e^{x}(\cos x +i\sin x)$ makes $$|e^{ix}-1|=|(e^{x}\cos x-1) +i\sin x|=\sqrt{(e^{2x}\cos x-1)^2+i\sin^2 x}=\sqrt{e^{2x}\cos^2 x-2e^{x}cos x + 1 +e^{2x}\sin^2x}=\sqrt{e^{2x}+1-2e^{x}\cos x}.$$
Now if $x=pi$ then if the inequality is correct it should be $\sqrt{e^{2\pi}+2e^{\pi}+1}\leq \pi$ but this is not true.
Hint. Note that $$\int_{[0,x]}e^{iz}dz=[-ie^{iz}]_0^x=-i(e^{ix}-1).$$ On the other hand, $$\left|\int_{[0,x]}e^{iz}dz\right|=\left|\int_{t=0}^xe^{it}dt\right|\leq \left|\int_{t=0}^x|e^{it}|dt\right|=\left|\int_{t=0}^x1dt\right|=|x|.$$