Let $f: [-\pi, \pi] \rightarrow \mathbb{R}$ be nonincreasing. Is it true that
$$ \left| \int_{-\pi}^\pi f(x) \sin (nx) dx \right| \leq \frac{f(-\pi)-f(\pi)}{n}.$$
(Please, without Stieltjes integrals.)
I obtain something similar by using the second mean value theorem for integrals but with right hand side equal $2 \frac{f(-\pi)-f(\pi)}{n}$.
Thanks.
Added.
Sorry, I mistaked and this inequality is generally not true.
It holds the following inequality
$$ \left| \int_{-\pi}^\pi f(x) \sin (nx) dx \right| \leq 2 \frac{f(-\pi)-f(\pi)}{n}.$$
The proof goes in the followig way. By the second mean value theorem there exists a $c\in [-\pi,\pi]$ such that
$$\int_{-\pi}^\pi f(x) \sin nxdx=f(-\pi)\int_{-\pi}^c \sin nx dx+f(\pi) \int_c^\pi \sin nx dx$$ $$=-\frac{f(-\pi)}{n} (\cos nc-\cos n\pi)-\frac{f(\pi)}{n} (\cos n\pi-\cos nc)$$ $$=\frac{f(-\pi)-f(\pi)}{n} (\cos n\pi-\cos nc).$$
Since $|(\cos n\pi-\cos nc)| \leq 2$ we obtain
$$ \left| \int_{-\pi}^\pi f(x) \sin (nx) dx \right| \leq 2 \frac{f(-\pi)-f(\pi)}{n}.$$
Best Answer
I apologize; I missed a factor of $2$ in the integration by parts argument. The optimal bound is, indeed, $2 (f(-\pi) -f(\pi))/n$. Take $n=1$ and let $f(x)$ be $1$ for $- \pi \leq x < 0$ and $0 \leq x \leq \pi$. Then $\int f(x) \sin x dx = -2 = 2 (f(-1) - f(1))$.
As Thomas points out below, for all $n$ odd, this same $f$ gives $\int f(x) \sin(nx) dx = 2 (f(-\pi) -f(\pi))/n$.