Fourier Series Homework (Discontinuous Function)

In summary, the conversation is about using Fourier's theorem for a discontinuous function and finding the value of a0. The person asking the question made a mistake in their calculations and their tutor suggested using trigonometric identities to make the integration easier. The conversation then continues with the discussion of how to simplify the formula and get the correct answer.
  • #1
CGM
16
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: 530
Physics news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
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
 
  • #5
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.
 
  • #6
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
 
  • #7
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?
 
  • #8
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?
 
  • #9
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.
 

Related to Fourier Series Homework (Discontinuous Function)

1. What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sine and cosine functions. It is used to approximate a function over a given interval by breaking it down into simpler trigonometric functions.

2. What is a discontinuous function?

A discontinuous function is a function that has at least one point where the function is not continuous. This means that the function has a break, jump, or hole in its graph.

3. How are Fourier series used to approximate discontinuous functions?

Fourier series use a combination of sine and cosine functions to approximate a discontinuous function by minimizing the difference between the two functions. The more terms included in the series, the more accurate the approximation will be.

4. What is the Gibbs phenomenon in Fourier series?

The Gibbs phenomenon is a phenomenon that occurs when approximating a discontinuous function using a Fourier series. It refers to the overshoot and oscillations that occur near the discontinuity, even when the number of terms in the series is increased.

5. How can the convergence of a Fourier series be tested for a discontinuous function?

The convergence of a Fourier series for a discontinuous function can be tested using the Dirichlet conditions, which state that the function must be piecewise continuous and have a finite number of discontinuities within a given interval. Additionally, the series can be tested numerically by increasing the number of terms and observing if the approximation improves.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
368
  • Calculus and Beyond Homework Help
Replies
3
Views
417
  • Calculus and Beyond Homework Help
Replies
4
Views
392
  • Calculus and Beyond Homework Help
Replies
16
Views
621
  • Calculus and Beyond Homework Help
Replies
1
Views
329
  • Calculus and Beyond Homework Help
Replies
1
Views
293
  • Calculus and Beyond Homework Help
Replies
6
Views
453
  • Calculus and Beyond Homework Help
Replies
6
Views
941
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
20
Views
1K
Back
Top