Find the fourier series representation of x^2

In summary, the person is trying to find the Fourier series representation of x^2 in the intervals (-pi, pi) and (0, 2pi). They started with the coefficients and for a_0 got 0. They then plugged in n=0 to find a_n. They continued with f(x) = sin(\pi*x); x=(-1/2, 1/2) and found that a_0=0 and b_n=1/\pi \int_{-1/2}{1/2}sin(\pi x)*sin(2n\pi x) dx=1/\pi\[1/2( \frac {(sin(2n-1
  • #1
Gale
684
2
ok, i wasn't sure if i ought put this in math or phys, we're going over it my phys class, but its just math... whatever..

So i had to find the Fourier series representation of x^2 in the intervals (-pi, pi) and (0, 2pi). i haven't even started the (0, 2pi) one, cause i can't get the first half.

so i started with the coefficients, and for a_0 i got

[tex] a_0= 1/\pi \int_{-\pi}^\pi (0)^2 * cos(0*\pi) dx= 0[/tex] and i don't think that's right, the answer in the back of the book was... ok turns out i didn't write it down, but it was something + stuff*cos. So i assumed the something was the a_0/2 but i think it had pi^2 and i think it was over 3 or something, it seemed like maybe it wasn't a_0, so i kept going, with my a_n's.

so for a_n, i set it up, do integration by parts twice, and i get 0 again. same for b_n. i don't know what I'm doing wrong but everything keeps cancelling out and i get zeros. so could someone maybe help me through this problem? this isn't even an assigned problem, but i thought i'd try one i knew the answer to first, to make sure i knew what i was doing, but turns out i have no idea. help?
 
Last edited:
Physics news on Phys.org
  • #2
ok, apparently my equation for a_0 is wrong for starters, i googled Fourier series of x^2 and found some sites, but they don't show all the steps, or the equation for a_0 that they start with. i don't have a book so I'm looking at online sources, and I'm not really sure what's going on any more. here's what i though,

[tex] a_n= 1/\pi \int_{-\pi}^\pi f(x)* cos(nx) dx[/tex]

then for a_0 you eval f and cos at x=0. apparently this isn't the case? I'm confused.
 
  • #3
If

[tex] a_n= 1/\pi \int_{-\pi}^\pi f(x)* cos(nx) dx[/tex]

then looking for [itex]a_0[/itex] means plugging in n = 0 into that equation. (It wouldn't make sense to plug in x = 0 anyways, because that's a dummy variable)


FYI, I think the [itex]a_0[/itex] term goes by a different formula than all the others... I think it's [itex]1/2\pi[/itex] out front, but I don't remember for sure.


I can't tell what's going wrong with your integration if you don't show your work. :wink:
 
Last edited:
  • #4
ok, i plug in n=0, that's good to know. now I've been looking online and in my notes, and in different places it says a_0 has 1/pi and others say 1/2pi. then some say the general formula is a_0/2 and some just say a_0, and i thought this mad sense until i realized some of the places say a_0 = 1/2pi also had a_0/2 and I'm like ugh. i can't find stuff that makes sense.

also, i was doing the series for sin(pi*x) and i figured, you don't use any cosines, (why would you) but then when i solve for b_n's i get 0, so it means no sins! ugh. i don't know what the problem is! these seem so straight forward and i can't get a single answer!
 
  • #5
ok ok, some work:

[tex] f(x)= sin(\pi*x); x= (-1/2, 1/2)[/tex]

i thought there was no cosines so no a_n's..

[tex] a_0= 1/\pi \int_{-1/2}^{1/2} sin(\pi x) dx) = 0 [/tex]

[tex] b_n= 1/\pi \int_{-1/2}^{1/2} sin(\pi x)*sin(2n\pi x)dx= \frac {(-1)^n}{\pi} \int_{-1/2}^{1/2} sin^2(2 \pi nx)= \frac {(-1)^n}{2 \pi}*-cos^3(2\pi nx)*(\frac{1}{2\pi n} |_{-1/2}^{1/2}= \frac{(-1)^{n+1}}{4\pi^2 n} cos^3(2\pi nx) |_{-1/2}^{1/2}= 0[/tex]

cause cos(pi)=cos(-pi) right? sooooo...
 
  • #6
Oh, did you change problems? You're not working on f(x) = x² anymore?

[tex]
b_n=
1/\pi \int_{-1/2}^{1/2} sin(\pi x)*sin(2n\pi x)dx
= \frac {(-1)^n}{\pi} \int_{-1/2}^{1/2} sin^2(2 \pi nx)
[/tex]

How did you do this? I don't think [itex]\sin (\pi x) = (-1)^n \sin(2 \pi n x)[/itex].

Also, the next step is wrong too: it looks like you tried to use the chain rule for derivatives. You don't have that here -- the analogous concept is making a substitution. Your calc book probably has a whole section on trig integrals if you want to look up how to do that one... but that integral doesn't matter since the first step is wrong.

What you want to use is a trig identity!
 
Last edited:
  • #7
i dunno, i quit, never mind.
 
  • #8
PF rules state that Gale is not allowed to quit, reread the material and try again.
 
  • #9
ok, once i stopped crying, finished some other homework, and tried to feel less stupid, i tried again.

so, yes i changed problems because x^2 isn't on my homework, and i'd rather be working on a homework problem, so i can at least have one problem to turn in tomorrow...


anyway...
there's no a_n terms because the function is sin(pi x); x=(-1/2, 1/2)

so
[tex]b_n= 1/\pi \int_{-1/2}{1/2}sin(\pi x)*sin(2n\pi x) dx= 1/\pi\[1/2( \frac {(sin(2n-1)\pi x}{(2n-1)\pi} - \frac{sin(2n+1)\pi x}{(2n+1)\pi}) |_{-1/2}^{1/2}[/tex]

i used a table of integrals, which is fine for this class. now, when i evaluate it, i think i just get twice the integral at the upper limit, cause sin(-A)=-sin(A), get what i mean? i didn't want to write it all out in tex. yeah... so i get

[tex] 1/\pi^2( \frac {sin(2n-1) \pi/2}{(2n-1)}-sin(2n+1)\pi/2}{(2n+1))}[/tex]

k, then I'm trying to simplify the sin's. so for the first one i do

[tex]sin(2n-1)\pi/2= sin(n\pi -\pi/2)=sin(n\pi)cos(\pi/2)-sin(\pi/2)cos(n\pi)= 1[/tex]

the second:

[tex]sin(2n+1)\pi/2= sin(n\pi +\pi/2)=sin(n\pi)cos(\pi/2)+sin(\pi/2)cos(n\pi)= -[/tex]

then we use those, and get a common denom, and i get:

[tex]b_n= \frac {(2n+1)+(2n-1)}{4n^2-1}=\frac {4n}{4n^2-1}[/tex]
that's wrong though...
 
  • #10
1. Regarding the a0 confusion. My textbook says that if you decide to call the first (constant) term in the Fourier series a0/2, then this has the advantage that all of the an's can be calculated from the same formula, including a0.

2. My formula for bn is as follows:

[tex] b_n = \frac{1}{L}\int_{-L}^{L} f(x) \sin\frac{n \pi x}{L} \ dx [/tex]

Substituting L = 1/2, I get:

[tex] b_n = 2 \int_{-1/2}^{1/2} \sin(\pi x) \sin(2n \pi x) \ dx [/tex]

So i guess my question is, where is the 1/pi coming from in front of your integrals? Did I just overlook something simple?
 
  • #11
3. It's really handy to have some common trig identities at your fingertips. Whenever I see sinAsinB, I think of the trig identities where those sin-sin terms occur:

cos(A+B) = cosAcosB - sinAsinB
cos(A-B) = cosAcosB + sinAsinB

How do we get rid of those pesky cos-cos terms? They have the same sign in each equation, so try subtracting the upper equation from the lower!

cos(A-B) - cos(A+B) = sinAsinB - (-sinAsinB) = 2sinAsinB

So sinAsinB = 1/2[cos(A-B) - cos(A+B)], and that's a good one to remember.

Let A = 2n(pi)x, B = pi*(x)

The integrand becomes:

[tex] \frac{1}{2}[\cos(2n-1)\pi x - \cos (2n+1)\pi x] [/tex]

The integral becomes:

[tex] b_n = \int_{-1/2}^{1/2}{\cos(2n-1)\pi x \ dx} - \int_{-1/2}^{1/2}{\cos(2n+1)\pi x \ dx} [/tex]

Now you can see where that antiderivative you found in the table comes from! Remember these trig identities, in quantum mechanics class, for instance, we were just sort of expected to know them off the tops of our heads (lol).

You sound overworked. I know the feeling. For me the 'day of homework convergence' is Friday, not Monday. I almost always have a weekly quantum mechanics assignment and complex analysis assignment due on that day. This week it will be much worse because I also have a Friday midterm in my Signals and Systems course on none other than Fourier series and Fourier transforms. =\

Don't know what else to suggest except to keep calm. You win some, you lose some. Stress is your worst enemy. (I have to keep telling myself that too.)
 

1. What is the Fourier series representation of x^2?

The Fourier series representation of x^2 is a way of expressing the function x^2 as a sum of sine and cosine functions with different amplitudes and frequencies. It is a useful tool in mathematics and engineering for approximating and analyzing periodic functions.

2. How do you find the Fourier series representation of x^2?

To find the Fourier series representation of x^2, you can use the formula:
x^2 = a0/2 + ∑(an*cos(nx) + bn*sin(nx))
where a0, an, and bn are constants that can be found using integration and the orthogonality properties of sine and cosine functions.

3. What are the first few terms of the Fourier series representation of x^2?

The first few terms of the Fourier series representation of x^2 are:
x^2 = π^2/3 + 4/π * ∑(cos(nx)/n^2)
This series continues with higher-order terms involving both sine and cosine functions.

4. Can the Fourier series representation of x^2 be used to evaluate the function at specific points?

Yes, the Fourier series representation of x^2 can be used to evaluate the function at specific points. By plugging in a specific value for x, you can calculate the corresponding value of x^2 using the Fourier series formula.

5. What are some applications of the Fourier series representation of x^2?

The Fourier series representation of x^2 has various applications in signal processing, image analysis, and differential equations. It is also used in the field of quantum mechanics to describe the wave-like behavior of particles. Additionally, it has applications in finance and economics for analyzing periodic fluctuations in data.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
335
  • Calculus and Beyond Homework Help
Replies
3
Views
272
  • Calculus and Beyond Homework Help
Replies
1
Views
201
  • Calculus and Beyond Homework Help
Replies
6
Views
380
  • Calculus and Beyond Homework Help
Replies
1
Views
532
  • Calculus and Beyond Homework Help
Replies
3
Views
409
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
16
Views
556
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
371
Back
Top