Join TSR now and get all your revision questions answeredSign up now
    • Thread Starter
    Offline

    0
    ReputationRep:
    Hi,

    I'm having trouble with a fourier series question and was wondering if anyone could help.

    basically we have to expand the periodic function f(x) in a sine-cosine fourier series where:

    f(x) = 0 between -\pi and  0
    f(x) = 1 between  0 and  \frac{\pi}{2}
    f(x) = 0 between  \frac{\pi}{2} and  \pi

    and f(x) has a period of 2\pi

    Our lecturer gives the answer as:
     f(x) = \frac{1}{4} + \frac{1}{\pi}[\frac{cos(x)}{1} - \frac{cos(3x)}{3} + \frac{cos(5x)}{5} + ...] + \frac{1}{\pi}[\frac{sin(x)}{1} + \frac{2sin(2x)}{2}+\frac{sin(3x)  }{3} +\frac{sin(5x)}{5} +...]

    I managed to sketch the function and get the first half right (the 1/4 term and the cos terms), but I can't figure out how to get those sin terms.

    I used  b_{n} = \int f(x) sin(nx) dx between pi and minus pi. Did 3 seperate integrals, 2 of which are 0 so got:

     b_{n} = \frac{1}{\pi} \frac{-cos(\frac{n\pi}{2})}{n}

    substituting in n = 1,2,3,4,5,6
    all the odd terms = 0
     b_{2} = \frac{1}{2} \pi
     b_{4} = \frac{-1}{4} \pi
     b_{6} = \frac{1}{6} \pi

    so end up with my answer as:
     f(x) = \frac{1}{4} + \frac{1}{\pi}[\frac{cos(x)}{1} - \frac{cos(3x)}{3} + \frac{cos(5x)}{5} + ...] + \frac{1}{\pi}[\frac{sin(2x)}{2} - \frac{sin(4x)}{4}+\frac{sin(6x)}  {6}+...]

    Does anyone know where I've gone wrong, or how to get from my answer to the one he's given?

    Any help would be much appreciated
    Offline

    0
    ReputationRep:
    I have no idea but I thought I'd bump your post in case anyone does since you posted it in the middle of the night
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by Slothzilla)
    I have no idea but I thought I'd bump your post in case anyone does since you posted it in the middle of the night
    Haha thanks
    • Study Helper
    Offline

    21
    ReputationRep:
    Are you a maths or engineering student?

    You have not gone wrong.

    As you say all the odd terms are zero. This is a rectangular pulse time shifted and the series is convergent.

    Your lecturer seems to have a copying error or it could be he's trying to see if students are awake!

    Either way the 2sin2x/2 is incorrect (shouldn't be there) as are the signs, which should alternate +/- in that part of the expansion. The cosine terms should all be odd (alternating signs) and the sine terms are all even.

    Here's a great site for some real insights into signal processing:

    http://www.fourier-series.com/f-transform/index.html
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by uberteknik)
    You have not gone wrong.

    As you say all the odd terms are zero. This is a rectangular pulse time shifted and the series is convergent.

    Your lecturer seems to have a copying error or it could be he's trying to see if students are awake!

    Either way the 2sin2x/2 is incorrect as are the sign terms in that part of the expansion.

    Here's a great site for some real insights into signal processing.
    I have, figured it out now though! when I subsituted the limits into my integral I forgot that cos(0) = 1 (I'm so used to just taking the upper limit as the integral when the lower limit is 0, I blame tiredness...). so I end up with  b_{n} = \frac{1}{\pi}(\frac{-cos(\frac{n\pi}{2})}{n} + \frac{1}{n} ) instead of what I put in the OP. The 1/n term ends up making my result the same as the answer he gave

    Thanks for the site, seems like it could be pretty helpful!
    • Study Helper
    Offline

    21
    ReputationRep:
    Ha ha. Well done!
 
 
 
Poll
Which Fantasy Franchise is the best?
Useful resources

Make your revision easier

Maths

Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

Equations

How to use LaTex

Writing equations the easy way

Student revising

Study habits of A* students

Top tips from students who have already aced their exams

Study Planner

Create your own Study Planner

Never miss a deadline again

Polling station sign

Thinking about a maths degree?

Chat with other maths applicants

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Quick reply
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.