Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Find the Fourier sin series for the function $f(x) = x^3$ on the interval $0\leq x \leq L$. the Legendre series for the same function. One representation involves an infinite number of terms, while the other has only a finite number of terms. In the context of separation of variables, why is it important to understand both of these very different-looking series representations of a function?

I'm not exactly sure what the problem is stating and how to go about using the Legendre series. I started with the equation for generating the Legendre polynomial inside the integral, but I do not understand how to incorporate the information of the finite and infinite terms?

share|improve this question

migrated from physics.stackexchange.com Mar 14 '13 at 2:21

This question came from our site for active researchers, academics and students of physics.

The procedure is the same for both: write $f$ as a sum of basis functions with unknown coefficients, multiply by some other basis function $f_n$, integrate, and use the orthogonality properties to get an expression for the corresponding coefficient $c_n$. The generating function won't help you much. –  episanty Mar 13 '13 at 23:46
See here. –  Mhenni Benghorbal Mar 14 '13 at 4:09
homework should not be used as a standalone tag; see tag-wiki and meta. I've added fourier-series, but if you can think of other tags appropriate for this questions, please, do add them. –  Martin Sleziak Mar 14 '13 at 7:46
add comment

1 Answer

up vote 4 down vote accepted

We are given:

$$\tag 1 f(x) = x^3$$


Note: see my response here for the Legendre approach.

Using the method from the referenced approach, we find:

$$\tag 2 f(x) = x^3 = c_0P_0(x) + c_1P_1(x) + c_2P_2(x) = \frac{3}{5}P_1(x) + \frac{2}{5} P_3(x)$$

Please note that $(2)$ only has a finite number of terms as mentioned in the problem statement.

Fourier Sine Series

Note that since $f(-x) = -f(x)$, $(1)$ is an odd function and that is very helpful!

If a function is odd, then $a_n = 0$ and the Fourier sin series collapses to:

$$f(x) = \sum_{n=1}^\infty b_n~\sin(n x)$$


$$b_n = \frac{2}{\pi} \int_0^{\pi} f(x)~\sin(n x)~dx$$

However, the question wants us to extend the range to $L$, so we have:

$$b_n = \frac{2}{L} \int_0^{L} f(x)~\sin(\frac{n \pi x}{L})~dx$$

Lets calculate these terms:

$\displaystyle b_1 = \frac{2}{L} \int_0^{L} x^{3}~\sin(\frac{1 \pi x}{L})~dx = \frac{2 (\pi^2-6) L^3}{\pi^3}$

$\displaystyle b_2 = \frac{2}{L} \int_0^{L} x^{3}~\sin(\frac{2 \pi x}{L})~dx = -\frac{(2 \pi^2-3) L^3}{2 \pi^3}$

$\displaystyle b_3 = \frac{2}{L} \int_0^{L} x^{3}~\sin(\frac{3 \pi x}{L})~dx = \frac{2 (3 \pi^2-2) L^3}{9 \pi^3}$


$\displaystyle b_n = \frac{2}{L} \int_0^{L} x^{3}~\sin(\frac{n \pi x}{L})~dx = -\frac{2 L^3 (\pi n (\pi^2 n^2-6) \cos(\pi n)-3 (\pi^2 n^2-2) \sin(\pi n))}{(\pi^4 n^4)}$

Please note that the Fourier sin series has an infinite number of terms as mentioned in the problem statement.

In the context of separation of variables, why is it important to understand both of these very different-looking series representations of a function?

Update to the last question

We have now written two very different ways to solve this problem (function). The first, based on the Legendre polynomials, provided a closed form solution, while the second is based on an infinite series Fourier analysis. These can aid us with different perspectives to solve separation of variable problems.

These two solutions are merely two facets of the same solution. The Fourier series formula shows how every piece-wise component of the solution can be decomposed into its constituent parts, while the Legendre approach demonstrates how all the components combine into a single solution.

Mathematically, both of these provide us with the ability to look at behaviors from a different perspective and are both very useful to analyze the behavior of the function (globally or component wise) and provide another tool in our tool-box for qualitative and quantitative analyses (do they converge, how fast, how large is the error $\ldots$).


share|improve this answer
It sure as heck did, thank you so much. I was able to tackle most of my other problems for class because of your guide! Clear, concise, and well derived steps. Thank you again. –  julesverne Mar 14 '13 at 18:34
Really nice and thorough answer, and it seemed to really help both the OP, and future visitors too! –  amWhy Apr 20 '13 at 0:16
Oh dear! Here at MSE? I have felt that way at times... :-( Just reread the feedback you received from the OP on this answer...that might help rebuild your morale!! –  amWhy Apr 20 '13 at 2:04
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.