Suppose $n_1, n_2,\dots, n_k$ are dinstinct non-zero integers. Prove that $$\int_0^{2\pi}|1+e^{in_1x}+\dots+e^{in_kx}|\,dx\leq 2\pi\sqrt{k+1}.$$
My attempt: Note $1=e^{i0x}$ so let $n_0=0$, this yields $|1+e^{in_1x}+...+e^{in_kx}|=|\sum_{t=0}^ke^{in_tx}|$. Observe that $||n||_2=\sqrt{n_1^2+n_2^2+...+n_k^2}\leq\sqrt{n_1\bar{n_1}+n_2\bar{n_2}+...+n_k\bar{n_k}}$ (Sketchy)
This implies that $|1+e^{in_1x}+...+e^{in_kx}|\leq\sqrt{1+e^{in_1x}e^{-in_1x}+...+e^{in_kx}e^{-in_kx}}=\sqrt{1+e^0+...+e^0}=\sqrt{k+1}$
$\Rightarrow \int_0^{2\pi}|1+e^{in_1x}+...+e^{in_kx}|dx\leq\int_0^{2\pi}\sqrt{k+1}dx=2\pi\sqrt{k+1}$.
However, the use of $n_1, n_2,...,n_k$ being distinct is not used anywhere. They state to use the Cauchy-Schwarz inequality to prove this. So something along the lines of what I did but yielding $\int_0^{2\pi}e^{i(n_i-n_j)k}=0$ so this would leave the sum less than or equal to $\sqrt{k+1}$
Put $n_0:=0$ so that $s(x):=1+e^{in_1x}+\dots+e^{in_kx}=\sum_{j=0}^k e^{in_jx}$. Now the inequality $$\left|\int_0^{2\pi}f(x)\overline{g(x)}\,dx\right|^2\leqslant\int_0^{2\pi}|f(x)|^2\,dx\cdot\int_0^{2\pi}|g(x)|^2\,dx$$ can be applied to $f(x)=|s(x)|$ and $g(x)=1$: $$\left(\int_0^{2\pi}|s(x)|\,dx\right)^2\leqslant 2\pi\int_0^{2\pi}|s(x)|^2\,dx.$$ But $|s(x)|^2=s(x)\overline{s(x)}=\left(\sum_{p=0}^k e^{in_px}\right)\left(\sum_{q=0}^k e^{-in_qx}\right)=\sum_{p,q=0}^k e^{i(n_p-n_q)x}$, hence $$\int_0^{2\pi}|s(x)|^2\,dx=\sum_{p,q=0}^k\int_0^{2\pi}e^{i(n_p-n_q)x}\,dx=2\pi(k+1),$$ since all the terms with $p\neq q$ vanish because of $n_p\neq n_q$.