Fourier expansion between two different intervals

Click For Summary

Homework Help Overview

The problem involves expanding a piecewise function f(x) defined on the interval [-1, 1] into a Fourier series, specifically focusing on the sine or cosine series components. The function is defined as f(x) = x + 1 for -1 < x < 0, f(x) = x - 1 for 0 < x < 1, and f(x) = 0 at x = 0.

Discussion Character

  • Exploratory, Assumption checking

Approaches and Questions Raised

  • Participants discuss the need to break the integrals into parts corresponding to the piecewise definition of f(x). There is uncertainty about whether calculating the Fourier coefficients a0, an, and bn requires six integrals or if some can be simplified due to the properties of odd and even functions. Questions arise regarding the interpretation of the variable p in the context of the integrals.

Discussion Status

Participants are actively exploring the implications of the piecewise nature of the function on the Fourier expansion. Some guidance has been offered regarding the treatment of odd and even functions in integrals, and there is a clarification on the definition of p based on the interval of integration. Multiple interpretations of the setup are being considered, particularly regarding the integration limits and the nature of the function.

Contextual Notes

There is a discussion about the constraints of the problem, including the piecewise definition of f(x) and the implications for calculating Fourier coefficients. Participants are questioning the assumptions about the integrals and the role of p in the Fourier series equations.

LASmith
Messages
21
Reaction score
0

Homework Statement



f(x) = x+1 for -1,x<0
x-1 for 0<x<1
0 for x=0

expand it in an appropriate cosine or sine series



Homework Equations



f(x) = a0/2 + \sum [ancos (n\pix/p) + bn sin (n\pix/p)

a0 = 1/p \intf(x).dx

an = 1/p \int f(x)cos (n\pix/p).dx

bn = 1/p \int f(x)sin (n\pix/p).dx


The Attempt at a Solution



As there are two functions within this f(x), I am unsure of how to go ahead and do this.
I realize the overall function is odd, therefore would only need to expand the bn part of the Fourier series, however the individual functions are not odd.
How would I go about setting this up?
 
Physics news on Phys.org
You'll need to break the integrals into two parts. The first will integrate x+1 from -1 to 0, the second will integrate x-1 from 0 to 1.
 
\int_{-1}^1 f(x)dx= \int_{-1}^0 f(x)dx+ \int_0^1 f(x)dx
 
HallsofIvy said:
\int_{-1}^1 f(x)dx= \int_{-1}^0 f(x)dx+ \int_0^1 f(x)dx

Can this only be done the long winded way of calculating a0, an and bn for each equation, therefore doing 6 integrals? Or will some cancel for being odd/even functions, which I cannot see at first glance?

Also would the value of 'p' in my 'relevant equations' be -1 for x+1 and 1 for x-1?
 
LASmith said:
Can this only be done the long winded way of calculating a0, an and bn for each equation, therefore doing 6 integrals? Or will some cancel for being odd/even functions, which I cannot see at first glance?
In a sense, you always have to calculate an and bn. It's just that if you have an even or odd function, you can sometimes use tricks to simplify or avoid lengthy calculations. When you have an odd integrand O(x) and a symmetric interval [-a,a], you know that\int_{-a}^a O(x)\,dx = 0(You should be able to prove this.) If you have an even integrand E(x), you can say\int_{-a}^a E(x)\,dx = 2\int_{0}^a E(x)\,dx(Again, you should be able to prove this.)

In this problem, you want to write down the integrals for an and bn, take a look at the integrands, and see if either of the above apply. If they do, you can use them to simplify evaluating the integrals for an and bn.
Also would the value of 'p' in my 'relevant equations' be -1 for x+1 and 1 for x-1?
You need to understand what the quantities that appear in a formula represent otherwise you're just guessing. So what does p represent in these formulas?
 
vela said:
You need to understand what the quantities that appear in a formula represent otherwise you're just guessing. So what does p represent in these formulas?

I thought p represented the value for which we integrate between, as all the examples so far have been where the limit is between p and -p, however, because these functions are between -1 and 0 & 0 and 1, I would presume it was the non-zero number, although I do not understand where the 1/p at the beginning of each integral comes from, so I guess that is where my miss-understanding occurs.
 
The function f(x) defined on the interval [-1,1]. That's what determines what p is equal to. How f(x) is actually defined, in this case, piecewise, has nothing to do with p.
 
vela said:
The function f(x) defined on the interval [-1,1]. That's what determines what p is equal to. How f(x) is actually defined, in this case, piecewise, has nothing to do with p.

Therefore p will be 1 for both parts of the function, regardless of where the two parts of the function lie, between this interval?
 
Yup. Take a0 for example. You get
\begin{align*}
a_0 &= \frac{1}{p}\int_{-p}^p f(x)\,dx \\
&= \frac{1}{1}\int_{-1}^1 f(x)\,dx \\
&= \int_{-1}^1 f(x)\,dx
\end{align*}
because a single period is over [-1,1]. Now when you substitute in for f(x), you would split the integral up because of the two pieces to get
\begin{align*}
a_0 &= \int_{-1}^1 f(x)\,dx \\
&= \int_{-1}^0 f(x)\,dx + \int_{0}^1 f(x)\,dx \\
&= \int_{-1}^0 (x+1)\,dx + \int_{0}^1 (x-1)\,dx
\end{align*}
Note that this isn't necessarily the way you'd calculate a0 since you're not taking advantage of the oddness of f(x). It was just to show that p doesn't depend on the fact that f(x) is made out of two or more pieces.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K