I am solving an exercise in which I'm asked to show that
$$1=\frac{4}{\pi}\sum_{n=1}^\infty{\frac{\sin((2n-1)x)}{2n-1}}, 0<x<\pi$$
I am considering solving this exercise by finding the function given by this sum, but I am pretty sure there is a more elegant solution.
Thanks!
Hint: Calculate the Fourier Series of $$f(x) =\left\{ \begin{array}{c c} 1 & \mbox{ if } 0 \leq x \leq \pi \\ -1 & \mbox{ if } -\pi \leq x \leq 0 \end{array} \right.$$