Solving a Two-Equation Fourier Series

AI Thread Summary
The discussion revolves around expanding a piecewise function as a Fourier series. The function is identified as neither odd nor even, which impacts the calculation of Fourier coefficients. The cosine coefficients are confirmed to be zero due to the function's symmetry properties. The sine coefficients are calculated using separate integrals for each piece of the function, leading to the correct formulation for the Fourier series. The conversation highlights common misunderstandings in identifying function properties and calculating Fourier coefficients.
Shomy
Messages
18
Reaction score
0
[SOLVED] Fourier Series

Homework Statement


I know this may be a simple problem but I am just beginning to understand this subject and this question has confused me.

Expand the following as a whole-range Fourier series:

f(x) = 1 -pi < x < 0
f(x) = x 0 < x < pi

I can solve FS with one eqn, but what do you do with two, do you integrate twice or something?


Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
Welcome to PF Shomy,

The first thing to decide is whether the function is even, odd or neither.
 
Thanks for the welcome!
The first part is even and the second is odd
 
Shomy said:
The first part is even and the second is odd
I suspect that the function is written thus,

f(x) = \left\{\begin{array}{cr}1 &amp; -\pi&lt;x&lt;0 \\ x &amp; 0&lt;x&lt;\pi\end{array}\right.

Which means it isn't actually two functions, but one piecewise function.
 
Yeah
 
Shomy said:
Yeah
So now, is the function odd or even?
 
The first part is even and the second is odd
 
Shomy said:
The first part is even and the second is odd
So overall the function is...?
 
Odd?
 
  • #10
Shomy said:
Odd?
Correct! What does this tell you about the Fourier series coefficients?
 
  • #11
One of the coefficients (cos) is zero
 
  • #12
Shomy said:
One of the coefficients (cos) is zero
Correct, all the coefficients of cosine are zero. So what is the Euler formula for calculating the coefficients of sine?
 
Last edited:
  • #13
Well i meant that one of the coefficients (ie the cos ) is zero because i am using sum notation.

an = 1/pi integral f(x)cosmx dx from pi to -pi. Do I integrate both functions and sum them or what?
 
  • #14
Haven't we just agreed that the cosine coefficients are zero?
 
  • #15
Yeah sorry
 
  • #16
Shomy said:
Yeah sorry
No problem :smile:. So what about the coefficients of sine?
 
  • #17
bm = 1/pi integral f(x)sinmx dx

So do you integrate the first part from pi to 0 and the second part from 0 to -pi
 
  • #18
Shomy said:
So do you integrate the first part from pi to 0 and the second part from 0 to -pi
I believe it's the other way around. Overall the coefficient is given by,

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

However, since f(x) is defined piecewise we must write,

b_n = \frac{1}{\pi}\left[\int_{-\pi}^{0}1\cdot\sin(nx)dx + \int_{0}^{\pi}x\cdot\sin(nx)dx\right]

Is that what you meant?
 
  • #19
Yeah that's what was holding up. Thanks so much!
 
  • #20
Shomy said:
Yeah that's what was holding up. Thanks so much!
No problem :smile:
 
  • #21
> "Odd?"

Hootenanny said:
Correct! What does this tell you about the Fourier series coefficients?

If I understand the function definition, I have a problem with this answer. For example consider x = 2:

f(2) = 2
f(-2) = 1

So for x = 2,
f(x) is not equal to f(-x)
and
f(x) is not equal to -f(-x)

What does this tell us about odd vs. even vs. neither?
 
Last edited:
  • #22
Good catch Redbelly! Of course the function is neither odd nor even, I really don't know what I was thinking :redface:! I'll PM Shomy now and hopefully they haven't handed the assignment in.

I've been making a few daft mistakes recently :frown:
 
Last edited:
  • #23
Thank You!
 
  • #24
Hootenanny said:
I've been making a few daft mistakes recently :frown:

It only gets worse as you get older :smile:
 

Similar threads

Back
Top