# Homework Help: Fourier Series Homework (Discontinuous Function)

Tags:
1. Feb 26, 2015

### CGM

1. The problem statement, all variables and given/known data
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.

#### Attached Files:

• ###### Screen Shot 2015-02-26 at 21.35.06.png
File size:
9.2 KB
Views:
118
2. Feb 26, 2015

### LCKurtz

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. Feb 26, 2015

### CGM

4. Feb 26, 2015

### CGM

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. Feb 26, 2015

### LCKurtz

So the nonzero part is $\frac 1 \pi (-\cos x|_0^\pi)$. Be more careful with evaluating that and watch your signs.

6. Feb 26, 2015

### CGM

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. Feb 26, 2015

### LCKurtz

What happens if you add the two identities your tutor suggested?
[Edit:] Or maybe subtract them?

8. Feb 26, 2015

### CGM

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. Feb 26, 2015

### LCKurtz

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. Feb 26, 2015

### CGM

The last line has the limits put in but I don't know where to go from there
EDIT: Just realised 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. Feb 26, 2015

### CGM

Not sure what I've done actually

12. Feb 26, 2015

### LCKurtz

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. Feb 26, 2015

### CGM

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. Feb 26, 2015

### CGM

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: Feb 26, 2015
15. Feb 26, 2015

### LCKurtz

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

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted