Maxima of $\sin(nx)/\sin(x)$ I was wondering if there is an analytical solution to find the maxima of the following function in terms of $x$:
$$
f(x) = \frac{\sin(nx)}{\sin(x)}
$$
where $n$ is any positive integer greater than $0$
I tried equating the partial derivative of $f(x)$ with respect to $x$ to $0$, but I can't seem to find any other solution than $x = \pi k$ to the resulting trigonometric equation. I was also not able to find a solution in existing posts.
 A: Hint
$$
\left|1+e^{i2x}+e^{i4x}+\ldots + e^{i2(n-1)x}\right|= \left|\frac{1-e^{i2nx}}{1-e^{2ix}}\right| = \left|\frac{e^{inx}}{e^{ix}}\frac{\sin (nx)}{\sin(x)}\right|= \left|\frac{\sin (nx)}{\sin(x)}\right|
$$
Also
$$\left|1+e^{i2x}+e^{i4x}+\ldots + e^{i2(n-1)x}\right| \leq \left|1\right|+\left|e^{i2x}\right|+\left|e^{i4x}\right|+\ldots + \left|e^{i2(n-1)x}\right|=n$$
with equality when all terms are real and non-negative.
A: Write $f_n(x) = \dfrac{\sin nx}{\sin x}$. It is familiar from calculus that $\lim_{x \to 0} f_n(x) = n$. If we can prove $|f_n(x)| \le n$ for all $x$ that will imply that $f_n$ has maximum $n$.
Note that if $\sin x = 0$ then $\sin(nx) = 0$ too, so by L'Hospital's rule we find $f_n(x) = \pm n$ (at least in the limit). So assume $\sin x \not= 0$.
In case $n = 2$ we have $f_2(x) = 2 \cos x$ so that $|f_2(x)| \le 2$. Inductively if we assume $|f_k(x)| \le k$ then
$$|f_{k+1}(x)| = \left| \frac{\sin(k+1)x}{\sin x} \right| = \left| \frac{\sin kx \cos x + \cos kx \sin x}{\sin x} \right|\le |f_k(x)||\cos x| + |\cos kx| \le k+1.$$
Thus the global maximum of $f_n$ is $n$.
