Finding fourier sine series using another cosine series I have to find the sine series of $x^3$ using the the cosine series of $x^2/2$.
$${x^2 \over 2}={l^2 \over 6}+{2 l^2 \over \pi^2}\left[\sum{(-1)^n \over n^2}\cos\left({n\pi x \over l}\right)\right]$$
I know I have to integrate but when integrating what happens to the constant  of integration.
Also there's a ${l^2 \over 6}x$ term when integrating.With this term how to  make the series in the  Fourier Sine series to be of the form $\sum A_n \sin({n\pi x\over l})$.  
Can someone please show me how to do this because I need the answer to this question to do the other parts which are based on this.
Any help would be really valuable.   
 A: Obviously when you integrate you get
$$\frac{x^3}{6} = \frac{\ell^2}{6} x + \frac{2 \ell^3}{\pi^3} \sum_{n=1}^{\infty} \frac{(-1)^n}{n^3} \sin{\left (\frac{n \pi x}{\ell} \right )}$$
You now need to represent $x$ in terms of a Fourier sine series to finish this off.  That is, express
$$x = \sum_{n=1}^{\infty} B_n \sin{\left (\frac{n \pi x}{\ell} \right )}$$
where
$$B_n = \frac1{\ell} \int_0^{\ell} dx \, x \, \sin{\left (\frac{n \pi x}{\ell} \right )} = \frac{(-1)^{n+1}}{\pi  n} \ell$$
A: Hint: a sine series for $x$ can be obtained from differentiating the series for $x^2/2$ term-by-term.  That can be used to get rid of the $\dfrac{\ell^2}{6} x$ that you get from integrating.  You don't need to worry about a constant of integration, because a sine series has no constant term.
A: Starting with the series
\begin{align}
\frac{x^2}{2} = \frac{L^2}{6} + \frac{2 L^2}{\pi^2} \left[\sum{(-1)^n \over n^2}\cos\left({n\pi x \over l}\right)\right]
\end{align}
then upon integration from zero to x it is seen that
\begin{align}
\int_{0}^{x} \left[ \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n^{2}} \cos\left( \frac{n \pi u}{L} \right) \right] du = \frac{\pi^{2}}{2 L^{2}} \int_{0}^{x} \left(\frac{u^{2}}{2} - \frac{L^{2}}{6} \right) du
\end{align}
which becomes
\begin{align}
\sum_{n=1}^{\infty} \frac{(-1)^{n}}{n^{3}} \sin\left( \frac{n \pi x}{L}\right) = \frac{ \pi^{3}}{12 L^{2}} ( x^{3} - L^{2} x).
\end{align}
By performing closed limit integration there is no constant of integration to attend to. It is with minimal effort to show the Fourier Sine series of $x$ is
\begin{align}
x = - \frac{2 L}{\pi} \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n} \sin\left( \frac{n \pi x}{L}\right)
\end{align}
which then makes the prior formula to be in the form
\begin{align}
x^{3} = \frac{2 L^{3}}{\pi^{3}} \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^{3}} (\pi^{2} n^{2} - 6) \sin\left( \frac{n \pi x}{L} \right).
\end{align}
