Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Fourier Series problem - help craved

  • 12-04-2011 9:51am
    #1
    Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭


    Hi guys. Just doing a bit of Fourier Series there, and having problems getting correct answers. If anyone could help, I'd seriously love them.

    I'm considering the piecewise function
    [LATEX]\displaystyle f(x) = -\pi, 0<x</pi[/LATEX]
    [LATEX]\displaystyle f(x) = x-\pi, \pi<x<2\pi[/LATEX]

    We want to evaluate the Fourier series at [LATEX]\displaystyle f(\pi) = 0[/LATEX] in order to derive the identity
    [LATEX]\displaystyle \sum_{m=0}^{\infty} \frac{1}{(2m+1)^2}= \frac{\pi^2}{8}[/LATEX]

    The Fourier Series is given by
    [LATEX]\displaystyle S(x) = \frac{1}{2}a_{0}+\sum_{n=1}^{\infty}\left(
    a_{n}\cos(n x) + b_{n} sin(n x)
    \right)[/LATEX]

    The Sin part of the Fourier series is not important, as we need to evaluate the series at x=pi, and all the Sin terms will disappear as Sin(n pi)=0 for all n in the natural numbers.

    I got the co-efficients by hand, and verified with Mathematica:

    [LATEX]\displaystyle a_{0} = \int_{0}^{2\pi} f(x) dx = \frac{-\pi^2}{2} [/LATEX]

    [LATEX]\displaystyle a_{n} = \int_{0}^{2\pi} f(x) \cos(n x) dx[/LATEX]

    [LATEX]\displaystyle a_{n} = \int_{0}^{\pi} -\pi \cos(nx)dx +
    \int_{\pi}^{2\pi} x \cos(nx)dx +
    \int_{\pi}^{2\pi} -\pi \cos(nx)dx
    [/LATEX]

    The first and third intergrals are 0, so

    [LATEX]\displaystyle a_{n} = \int_{\pi}^{2\pi} x \cos(nx)dx[/LATEX]

    [LATEX]\displaystyle a_{n} = \left[ \frac{x \sin(nx)}{n} +\frac{\cos(nx)}{n^2} \right]_{\pi}^{2\pi}[/LATEX]

    [LATEX]\displaystyle a_{n} = \frac{\cos{2\pi n}-cos{\pi n}}{n^2}[/LATEX]

    [LATEX]\displaystyle a_{n} = \frac{1-(-1)^n}{n^2}[/LATEX]

    as n is a natural number.

    The Cosine Fourier Series is thus

    [LATEX]\displaystyle S(x) = \frac{1}{2}\frac{-\pi^2}{2}+\sum_{n=1}^{\infty}\frac{1-(-1)^n}{n^2}\cos(n x) [/LATEX]

    For n even, the terms disapear, so

    [LATEX]\displaystyle S(x) = \frac{1}{2}\frac{-\pi^2}{2}+\sum_{m=0}^{\infty}\frac{1--1}{(2m+1)^2}\cos((2m+1) x) [/LATEX]`

    [LATEX]\displaystyle S(x) = \frac{-\pi^2}{4}+\sum_{m=0}^{\infty}\frac{2}{(2m+1)^2}\cos((2m+1) x) [/LATEX]

    Let x=pi. Then Cos((2m+1)pi) = -1, so

    [LATEX]\displaystyle S(\pi) = \frac{-\pi^2}{4}+\sum_{m=0}^{\infty}\frac{2}{(2m+1)^2}(-1) =0[/LATEX]

    [LATEX]\displaystyle \sum_{m=0}^{\infty}\frac{-2}{(2m+1)^2} = \frac{\pi^2}{4}[/LATEX]

    [LATEX]\displaystyle \sum_{m=0}^{\infty}\frac{1}{(2m+1)^2} = \frac{-\pi^2}{8}[/LATEX]

    Which is obviously a silly answer: the left is positive; the right is negative. Can anyone tell me where I'm going wrong?


Comments

  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭Eliot Rosewater


    Okay, I'm an idiot. (This isn't the first time I've replied to one of my own threads here with that!)

    I made two mistakes, the second partly stemming from the first.

    For my Fourier co-efficients I wasn't multiplying by 1/pi. So my series should have been:

    [LATEX]\displaystyle S(x) = \frac{1}{\pi}\left( \frac{-\pi^2}{4}+\sum_{m=0}^{\infty}\frac{2}{(2m+1)^2}\cos((2m+1) x) \right) [/LATEX]

    Because I was getting a pi squared for the first term (whereas, by the correction above, I should have gotten just pi) I took f(x) to be 0 at x=pi, so that the term coming over would be pi squared. Silly assumption. The actual convergance forumula is

    [LATEX]\displaystyle S(\pi)=\frac{1}{2}\left(\lim_{x \to \pi^{+}}f(x) + \lim_{x \to \pi^{-}}f(x) \right)[/LATEX]

    In this particular case,
    [LATEX]\displaystyle S(\pi)=\frac{1}{2}\left( (-\pi) + (x -\pi) \right)[/LATEX]

    [LATEX]\displaystyle S(\pi)=\frac{1}{2}\left( -\pi \right)[/LATEX]

    And thus:

    [LATEX]\displaystyle \frac{1}{\pi}\left( \frac{-\pi^2}{4}+\sum_{m=0}^{\infty}\frac{2}{(2m+1)^2}\cos((2m+1) \pi) \right) = \frac{1}{2}(-\pi)[/LATEX]

    [LATEX]\displaystyle \sum_{m=0}^{\infty}\frac{2}{(2m+1)^2}(-1) = \frac{-\pi^2}{2}+\frac{\pi^2}{4}[/LATEX]

    [LATEX]\displaystyle \sum_{m=0}^{\infty}\frac{-2}{(2m+1)^2}= \frac{-\pi^2}{4}[/LATEX]

    [LATEX]\displaystyle \sum_{m=0}^{\infty}\frac{1}{(2m+1)^2}= \frac{\pi^2}{8}[/LATEX]

    As required. Phew.


  • Moderators, Science, Health & Environment Moderators Posts: 1,852 Mod ✭✭✭✭Michael Collins


    Thanks for the resolution Eliot.

    For anyone else watching this is a perfect example of how people should ask a question in my opinion.

    And if you answer it yourself, all the better...:D


Advertisement