Fourier Series Homework (Discontinuous Function)

CGM
Messages
16
Reaction score
0

Homework Statement


I have attached a screenshot of the question.
I know how to use Fourier's theorem for one function but have no idea how to attempt it with a discontinuous function like this.
I tried working out a0 by integrating both functions with the limits shown, adding them and multiplying by 1/pi but I just got 0.
 

Attachments

  • Screen Shot 2015-02-26 at 21.35.06.png
    Screen Shot 2015-02-26 at 21.35.06.png
    7.4 KB · Views: 591
Physics news on Phys.org
First, there is a typo in the definition of the function. It should obviously be ##\sin x## on ##[0,\pi]##, not ##[-\pi,\pi]##. You will have to show us your work for ##a_0## so we can see what you did wrong. Also, your given function is continuous, not discontinuous as stated in your title.
 
LCKurtz said:
First, there is a typo in the definition of the function. It should obviously be ##\sin x## on ##[0,\pi]##, not ##[-\pi,\pi]##. You will have to show us your work for ##a_0## so we can see what you did wrong. Also, your given function is continuous, not discontinuous as stated in your title.
 
LCKurtz said:
First, there is a typo in the definition of the function. It should obviously be ##\sin x## on ##[0,\pi]##, not ##[-\pi,\pi]##. You will have to show us your work for ##a_0## so we can see what you did wrong. Also, your given function is continuous, not discontinuous as stated in your title.
a0 = 1/pi [ ∫(0) + ∫(sinx)] (0 between 0 and -pi and sinx between pi and 0)
a0 = 1/pi (0 + [-cosx])
= 1/pi (0 + (-1+1))
= 0

Sorry I'm not sure about how to do the notation properly on a computer
 
CGM said:
a0 = 1/pi [ ∫(0) + ∫(sinx)] (0 between 0 and -pi and sinx between pi and 0)
a0 = 1/pi (0 + [-cosx])
= 1/pi (0 + (-1+1))
= 0

Sorry I'm not sure about how to do the notation properly on a computer
So the nonzero part is ##\frac 1 \pi (-\cos x|_0^\pi)##. Be more careful with evaluating that and watch your signs.
 
LCKurtz said:
So the nonzero part is ##\frac 1 \pi (-\cos x|_0^\pi)##. Be more careful with evaluating that and watch your signs.
Okay so, that gives me the ao value

Then ak = 1/pi ( ∫sin(x)cos(kx) )
My tutor told me to use: sin((k+1)x) = sin(kx)cos(x) + cos(kx)sin(x)
sin((k-1)x) = sin(kx)cos(x) - cos(kx)sin(x)
to make the integration easier but I can't see what to do with this
 
CGM said:
Okay so, that gives me the ao value

Then ak = 1/pi ( ∫sin(x)cos(kx) )
My tutor told me to use: sin((k+1)x) = sin(kx)cos(x) + cos(kx)sin(x)
sin((k-1)x) = sin(kx)cos(x) - cos(kx)sin(x)
to make the integration easier but I can't see what to do with this
What happens if you add the two identities your tutor suggested?
[Edit:] Or maybe subtract them?
 
LCKurtz said:
What happens if you add the two identities your tutor suggested?
[Edit:] Or maybe subtract them?
ak = 1/pi [ ∫sin((k+1)x) - ∫sin((k-1)x) ]
= 1/pi { [(-1/k+1)cos((k+1)x)] - [(-1/k-1)cos((k-1)x)] }
= 1/pi { (-cos((k+1)x)-1)/(k+1)) - (-cos((k-1)x)-1)/(k-1)) }

Is this even close?
 
CGM said:
ak = 1/pi [ ∫sin((k+1)x) - ∫sin((k-1)x) ]
= 1/pi { [(-1/k+1)cos((k+1)x)] - [(-1/k-1)cos((k-1)x)] }
= 1/pi { (-cos((k+1)x)-1)/(k+1)) - (-cos((k-1)x)-1)/(k-1)) }

Is this even close?
It looks close. I think you are missing a ##1/2## you got when you subtracted. So you still have to push it through and see if you get the right answer. Put in the limits (carefully) and simplify your answer. Also note that that formula doesn't work if ##k=1## so you will have to work that separately, but it's easy. Once you have the formulas we can talk about why some of them are zero.
 
  • #10
LCKurtz said:
It looks close. I think you are missing a ##1/2## you got when you subtracted. So you still have to push it through and see if you get the right answer. Put in the limits (carefully) and simplify your answer. Also note that that formula doesn't work if ##k=1## so you will have to work that separately, but it's easy. Once you have the formulas we can talk about why some of them are zero.
The last line has the limits put in but I don't know where to go from there
EDIT: Just realized I put 'x's in instead of 'pi's

So, it should be:
= 1/pi { (-cos((k+1)pi)-1)/(k+1)) - (-cos((k-1)pi)-1)/(k-1)) }
 
  • #11
LCKurtz said:
It looks close. I think you are missing a ##1/2## you got when you subtracted. So you still have to push it through and see if you get the right answer. Put in the limits (carefully) and simplify your answer. Also note that that formula doesn't work if ##k=1## so you will have to work that separately, but it's easy. Once you have the formulas we can talk about why some of them are zero.
Not sure what I've done actually
 
  • #12
CGM said:
The last line has the limits put in but I don't know where to go from there
EDIT: Just realized I put 'x's in instead of 'pi's

So, it should be:
= 1/pi { (-cos((k+1)pi)-1)/(k+1)) - (-cos((k-1)pi)-1)/(k-1)) }
So keep going. I still think you dropped a 1/2, but now you need to simplify that. Remember ##\cos(n\pi) = (-1)^n## so there are lots of ##\pm 1##'s in there. Don't stop now...simplify it and go for the answer.
 
  • #13
LCKurtz said:
So keep going. I still think you dropped a 1/2, but now you need to simplify that. Remember ##\cos(n\pi) = (-1)^n## so there are lots of ##\pm 1##'s in there. Don't stop now...simplify it and go for the answer.
I can't find the 1/2 and I can't figure out how to simplify it even with cos(kpi) = (-1)k substituted in

= 1/pi { [ (-(-1)k+1 - 1)/(k+1) ] - [ (-(-1)k-1 - 1)/(k-1) ] }
 
  • #14
LCKurtz said:
So keep going. I still think you dropped a 1/2, but now you need to simplify that. Remember ##\cos(n\pi) = (-1)^n## so there are lots of ##\pm 1##'s in there. Don't stop now...simplify it and go for the answer.
Subbing in k to be an even number:
= 1/pi { -2/k+1 + 2/k-1 }
= 2/pi { -1/k+1 + 1/k-1 }
= -2/pi(k2-1)
Got it I think

EDIT: I see now where I lost the half so I don't know how I've ended up with the right answer
 
Last edited:
  • #15
CGM said:
Subbing in k to be an even number:
= 1/pi { -2/(k+1) + 2/(k-1) }
= 2/pi { -1/k+1 + 1/k-1 }
= -2/pi(k2-1)
Got it I think

EDIT: I see now where I lost the half so I don't know how I've ended up with the right answer

Just luck. You need parentheses in there and to handle them correctly.
 
Back
Top