1. Mar 19, 2006

### bobese

i'm new here so i didn't really know where to post this but i've been trying to solve the fourier series for the following function for ages but have failed miserably on several occasions:

f(x) = 1 ; when -10 ≤ x < -5
f(x) = 0 ; when -5 ≤ x < 5
f(x) = -1 ; when 5 ≤ x < 10

The function appears to be odd when sketched so therefore only the sine coefficients exist which i found to be:

bn = [2/n(pi)]*[cos (n(pi)) - cos (0.5n(pi))]

This then gave the following results using a substitution of 10/2 instead of x in the sin parts multiplied by the corresponding bn coefficient:

f(x) = -[2/(pi)]*[1 - 1/3 + 1/5 - 1/7 ...]

That is then supposed to be used to find the following expression for pi:
pi = 4*(1 - 1/3 + 1/5 - 1/7 ...)

However, with my results i found the following:
pi = 2*(1 - 1/3 + 1/5 - 1/7 ...)

Can any one help pinpoint my mistake please :(?

any help would be highly appreciated.

2. Mar 20, 2006

### Galileo

At x=5 the function f is discontinuous. Do you know where a Fourier series of f converges to at a point discontinuity?

3. Mar 20, 2006

### bobese

unfortunately i do not ... i never was any good with anything to do with fourier series :(

4. Mar 20, 2006

### Galileo

I wouldn't say that. You computed the series perfectly. It's a little technical matter:
You substituted x=10/2 in the series and in the function and equated the two. In this case f(5)=-1. However, it should be obvious that if the function was -1 for 5<x<=10 and 0 for -5 ≤ x ≤ 5 it would give the same Fourier series, but now f(5)=0.

If the function f is continuous at, then its Fourier series converges pointwise to f, but if there is a point discontinuity this is not the case. In general the fourier series converges to $$\frac{f(x^+)+f(x^-)}{2}$$. So in this case, at x=5 the series converges not to 0 or -1, but -1/2 which gives your factor of 2.

Last edited: Mar 20, 2006
5. Mar 20, 2006

### bobese

Thank you very much for that :)

6. Mar 21, 2006

### bobese

umm ... sorry to bother once again but when using parseval's theorem to calculate the coefficient alpha in front of pi squared for:

the formula i was taught is:

(since the other terms are zero as a result of the odd function)

however, was not taught how to apply... do i just take the equation of pi found above and just square both sides then arrange for pi squared? if so the answer i got was 1/16 for the coefficient which i hope is correct it seems quite reasonable to do that since the bn terms are exactly the same as the the expression inside the sigma ... i'm not sure it's the limits of the left hand side of the second equation that has me confused since f(x) takes different values between the interval and im not quite sure what to do with that

Last edited by a moderator: Jan 9, 2014