What is the Fourier Series for f(x) = (pi - |x|)^2 on [-pi,pi]?

Poopsilon
Messages
288
Reaction score
1

Homework Statement



For those of you who own baby rudin this is problem #14 in Chapter 8. For those of you don't I am given that f(x) = (pi - |x|)^2 on [-pi,pi], I need to show that f(x) = (pi^2)/3 + ∑(4/n^2)cos(nx)

The series above is an infinite series from n=1 to infinity. I know I know I need to take an hour or two and learn Latex, I will next time.


Homework Equations



Um, I can't really think of anything, if you are providing help I'm sure you know how to calculate a Fourier series better than I, considering this is my first time.


The Attempt at a Solution



Well I've calculated the Fourier coefficients and checked over the integrals I did to obtain them what now feels like about fifty times. My a_0 is coming out to (pi^2)/3 which is good. As for a_n I get:

a_n = -(4cos(n*pi))/n^2 + 4/n^2.

For b_n I get:

b_n = (4pi*cos(n*pi))/n

Now with these coefficients I am able to finagle my Fourier series into what I want except I keep getting this nasty extra infinite series left over, now I was thinking well ok maybe it is equal to zero, you know telescopes or something, but I plugged in x=0 and it almost certainly isn't. Please any help would be greatly appreciated I am very frustrated, thanks.
 
Physics news on Phys.org
Hard to say where your errors are. But you might notice that your f(x) is an even function. Your formula for bn should be

b_n = \frac 1 \pi \int_{-\pi}^{\pi}f(x) \sin(nx)\, dx

The integrand is an odd function. What do you get if you integrate an odd function over an interval symmetric about 0?

Also, in computing your an, you will have an even integrand so you can integrate for formula from 0 to pi and double it, thus relieving yourself of the absolute value signs.

Try that. It might help you cut down the mistakes, whatever they are.
 
Last edited:
Oh shoot ok I did the absolute value integral trick for both sine and cosine, but your saying I can only do it for cosine and that I should be getting 0 for the b_n coefficient. So how do I take care of absolute values with odd functions? Do I just drop the absolute value sign without changing the limits of integration and doubling the integral?

Ok So I have my b_n term equal to zero but my I still have my a_n term and so I still have this extra infinite series:

∑ -(4/n^2)cos(n*pi)cos(n*x).

Now if I plug in x=0 here I get ∑ (-4/n^2)cos(n*pi). Now the cos(n*pi) becomes (-1)^n-1, and this pretty clearly does not sum to zero. So I'm still a bit confused.
 
Last edited:
Poopsilon said:
Oh shoot ok I did the absolute value integral trick for both sine and cosine, but your saying I can only do it for cosine and that I should be getting 0 for the b_n coefficient. So how do I take care of absolute values with odd functions? Do I just drop the absolute value sign without changing the limits of integration and doubling the integral? Thanks for your help.

You don't have to integrate the odd function at all. There is a general theorem about symmetry:

\hbox{If }f(x) = f(-x)\hbox{ then } \int_{-a}^a f(x)\, dx = 2\int_0^a f(x)\, dx

and

\hbox{If }f(x) = -f(-x)\hbox{ then } \int_{-a}^a f(x)\, dx = 0

You prove both of them by breaking the integral into two parts, from -a to 0 and 0 to a and letting u = -x on the first one. You can also look at half range Fourier expansions which talk about this symmetry.
 
Ah ok thanks, and don't worry about the second part of my question I figured it out.
 
Ok so now I have hit a new brick wall on the same problem. I am trying to prove that ∑1/n^4 = (pi^4)/90. Using both the Fourier series result as well as the fact that ∑1/n^2 = (pi^2)/6. I've spent a good portion of my day on this problem to no avail I fear it may involve a better understanding of Fourier series than I currently have, thanks for your help!

Ok update on this, I talked to my TA and he says there is a mistake in the in the problem in the book, it should be f(x) = (pi^2)/3 + ∑(2/n^2)cos(nx), (changing the 4 in the numerator into a 2). So I used Parseval's Theorem to successfully solve ∑1/n^4 = (pi^4)/90 with this change, but this means the first two parts are wrong, which is now driving me crazy because I calculated the Fourier series and got what the book has! And moreover by simply plugging x=0 into (pi - |x|)^2 = (pi^2)/3 + ∑(4/n^2)cos(nx) I got ∑1/n^2 = (pi^2)/6. But now that we have changed the 4 into a 2 I am getting ∑1/n^2 = (pi^2)/3 ! What does this mean? Thanks.
 
Last edited:
Poopsilon said:
Ok so now I have hit a new brick wall on the same problem. I am trying to prove that ∑1/n^4 = (pi^4)/90. Using both the Fourier series result as well as the fact that ∑1/n^2 = (pi^2)/6. I've spent a good portion of my day on this problem to no avail I fear it may involve a better understanding of Fourier series than I currently have, thanks for your help!

Ok update on this, I talked to my TA and he says there is a mistake in the in the problem in the book, it should be f(x) = (pi^2)/3 + ∑(2/n^2)cos(nx), (changing the 4 in the numerator into a 2). So I used Parseval's Theorem to successfully solve ∑1/n^4 = (pi^4)/90 with this change, but this means the first two parts are wrong, which is now driving me crazy because I calculated the Fourier series and got what the book has! And moreover by simply plugging x=0 into (pi - |x|)^2 = (pi^2)/3 + ∑(4/n^2)cos(nx) I got ∑1/n^2 = (pi^2)/6. But now that we have changed the 4 into a 2 I am getting ∑1/n^2 = (pi^2)/3 ! What does this mean? Thanks.

The series with the 4 is the correct FS for the given function. There is no doubt about that and, as you have observed, it gives the correct sum for ∑1/n2. I also plotted several terms of this FS and it does converge to the function. So it is correct.

Something strange going on here and I don't see what it is. Likely something simple we are both overlooking. I haven't looked at Parseval's Theorem for many years. Are you sure you are applying it correctly?
 
Ok just to wrap this thread up my TA was wrong. It is supposed to be a 4, so the first two parts are correct. I was applying Parseval's incorrectly, it requires the infinite series in the form which involves e^inx and in that form it is 2/n^2 and so everything works out correctly. Thanks for your help.
 
Back
Top