# Fourier sine series for $x^3$

It is asked to find the Fourier Sine Series for $x^3$ given that

$$\frac{x^2}{2} = \frac{l^2}{6} + \frac{2l^2}{\pi^2} \sum_{n=1}^\infty (-1)^n \frac{1}{n^2} \cos\left(\frac{n \pi x}{l} \right)$$ integrating term by term. (This result was found in another exercise). As suggested, I integrated:

$$\int \frac{x^2}{2} dx = \frac{x^3}{6} = \frac{l^2x}{6} + \frac{2l^2}{\pi^2} \sum_{n=1}^\infty (-1)^n \frac{1}{n^2} \int \cos\left(\frac{n \pi x}{l} \right)dx + C$$ $$\Rightarrow \frac{x^3}{6} = \frac{l^2x}{6}+ \frac{2l^2}{\pi^2} \sum_{n=1}^\infty (-1)^n \frac{1}{n^2} \frac{l}{n \pi} \sin\left(\frac{n \pi x}{l} \right) + C$$

$$\Rightarrow x^3 = l^2x + \frac{12l^3}{\pi^3}\sum_{n=1}^\infty (-1)^n \frac{1}{n^3} \sin\left(\frac{n \pi x}{l} \right) + C$$

It looks like that wolfram gives a different answer. I don't know if the problem is the constant $C$ or if I made something wrong. Please, follow the book approach, don't try to calculate the coefficient of Fourier sine series.

Thanks!

• Note that your answer and the one in wolfram are not the same in just their appearance. Oct 17, 2015 at 18:33

1. You can find the constant $C$ by equating at $x=0$.
2. You've forgotten to take the $l^2/6$ into account: integrating gives $l^2x/6$, and you then need the Fourier series for that. A simple way to find it is to differentiate the original series you have, which will give you an $x$ on the left and the Fourier series of $x$ on the right (this works because the series for $x^2$ has terms that decay like $1/n^2$, so the derivative decays like $1/n$, so the series converges (not absolutely, of course).
Both terms have to agree at $x=0$, hence, simply, $C=0$.
1) You can simply conclude that $C=0$ as the equation must hold when $x=0$.
2) The answer of wolfram is different from you in appearance. The reason is that in the answer by wolfram, $x$ is also written in sin Fourier series and then combined with other terms in your equation.