# Fourier series problem (again)

1. Sep 19, 2004

### broegger

Can anyone help me with this?

Show that

$$\sum_{n=1}^{\infty}(-1)^{n+1}\frac{\cos{nx}}{n^2} = \frac{\pi^2-3x^2}{12} \quad , \quad x \in [-\pi,\pi].$$

I have tried writing the right-side expression as a Fourier series, but it leads nowhere. What should I do?

2. Sep 19, 2004

### matt grime

I'd redo the fourier series attempt in terms of sin's and cos's rather than exp{inx}.

writing f for the function on the right hanf side, obviously the coeffs of sin are zero since it is an even function, so you just need to do the integral of f(x)cos(nx) which looks not difficult, though I admit i've not tried to do it.

strictly speaking that doesn't prove equality, but it proves it well enough for most uses.

3. Sep 19, 2004

### TenaliRaman

find fourier series of f(x)=x^2

-- AI

4. Sep 19, 2004

### broegger

matt grime>> We're supposed to do it in terms of exp{inx} and I'm stuck :(

5. Sep 20, 2004

### broegger

I've found out... As TenaliRaman suggested it was easiest just to find the Fourier series of f(x)=x^2 and then use Eulers formula cos(nx) = 1/2(e^(inx)+e^(-inx)... thanks!

6. Sep 20, 2004

### matt grime

But doing it in terms of sins and cosines is the same as doing it in terms of exponentials.

Fourier series aren't immutable, if you've got some constraint then tell us. Also if you must use fourier series involving exp, then why did you post a question asking for other ways of doing it?

7. Sep 20, 2004

### broegger

I'm new to the subject and I was unsure how to solve these kind of problems.. I'm aware that the two approaches involving {sin,cos} or {exp} are equivalent, only I think that the exp-approach is the nicest and most general and it is always possible to find a {sin,cos}-series from an {exp}-series using Eulers formula

8. Sep 20, 2004

### matt grime

But, as you've found out, calculating the exp version seems harder than the sin and cosine (no nasty complex integration to do). Perhaps that is why applied courses tend to teach cos and sine, and pure courses do it in terms of exponentials, the preferred way of thinking about these in terms of functional analytic ways.

Remember that it's possible to go from sin and cos to exp just as easily as going the other way round. They are exactly the same, one is not more general than the other at all.

9. Sep 20, 2004

### broegger

well, I think it's fair to say that the exp-way is more general since it applies to complex-valued functions as well as real-valued functions.. is that incorrect?

10. Sep 21, 2004

### metacristi

It's interesting to note here that from $$\sum_{n=1}^{\infty}(-1)^{n+1}\frac{\cos{nx}}{n^2} = \frac{\pi^2-3x^2}{12} \quad , \quad x \in [-\pi,\pi].$$ by putting x= π we obtain the sum of the much more encountered in practice infinite series:

S=∑from k=1 to ∞ 1/k2 = π2/6

As regarding the initial series another solution I see,in principle,is to derive the series term by term two times and then write conveniently the sum in (-1)k+1cos(kx) obtained.After finding also the sum of cosinuses which appear,that is obtaining a closed form in 'x' and 'n' for n=even and n=odd all that remains is to integrate two times the result(s) and take the limit for n -> ∞ for the two cases (n=odd and n=even).The limit should be the same.As I said this only in principle,from what I see at first sight we run here in a lot of complications,but apart from being tenuous this method should work.[Anyway] it is worth mentioning it;it could prove very helpful in other cases.

Last edited: Sep 21, 2004
11. Sep 21, 2004

### matt grime

yes, that is incorrect.

12. Sep 21, 2004

### broegger

ok, thanks for enligthening me

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