TITLE: Maxima of $\sin(nx)/\sin(x)$
QUESTION [1 upvotes]: 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.

REPLY [5 votes]: 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.
{"set_name": "stack_exchange", "score": 1, "question_id": 2245558}