An odd function of period 2$\pi$ is appoximated by a Fourier Series with N terms. The appoximate error as measured by mean-square deviation is
$$E_N =\int\limits_{-\pi}^\pi\left( f(x) - \sum_{n=1}^N b_n \sin nx \right)^2 dx$$
By differentiating $E_N$ with respect to the coefficients $b_n$, find the values of $b_n$ that minimize $E_N$.
The main problem for me was I didn't know how to differentiate this function. Any help will be appreciated. Thanks.