How to expand f(x)=x^2, -pi<x<pi as fourier series

In summary, the conversation is about finding the Fourier series for f(x)=x^2, -pi<x<pi and the answer given in the book is ((pi^2)/3)+4sigma(from 1 to infinity) [((-1)^n)/(n^2)]cos nx. The person asking the question tried using a(n) and b(n) but didn't understand where the n^2 in the denominator came from. Another person suggests using integration by parts twice to get rid of the x^2 and explains how to do it. The conversation ends with clarification on the first term in the answer being a0/2 and the potential issue with n=0.
  • #1
blueyellow

Homework Statement


how to expand f(x)=x^2, -pi<x<pi as Fourier series
answer at back of the book says:
f(x)=((pi^2)/3)+4sigma(from 1 to infinity) [((-1)^n)/(n^2)]cos nx
i tried the a(n) b(n) stuff but i don't see where they get the n^2 in the denominator from

when i integrated to try to find a(n) i get n on the denominator
 
Physics news on Phys.org
  • #2
It seems pretty straight forward to me. In order to get rid of that "[itex]x^2[/itex]" you will need to integrate by parts- twice. And each time you will get a 1/n integrating the trig function. If you want more detail on where you went wrong, we will have to see what you did. HOW did you integrate
[tex]\int_{-\pi}^\pi x^2 cos(x) dx[/tex]?
 
  • #3
integral of x^2 cos ((n*pi*x)/L) dx

using partial integration
integral=first term*integral of second term -[integral of (first term differentiated*integral of second term)]
first term=x^2
second term=cos...
=integral (from -pi to pi) x^2 cos((n*pi*x)/2pi) dx
=integral (from -pi to pi) x^2 cos((n*x)/2) dx
=[(2x^2)/n sin ((nx)/2)- integral of 2x sin (nx/2)] dx
=[(2x^2)/n sin ((nx)/2)- [-4x/n cos (nx/2) + 4/n cos (nx)]dx

putting in the limits
integral=(4pi^2)/n

a(n)=1/L *integral
=2pi/n

that term at the beginning of the answer is a0/2, right?
because if n=0 is put into 2pi/n, it'll be infinity!
 

What is a Fourier series?

A Fourier series is a way to represent a periodic function as a sum of sine and cosine functions. It is named after the French mathematician Joseph Fourier who first introduced the concept in the early 19th century.

Why do we need to expand f(x) as a Fourier series?

Expanding a function as a Fourier series allows us to approximate the function using simpler trigonometric functions. This can be useful in analyzing and solving problems involving periodic functions.

What is the process for expanding f(x) as a Fourier series?

The process for expanding f(x) as a Fourier series involves finding the coefficients for the sine and cosine terms in the series using integration and then plugging them into the general formula for a Fourier series, which is: f(x) = a0 + ∑(an*cos(nx) + bn*sin(nx)), where a0 is the average value of the function and an and bn are the coefficients.

What is the range of x for the given function?

The given function, f(x) = x^2, has a range of -pi to pi. This means that the function repeats itself every 2pi units along the x-axis, making it a periodic function.

Can a Fourier series represent any function?

No, a Fourier series can only represent functions that are periodic and have a bounded range. If a function does not meet these criteria, its Fourier series will not converge to the original function.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
286
  • Calculus and Beyond Homework Help
Replies
1
Views
216
  • Calculus and Beyond Homework Help
Replies
2
Views
372
  • Calculus and Beyond Homework Help
Replies
1
Views
535
  • Calculus and Beyond Homework Help
Replies
16
Views
564
  • Calculus and Beyond Homework Help
Replies
1
Views
344
  • Calculus and Beyond Homework Help
Replies
3
Views
416
  • Calculus and Beyond Homework Help
Replies
5
Views
357
  • Calculus and Beyond Homework Help
Replies
6
Views
239
  • Calculus and Beyond Homework Help
Replies
6
Views
390
Back
Top