# Fourier Series

1. Aug 3, 2016

### teme92

1. The problem statement, all variables and given/known data
I'm calculating the coefficients for the Fourier series and I got to part where I can't simplify an any further but I know I have to.

$$a_n = \frac{1}{2π}\Big[\frac{cos(n-1)π}{n-1}-\frac{cos(n+1)π}{n+1}-\frac{1}{n-1}+\frac{1}{n+1}\Big]$$

2. Relevant equations

3. The attempt at a solution
I have found an example where the above line goes straight to:

$$a_n=-\frac{1}{2π}(1+(-1)^n)\frac{2}{(n-1)(n+1)}$$

I don't know how you get from one line to the next. If anyone could explain this to me, it would be greatly appreciated.

2. Aug 3, 2016

### Orodruin

Staff Emeritus
What is $\cos(n\pi)$?

3. Aug 3, 2016

### teme92

-1 for n = odd and 1 for n = even.

4. Aug 3, 2016

### Orodruin

Staff Emeritus
So how can you write this on a more concise form?

5. Aug 3, 2016

### teme92

$$(-1)^n$$

6. Aug 3, 2016

### Orodruin

Staff Emeritus
So how can you apply this to your problem?

7. Aug 3, 2016

### teme92

I've tried subbing (-1)n in for both of the cos parts but it doesn't simply to what is given.

8. Aug 3, 2016

### Ray Vickson

Yes it does; start again.

9. Aug 3, 2016

### teme92

When I sub in and simplify I'm getting:

$$a_n = \frac{1}{2π}\Big[\frac{(-1)^n + (-1)^n}{(n-1)(n+1)}\Big]$$

Last edited: Aug 3, 2016
10. Aug 3, 2016

### Orodruin

Staff Emeritus
Observe that you have $\cos[(n-1)\pi]$ and that you have some other terms too.

11. Aug 3, 2016

### teme92

$$a_n = \frac{1}{2π}\Big[\frac{(-1)^n}{n-1}-\frac{(-1)^n}{n+1}-\frac{1}{n-1}+\frac{1}{n+1}\Big]$$

Is this correct?

12. Aug 3, 2016

### Orodruin

Staff Emeritus
Why don't you try inserting a few values to check?

13. Aug 3, 2016

### teme92

What would I be checking for?

14. Aug 3, 2016

### Orodruin

Staff Emeritus
That the values that come out of your formula agree with the original expression.

15. Aug 3, 2016

### teme92

If I put integers in for n will the result not be a single number?

16. Aug 3, 2016

### Orodruin

Staff Emeritus
Yes, but it will be different for different n of course. I said "inserting a few values".

17. Aug 3, 2016

### teme92

$$n=0: a_n = 0$$

$$n=1: a_n = \frac{1}{2π}$$(has zero dividers though)

$$n=2: a_n = \frac{1}{12π}$$

18. Aug 3, 2016

### Orodruin

Staff Emeritus
And if you use the same values in the original expression?

19. Aug 3, 2016

### teme92

But do I not want there to be n's in my result?

20. Aug 4, 2016

### Orodruin

Staff Emeritus
Yes. But you want to check that you got the right result first. You asked:
If there is any n for which your new expression does not equal the old, then it is not correct.