Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving the Wave Eqt Using Fourier Series- please help!

  1. Mar 8, 2004 #1
    We've been looking at the Forurier series in our lectures which has been fine and it's okay for heat transfer, but we covered the wave eqt today and I've been left baffled. Using the boundary conditions of he diaplacement at each end of the string to be 0, we got the genral eqt

    y(x,t) = [Ccos (nctpi/L) + Dsin(nctpi/L)]sin(nxpi/L)

    However, in the final solution, there is no cosine term, (even though C exists and D is zero). Where did it go to? Can someone please give me a quick run-down on this because I'm just baffled right now. In the final eqt we mulitply C by sin(nctpi/L)sin(nxpi/c)

    I get how to calculate the C term okay. It's just the diappearence of the cosine term that has me confused. The question that we're given for our homework is the same as there's no cosine term in that answer either. What am I doing wrong?
  2. jcsd
  3. Mar 8, 2004 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    There is no uniform way of doing these things so I'm going to have to guess - do you mean why is there no cos(kx) involved, where k is whatever the constants work out to be?

    Presumably the oscillating string has its end points fixed, so imgane extending the string into negative x - the resulting shape is an odd function - it has rotation symmetry of 180 degrees about the origin, so in its fourier expansion there will ony be odd terms and therefore no cos(kx)s involved.
  4. Mar 8, 2004 #3
    Yeah, it has its ends fixed so you get the eqt I mentioned above. For the example given, the initial conditions are as follows- d/dt y(x,0) =0 where those d's are partial dees. So plugging that into the genral eqt means that D must be zero.

    The other initial conditions are y(x,0) = u(x) = hq/x when 0<=x<=q and h(L-x)/(L-q) when q<x<=L

    so you get y(x,))= the sum of Csin*nxpi/L) when this info is plugged into the general solution (since the cosine term gives us one).

    Then C was calculated and this turned out to be (2/L)(L/npi)^2sin(nqpi/L) (hl/((L-q)q))

    However, the final solution was then given as the sum of 2h/(q(L-q)[(L/mpi)^2sin(nqpi/L)sin(nctpi/L)sin(npix/c)

    Okay, editing this here- that sin(npix/c) should really be sin(npix/L). But I still don't see where the cosine has gone too and why has a sine function replaced it?
    Last edited: Mar 8, 2004
  5. Mar 8, 2004 #4

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    I agree with you on this.

    Take the parial derivative of the solution wrt to t and you can see that at t=0 the boundary condition is not satisfied.

    Wolfram agrees with you too. We can't all be wrong...
    Last edited: Mar 8, 2004
  6. Mar 8, 2004 #5
    Okay, so do we have mistakes in the notes here or something?

    The thing that ahs me most confused is how the genral solution is presented in the final answer.

    I'll give you the h/work question that I've been looking a this evening and let you see what you think and what I've done-

    So we've the general wave eqt and the boundary conditions are that the ends of th string are fixed. The initial conditions are y(x,0)=0 and for the velocity

    2hx/L for 0<x<L/2

    2h(1-x/l) for L/2<x<L

    I can't get the answer fotr this as I'm not actually sure what that second conditon is as it's written on the page (so we have 1-x diided by L or just the x?), but we've to show that-

    y=8hL/pi^3c [sin(xpi/L)sin(ctpi/L) - 1/(3^3)[sin(3xpi/L)sin(3ctpi/L) etc

    How does this work though? We get a value for C and then in the general solution I thought we should then have something of the form Csin(nxpi/L)cos(nctpi/L)
  7. Mar 8, 2004 #6

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    it's just x/L in there

    the initial velocity, in a plot of velocity agains x would then look like a triangle /\

    we know the general formual for the equation is the sum over n of

    A_n cos(nwt)(sin(nkx)

    for w and k the constant rewritten in a nicer form

    you need to find the A_n, just like you do with the ordinary fourier series.

    What you'll find is that only a couple of the terms are non-zero, judging by the answer n=1 and n=3.

    so, how do you think you find the A_n?


    I see where it's gone wrong.

    the initial conditions for this example do not state [tex]\partial_ty(x,0)[/tex] is zero but that y(x,0) is zero! That means that in the general form


    that C must be zero, not D

    so the general form is different becuase of the different intial conditions.
    Last edited: Mar 8, 2004
  8. Mar 8, 2004 #7
    Gahh why couldn't we have been told about this during the lecture? I'm serious, there is not a thing about this in our notes. Pfft!

    Anyway, I can see why you're writing it in that form from doing a bit of this in Physics, but why do we have it written differently in our notes? Why are there two different types of general solution? I mean even if we caluclate A-n in this one, do we not still have a soine term left in it?

    As for calculating the A_n term, I'm not sure (sorry, I'm about o go to bed cos I've to get up for uni in 6 hours time and need my beauty sleep! ). You could change the cosine and sine terms into an easier form using like sin(A+B)=sinAcosB + sinBcosA etc. And, er, you could use the initial conditions, but you'd have to differentiate y(x,t) to use one of the initial conditions.

    Maybe I'll be able to think a bit more clearly about this tomorrow. I can see where you're coming from and a lot of the sites I've visited are the same, but I just don't get what we have in our notes, which seems to be a recurring problem for our class (we get the impression that the lecturer isn't too impressed at having to teach a level one course given his position at the uni ).
  9. Mar 8, 2004 #8
    OMG, I feel so stupid, but for once I am thankful because now I think I know where I've gone wrong! Okay, admittedly what was given in the lecture still has me a tad baffled, but I figure the homework should hopefully be a little easier now. I think! If I've anymore probs tomorrow I'll post them up. Thanks again!
  10. Mar 8, 2004 #9

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Here's the quick spiel then

    the wave equation

    we seek separable solutions y(x,t) = h(x)g(t)

    when we do this we find

    h and g satify diff equations that imply h = Asin(kx) +Bcos(kx) and g = Ccos(wt)+Dsin(wt)

    So this is what we ought to call the general (separable) form.

    In the common case of a string with fixed ends, y(0,t) is zero for all t so that telss us B is zero.

    Now the general form for the string is


    after relabelling constants.

    Now you need to look at the boundary conditions

    y(x,0)=0 implies A_n is zero

    note this A_n is not the A_n in the last post, so don't copy on from there .

    so we see in this example
    sum over n

    to find B_n

    well, we know what dy/dt at t=0 is.

    so we know nwB_ncos(nwt)sin(nkx) at t=0
    sum over n

    nwB_nsin(nkx) = that boundary condition you got written down - this is now just an ordinary fourier series question to find the B_n, and you can do that.

    Now time for my beauty sleep. (If I could be arsed to get to BMC [conference in Belfast] in April you could buy me a drink for all this, or possibly your lecturer could)
  11. Mar 9, 2004 #10
    LOL, thanks for your help there!

    As for the Maths thing, I expect you'll meet a lot of my barmy lecturers there from Queen's as the pure ones are having kittens about the whole thing- do you know any of them or will you just be in for a 'treat' if you meet them?

    Oh and I' doing the uestion at the mo and I tried it earlier and go pretty much right the answer but the problem is happening with my initial conditons (just what getting B_n) is.

    I said that u(x) = d/dt B_n sin(nctpi/L)sin(nxpi/L) where u(x) is either of the 2 initial conditons to be plugged in

    then after a few calculations I got that u(x) = B_n sin(npix/L) (ncpi/L)
    Then when I go to work out B by multiplying both sides of the eqt by sin(mxpi/L) and then integrate both sides between L and 0, I end up with B_n equal to 2L/(n^2(pi)^2c) multiplied by the integral of du/dx cos(cos(nxpi/L)

    Doesn't seem to be quite right.
  12. Mar 9, 2004 #11
    OMG, it amazes me how brain dead one girl can be. Just got the answer and it wasn't even difficult. I'm such a numpty. You definitely deserve that drink you know!
  13. Mar 9, 2004 #12

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    good, i was worried that i didn't have time to explain that before i had to go to the pub (moi, alkie? peut etre). (et pretentious? peut etre aussi).

    shame i haven't booked a place at BMC (yet) if there were free drinks in it... but the thought of spending my birthday at a Conference is depressing. But I did it last year and that was at Birmingham, infinitely more.... suicide inducing.
  14. Mar 9, 2004 #13


    User Avatar
    Staff Emeritus
    Gold Member
    Dearly Missed

    peut etre aussi

    You are perhaps from OZ?
  15. Mar 9, 2004 #14

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Just pretentious, not necessarily accurate, though it does show that I've read my John Cleese and my Dostoyevsky. Almost as if I need to reaffirm my pretentiousness at every opportunity...

    But if anyone can explain what a 'numpty' is I'd be very interested.

    And I'm most definitely not from OZ; I'm a Yorkshireman and suitably ashamed of it.
  16. Mar 9, 2004 #15


    User Avatar
    Science Advisor

    As for me

    I will read Dostoyevsky when Britney Spears sings opera.
  17. Mar 10, 2004 #16
    Excuuuse me I'm sure spending part of your birthday with me at the pub would be quite something! I'm a lovely young lad I'll have you know!

    Anyhoo, as for the numpty thing, kinda came from humpty dumpty and evolved into the numpty that means someone who has just been incredibly dozey even though they're not usually this thick (really!).
  18. Mar 10, 2004 #17

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    Is that a typo, or a sudden revelation? Thanks for the numpty illumination anyway.
  19. Mar 12, 2004 #18
    Going for sex-change op soon.

    Nah, just an inability to locate the y-key. Can't even blame it on being trollied as usual. I have an excuse though, I'm only a baby level one student and the bars are there to be explored!
  20. Mar 12, 2004 #19

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    as you've managed to use trolley as a verb (and thus managed to lose almost everyone from outside the UK and Eire) i'm almost compelled to come to belfast to get pissed and allegedly attend a conference. if they'll pay for me to come and i can find a hotel i'll be there. you think i'm kidding???? And you promised i'd have fun on my birthday... 26 as it happens, if that's important, and a card isn't necessary.
  21. Mar 13, 2004 #20
    Hmmmmmmmm I'm thinking I should probably start some sort of thread to allow others into my own little world of weird and wonderful words!

    Anyhoo (should that be listed as above?), nice to be talking to such a young mathematician. I'm used to talking to ones that look like they come from the bible (that's actually the truth, one of the lecturers is nick-nakmed 'Prophet' due to the nature of his unruly hair and v.fetching beard- I just hope you don't know him). Oh and your right about the conference, come with em and I'll have you under the table in no time at all, unless you REALLY want to go to it. Whereabouts in Belfast is it being held anyway? Is it atually at Queens?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook