Results 1 to 4 of 4

Thread: Fourier series of step function

  1. #1
    Newbie
    Joined
    Nov 2009
    Posts
    10

    Fourier series of step function

    Hiya,

    I'm having a bit of trouble figuing out the fourier series for a function f(x) defined as 1 if 0 < x < pi, -1 if -pi < x < 0.

    The problem I'm having is that $\displaystyle \int$ f(x) dx from -pi to pi equals 0, therefore all of the fourier coefficients are 0. Am I doing something wrong?

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by CorruptioN View Post
    Hiya,

    I'm having a bit of trouble figuing out the fourier series for a function f(x) defined as 1 if 0 < x < pi, -1 if -pi < x < 0.

    The problem I'm having is that $\displaystyle \int$ f(x) dx from -pi to pi equals 0, therefore all of the fourier coefficients are 0. Am I doing something wrong?

    Thanks
    The "therefore" is wrong the conclusion does not follow from your premiss. You have shown that $\displaystyle a_0$ is zero, and as the function is odd all of the $\displaystyle a$'s are zero, but the $\displaystyle b $'s are non-zero. Write out the integral for $\displaystyle b_1$ and see.

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Senior Member DeMath's Avatar
    Joined
    Nov 2008
    From
    Moscow
    Posts
    474
    Thanks
    5
    Quote Originally Posted by CorruptioN View Post
    Hiya,

    I'm having a bit of trouble figuing out the fourier series for a function f(x) defined as 1 if 0 < x < pi, -1 if -pi < x < 0.

    The problem I'm having is that $\displaystyle \int$ f(x) dx from -pi to pi equals 0, therefore all of the fourier coefficients are 0. Am I doing something wrong?

    Thanks
    $\displaystyle f(x) = \begin{cases}
    -1, & \mbox{if}~~ -\pi < x < 0 \\
    1, & \mbox{if}~~~~~~ 0 < x < \pi
    \end{cases}$

    You have an odd function, so you need to find only $\displaystyle b_n$.

    $\displaystyle b_n = -\frac{1}{\pi}\int\limits_{-\pi}^0 \sin nx\,dx + \frac{1}{\pi}\int\limits_0^\pi \sin nx\,dx = \frac{2}{\pi}\int\limits_0^\pi \sin nx\,dx =$

    $\displaystyle = \left. {-\frac{2}{\pi n}\cos nx} \right|_0^\pi = \frac{2}{\pi}\frac{1-(-1)^n}{n} = \begin{cases}
    0, & \mbox{if} \quad n~~\text{is}~~\text{even} \\
    \dfrac{4}{\pi}\dfrac{1}{2n-1}, & \mbox{if} \quad n~~\text{is}~~\text{odd}\end{cases}$

    Finally you have

    $\displaystyle f(x) = \frac{4}{\pi}\sum\limits_{n=1}^\infty \frac{\sin\bigl[(2n-1) x\bigl]}{2n-1},~~ - \pi < x < \pi .$
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Nov 2009
    Posts
    10
    Thank you DeMath! I had just reached the same answer myself, but attempts to plot the function were failing, so I thought I had done something wrong I was about to scrap what I had and start again before you came along!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: May 23rd 2011, 08:46 AM
  2. Fourier series of a box function.
    Posted in the Differential Geometry Forum
    Replies: 8
    Last Post: Oct 26th 2010, 04:08 AM
  3. [SOLVED] Show the Fourier series of a function
    Posted in the Differential Geometry Forum
    Replies: 5
    Last Post: Aug 20th 2010, 03:34 AM
  4. Fourier series of a function
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: Jul 27th 2010, 09:33 AM
  5. Fourier Series of odd function
    Posted in the Differential Geometry Forum
    Replies: 4
    Last Post: Aug 15th 2009, 11:39 AM

Search tags for this page

Search Tags


/mathhelpforum @mathhelpforum