Let $f:[a,b]\to\mathbb{R}$ be continuous and bounded. I need to prove that for every $n\in\mathbb{N}$ there exist a sequence $\{x_i\}_{i=1}^n\subset[0,\pi]$ such that,
$$ \int_{0}^{\pi}f(x)\cdot n\cdot \sin(nx)dx=2\sum_{k=1}^n(-1)^{k+1}f(x_k) $$
Here is my thought process:
I need to find a sequence of $x$'s, so I tried working with Riemann sums. The $(-1)^{k+1}$ seems like it comes from the fact that $|\sin(x)|\leq1$ so I tried to bound the Riemann sum so I can show the limit is the desire sum. I just can't seem to get to the right expression.
Any help or suggestions will be welcome
Divide the interval $[0, \pi]$ in $n$ subintervals $[(k-1)\pi/n, k \pi/n]$, $1 \le k \le n$, and apply the mean value theorems for definite integrals to the integral over each subinterval: $$ \int_{(k-1)\pi/n}^{k \pi/n} f(x) \cdot n \cdot \sin(n x) \, dx = f(x_n) \int_{(k-1)\pi/n}^{k \pi/n} n \cdot \sin(n x) \, dx $$ for some $x_n \in [(k-1)\pi/n, k \pi/n]$ because $\sin(nx)$ does not change sign on that interval.
Now compute the integral on the right and you'll get the desired result.