How Do You Calculate the Fourier Series of a Piecewise Function?

Click For Summary

Discussion Overview

The discussion revolves around calculating the Fourier series of a piecewise periodic function defined over the interval from -π to π. Participants explore the nature of the function, its periodicity, and the appropriate terms to include in the Fourier series based on whether the function is even or odd.

Discussion Character

  • Homework-related
  • Exploratory
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants question how to start calculating the Fourier series after sketching the function.
  • There is a discussion about whether the function is even or odd, with some suggesting that if it is odd, only sine terms should be included, while if it is even, cosine terms should be used.
  • One participant initially states that the function does not repeat, but later acknowledges that it is periodic, which leads to confusion about its evenness or oddness.
  • Participants express uncertainty about the argument of the sine and cosine terms in the Fourier series, with some clarifying that it is nx.
  • There are conflicting views on the function's classification as odd or even, with one participant asserting that a function is odd if it repeats itself, while another clarifies the definitions based on the relationship f(-x) and f(x).
  • Some participants attempt to calculate Fourier coefficients but express confusion about the process, particularly regarding the integrals involved.
  • There are corrections regarding the calculation of coefficients, with one participant indicating that previous results were incorrect and suggesting a careful reevaluation of the integrals.

Areas of Agreement / Disagreement

Participants do not reach a consensus on whether the function is odd or even, leading to multiple competing views. The discussion remains unresolved regarding the correct approach to calculating the Fourier series coefficients.

Contextual Notes

Participants express limitations in their understanding of integration and the application of Fourier series, indicating a need for foundational knowledge before proceeding with the calculations.

agata78
Messages
139
Reaction score
0

Homework Statement



Determine the Fourier series for the periodic function of period 2∏ defined by:



-2 when (-∏ ) ∠ x ∠ (-∏/2)
f(x)= 2 when ( -∏/2) ∠ x ∠ (∏ /2)
-2 when (∏/2) ∠ x ∠ (∏)

how to start i?. I have already drawn it but what next.
thank you

Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
Agata 78 said:

Homework Statement



Determine the Fourier series for the periodic function of period 2∏ defined by:



-2 when (-∏ ) ∠ x ∠ (-∏/2)
f(x)= 2 when ( -∏/2) ∠ x ∠ (∏ /2)
-2 when (∏/2) ∠ x ∠ (∏)

how to start i?. I have already drawn it but what next.
thank you

Homework Equations





The Attempt at a Solution

The function runs from -π to +π. As yourself: is the function even in x or odd in x? If it is odd in x, then you only need to include the sin terms in the Fourier Series. if it is odd in x, then you only need to include the constant term and the cosine terms in the Fourier Series. What is the argument of sin or cosine going to be if the function runs from -π to +π?
 
yes, the function runs from -∏ to ∏. its from (-∏ to ∏/2) ( -∏/2 to ∏/2) and ( ∏/2 to ∏). There is no period in it, it doesn't repeat. Than it has to be even in. even in is cosinus than yes?
 
dont know what you mean by argument?
 
Agata 78 said:
yes, the function runs from -∏ to ∏. its from (-∏ to ∏/2) ( -∏/2 to ∏/2) and ( ∏/2 to ∏). There is no period in it, it doesn't repeat. Than it has to be even in. even in is cosinus than yes?

Oh yes it does repeat. That's what 'periodic' means.
 
Agata 78 said:
dont know what you mean by argument?

f(x) the argument is x.
 
Agata 78 said:
yes, the function runs from -∏ to ∏. its from (-∏ to ∏/2) ( -∏/2 to ∏/2) and ( ∏/2 to ∏). There is no period in it, it doesn't repeat. Than it has to be even in. even in is cosinus than yes?

Yes, it's an even function in the argument x.
 
Agata 78 said:
dont know what you mean by argument?
I was thinking that the terms in the Fourier Series should be Ancos(nx) where x runs from -π to +π, and n is the sequence of integers 1,2,3,... So, the argument is nx.
 
Chestermiller said:
I was thinking that the terms in the Fourier Series should be Ancos(nx) where x runs from -π to +π, and n is the sequence of integers 1,2,3,... So, the argument is nx.

You're right, the argument of each of the harmonics is nx, not x.

I wanted to say that his function was an even function of x, x being the argument of f(x).

Sorry Chet!
 
Last edited:
  • #10
rude man said:
You're right, the argument of each of the harmonics is nx, not x.

I wanted to say that his function was an even function of x, x being the argument of f(x).

Sorry Chet!
No apology necessary RM. You're the man!

Chet
 
  • #11
Is this function is odd or even, cause I am confused. When it repeats itself its called odd when its not its even.
This one repeats it self then its odd yes?

And using co- efficient formulae with 2L= 2π, than L= π.
after calculating
[a][/0] =0
[a][/ 1] = 0

dont know how to calculate [/0] ?
 
  • #12
Agata 78 said:
Is this function is odd or even, cause I am confused. When it repeats itself its called odd when its not its even.
This one repeats it self then its odd yes?

And using co- efficient formulae with 2L= 2π, than L= π.
after calculating
[a][/0] =0
[a][/ 1] = 0

dont know how to calculate [/0] ?

No. A function is odd if f(-x)=-f(x), and it is even if f(-x)=+f(x). Your function is even. So, it will be described by a cosine series. Do you have a formula for calculating the coefficients of a Fourier cosine series? If so, please show us, and show us in detail how you applied it to the case of arbitrary n.

Chet
 
  • #13
∞ n∏x n∏x
Sf(x) = a0 +Ʃ [ an cos L + bn sin L ]
n=1

1 ∏
a0= 2∏ ∫ f(x) dx =O
-∏
1 ∏
a1= ∏ ∫ f(x) cos nx dx= 0,
-∏

what happenes if even times even = is it odd? I know when odd times odd = even.

Im sorry i don't have a clue how to use latex, i tried so many times and still doesn't work. Its hard
 
  • #14
Do you know, how to calculate the Fourier coefficients? If so, just calculate them ;-)).
 
  • #15
dont know how to calculate b1
 
  • #16
Agata 78 said:
∞ n∏x n∏x
Sf(x) = a0 +Ʃ [ an cos L + bn sin L ]
n=1

1 ∏
a0= 2∏ ∫ f(x) dx =O
-∏
1 ∏
a1= ∏ ∫ f(x) cos nx dx= 0,
-∏

what happenes if even times even = is it odd? I know when odd times odd = even.

Im sorry i don't have a clue how to use latex, i tried so many times and still doesn't work. Its hard

Your result for a1 is incorrect. The integral in the right hand side is not zero. Also, the value of n in the cosine term should be n=1. Try doing the integral for n =1 again, and please be more careful.
 
  • #17
I don't know how to do that, could you please help me?
 
  • #18
Agata 78 said:
I don't know how to do that, could you please help me?

\int_{-\pi}^{+\pi}{f(x)\cos{x}dx}=\int_{-\pi}^{-\pi/2}{(-2)\cos{x}dx}+\int_{-\pi/2}^{+\pi/2}{(2)\cos{x}dx}+\int_{\pi/2}^{\pi}{(-2)\cos{x}dx}

Are you able to evaluate the integrals on the right hand side of this equation?

Chet
 
  • #19
It looks complicated, wouldn't know where to start!
 
  • #20
Agata 78 said:
It looks complicated, wouldn't know where to start!

Before you can start working with Fourier Series, you will first have to learn how to integrate simple functions.

Chet
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
17
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K