Results 1 to 15 of 15

Thread: Fourier Series help

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    17

    Fourier Series help

    Hi,

    Need help with the following question:

    f(t) = t - 1, 1<t<2
    with an even half range expansion, and f(t)=f(t+4)

    Now, I have to sketch this between -6 and 6. Is an "even extension" the same as "even half range expansion"?
    If I am to sketch this would it be
    a t-1 line from 1<t<2 and 4<t<5
    a -t-1 line from -1<t<-2 and -4<t<-5
    and 0 elsewhere in -6<t<6
    ???
    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 hashi View Post
    Hi,

    Need help with the following question:

    f(t) = t - 1, 1<t<2
    with an even half range expansion, and f(t)=f(t+4)

    Now, I have to sketch this between -6 and 6. Is an "even extension" the same as "even half range expansion"?
    If I am to sketch this would it be
    a t-1 line from 1<t<2 and 4<t<5
    a -t-1 line from -1<t<-2 and -4<t<-5
    and 0 elsewhere in -6<t<6
    ???
    As the function has period 4, it needs to be defined on a larger interval than (1,2), is it supposed to be zero on (0,1)??

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2008
    Posts
    17
    nope.. it's supposed to be 1 to 2
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by hashi View Post
    nope.. it's supposed to be 1 to 2
    Then there is not enough information to do anything with a periodic function of period 4, the function needs to be defined over a whole period, which allowing for even symmetry still requires it be defined on an interval of length 2.

    CB
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Sep 2008
    Posts
    17
    actually, yes i am pretty sure it's supposed to be zero elsewhere..
    now what/
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by hashi View Post
    actually, yes i am pretty sure it's supposed to be zero elsewhere..
    now what/
    OK so now we have the function:

    $\displaystyle f(x)= \begin{cases} 0,\ \ \ \ \ \ \ 0\le x <1 \\ t-1,\ \ 1 \le x \le 2 \end{cases}$

    Which we extend symmetricaly to the range $\displaystyle -2 \le x \le 2$, to get:


    $\displaystyle f(x)= \begin{cases} -t-1, \ \ -2 \le x \le -1 \\
    0, \ \ \ \ \ \ \ \ \ -1 < x < 1 \\
    t-1,\ \ \ \ \ \ \ 1 \le x \le 2
    \end{cases}
    $

    CB
    Last edited by CaptainBlack; Oct 19th 2008 at 10:27 AM.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Sep 2008
    Posts
    17
    Sorry, how did you get f(x) = 1 between 1 and 2 when the function is
    f(t)=t-1?


    Also, since we are sketching over a domain -6<t<6 would it be...
    Now, I have to sketch this between -6 and 6. Is an "even extension" the same as "even half range expansion"?
    If I am to sketch this would it be
    a t-1 line from 1<t<2 and 4<t<5
    a -t-1 line from -1<t<-2 and -4<t<-5
    and 0 elsewhere in -6<t<6
    ???
    (what i said before?)

    thanks
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Hey guys. This is what I think it is. Hope I don't cause confusion:

    $\displaystyle f(x)=\left\{\begin{array}{cc}
    -t-5 & -6\leq t \leq -5 \\
    -t-1 & -2\leq t\leq -1 \\
    t-1 & 1\leq t\leq 2 \\
    t-5 & 5\leq t \leq 6 \\
    0 & \text{otherwise}
    \end{array}\right.
    $

    I've plotted $\displaystyle f(x)$ and the first 50 terms of it's Fourier series superimposed over it in the plot below. If that's the function you're working with and need help figuring it's Fourier series, I can post my calculations.
    Attached Thumbnails Attached Thumbnails Fourier Series help-fourier2.jpg  
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by hashi View Post
    Sorry, how did you get f(x) = 1 between 1 and 2 when the function is
    f(t)=t-1?


    Also, since we are sketching over a domain -6<t<6 would it be...
    Now, I have to sketch this between -6 and 6. Is an "even extension" the same as "even half range expansion"?
    If I am to sketch this would it be
    a t-1 line from 1<t<2 and 4<t<5
    a -t-1 line from -1<t<-2 and -4<t<-5
    and 0 elsewhere in -6<t<6
    ???
    (what i said before?)

    thanks
    by misremembering what the function was (since I was not looking at it at the time) fixed now.

    CB
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by shawsend View Post
    Hey guys. This is what I think it is. Hope I don't cause confusion:

    $\displaystyle f(x)=\left\{\begin{array}{cc}
    -t-5 & -6\leq t \leq -5 \\
    -t-1 & -2\leq t\leq -1 \\
    t-1 & 1\leq t\leq 2 \\
    t-5 & 5\leq t \leq 6 \\
    0 & \text{otherwise}
    \end{array}\right.
    $

    I've plotted $\displaystyle f(x)$ and the first 50 terms of it's Fourier series superimposed over it in the plot below. If that's the function you're working with and need help figuring it's Fourier series, I can post my calculations.
    Your diagram does not show a function with period 4.

    CB
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    5
    Quote Originally Posted by hashi View Post
    Sorry, how did you get f(x) = 1 between 1 and 2 when the function is
    f(t)=t-1?


    Also, since we are sketching over a domain -6<t<6 would it be...
    Now, I have to sketch this between -6 and 6. Is an "even extension" the same as "even half range expansion"?
    If I am to sketch this would it be
    a t-1 line from 1<t<2 and 4<t<5
    a -t-1 line from -1<t<-2 and -4<t<-5
    and 0 elsewhere in -6<t<6
    ???
    (what i said before?)

    thanks
    Remember we have an even period 4 function so the plot outside the fundmental period is obtained by a periodic extension.

    CB
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Sep 2008
    Posts
    17
    hey shawsend.. how do you just plot f(x) and it's even half range expansion?

    Thanks
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Well, I wasn't planning on saying anything further since I got it wrong above and I'm not familiar with the phrase "even half extension", but since you asked, I think it's the function:

    $\displaystyle f(x)=\left\{\begin{array}{cc}
    -t-5 & -6\leq t \leq -5 \\
    t+3 & -3\leq t\leq -2 \\
    -t-1 & -2\leq t\leq -1 \\
    t-1 & 1\leq t\leq 2 \\
    -t+3 & 2\leq t \leq 3 \\
    t-5 & 5\leq t \leq 6 \\
    0 & \text{otherwise}
    \end{array}\right.
    $

    That's the plot below and I used the following Mathematica code with the "Which" operator to plot it:

    Code:
    f[t_] := Which[-6 <= t <= -5, -t - 5, -3 <= t <= -2, t + 3, 
        -2 <= t <= -1, -t - 1, 1 <= t <= 2, t - 1, 2 <= t <= 3, -t + 3, 
        5 <= t <= 6, t - 5]; 
    Plot[f[x], {x, -6, 6}]
    Now the Fourier series for the function is easy to calculate:

    Let $\displaystyle T=\text{Abs}(-6-6), \omega_n=\frac{2\pi n}{T}$

    and:

    $\displaystyle \text{F.S}\; f(x)=\frac{a_0}{2}+\sum_{n=1}^{\infty}a_n\cos(\ome ga t)+b_n\sin(\omega t)$

    with:

    $\displaystyle a_n=\frac{2}{T}\int_{-6}^{6} f(t)\cos(\omega_n t)dt$

    $\displaystyle b_n=\frac{2}{T}\int_{-6}^{6} f(t)\sin(\omega_n t)dt$

    And if Captain Black reprimands me again for getting it wrong it's your fault.
    Attached Thumbnails Attached Thumbnails Fourier Series help-plot12.jpg  
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Newbie
    Joined
    May 2007
    Posts
    6
    shawsend, I have a similar problem to the one the OP has. Can you explain how to get a plot of the fourier approx in matlab?

    anyone?
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Super Member
    Joined
    Aug 2008
    Posts
    903
    I don't use Matlab. But the principle is the same: calculate the coefficients, say 25 or so, put them all together in the Fourier sum as a function, then plot the results. The following is my Mathematica code. You can probably easily convert it to Matlab code assuming Matlab can handle the conditional function definition.

    Code:
    f[t_] := Which[-6 <= t <= -5, -t - 5, -3 <= t <= -2, t + 3, 
        -2 <= t <= -1, -t - 1, 1 <= t <= 2, t - 1, 2 <= t <= 3, 
        -t + 3, 5 <= t <= 6, t - 5, -5 <= t <= -3, 0, -1 <= t <= 1, 
        0, 3 <= t <= 5, 0]; 
    fplot = Plot[f[x], {x, -6, 6}]; 
    a0 = NIntegrate[f[t], {t, -6, 6}]; 
    a = Table[(1/6)*NIntegrate[f[t]*Cos[((Pi*n)/6)*t], {t, -6, 6}], 
        {n, 1, 25}]; 
    b = Table[(1/6)*NIntegrate[f[t]*Sin[((Pi*n)/6)*t], {t, -6, 6}], 
        {n, 1, 25}]; 
    fs[x_] := N[a0/12 + Sum[a[[n]]*Cos[Pi*(n/6)*x] + 
           b[[n]]*Sin[Pi*(n/6)*x], {n, 1, 25}]]; 
    fsplot = Plot[fs[x], {x, -6, 6}, PlotStyle -> Red]; 
    Show[{fplot, fsplot}]
    Attached Thumbnails Attached Thumbnails Fourier Series help-fourier-plot.jpg  
    Last edited by shawsend; Oct 27th 2008 at 11:04 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Fourier series to calculate an infinite series
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: Aug 4th 2010, 01:49 PM
  2. Complex Fourier Series & Full Fourier Series
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Dec 9th 2009, 05:39 AM
  3. Fourier Series
    Posted in the Calculus Forum
    Replies: 4
    Last Post: Mar 15th 2009, 09:30 AM
  4. Fourier series
    Posted in the Calculus Forum
    Replies: 7
    Last Post: Dec 9th 2008, 09:51 PM
  5. from fourier transform to fourier series
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Feb 1st 2008, 06:35 AM

Search Tags


/mathhelpforum @mathhelpforum