1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Solving a PDE by Separation of Variables - Troubling Condition

  1. Nov 28, 2012 #1
    1. The problem statement, all variables and given/known data


    Hopefully no one will mind me posting this as an image. But here it is in tex:

    Using separation of variables, find the function [itex]u(x,t)[/itex], defined for [itex]0\leq x\leq 4\pi[/itex] and [itex]t\geq 0[/itex], which satisfies the following conditions:
    [itex]\frac{\partial^2 u}{\partial t^2}-9\frac{\partial^2u}{\partial x^2}=0[/itex]



    [itex]u(x,0)=39\sin (x/4),[/itex]

    [itex]\frac{\partial u}{\partial t}(x,0)=21 \sin(x/4) - 72\sin(4 x).[/itex]

    2. Relevant equations

    The primary assumption of separation of variables, as I understand it, is:

    [itex]u(x,t) = f(x)g(t)[/itex]

    I don't know of any other relevant equations, most of solving PDEs is just working through the conditions and derivatives logically and doing some careful guesswork.

    3. The attempt at a solution

    I know how to do separation of variables, but I just can't figure out where the [itex]sin(4x)[/itex] comes from in the 3rd condition.

    It just doesn't make any sense... Here's my math:

    [itex]g''(t)f(x) = 9f''(x)g(t)[/itex]

    [itex]f(x)g'(0) = 21sin(x/4) - 72sin(4x)[/itex]

    [itex]f(x)g(0) = 39sin(x/4)[/itex]

    [itex]f(0)g(t) = f(4pi)g(t) = 0[/itex]

    and thus by using second and third of these equations:

    [itex]g'(0) = (21/39 - (72sin(4x))/(39sin(x/4)))g(0)[/itex]

    which doesn't make sense because g is a function of t (not x!) and [itex]sin(4x)/sin(x/4)[/itex] can't be represented in any way without x, obviously.

    the method of separation of variables is defined as assuming product rule of two functions, so I can't see any other way of approaching this problem.
  2. jcsd
  3. Nov 28, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    What you are supposed to do at this point is to rearrange the DE into the form
    {function of x, f and its derivatives} = {function of t, g and its derivatives}
    Thereupon you observe that the only solution is that each of those is equal to (the same) constant. Then you solve each of the two resulting ODEs. The shared constant will link the two solutions. The general solution to the original PDE is then the sum of products of such solution pairs.
    Only when you've done all that can you plug in the initial conditions.
  4. Nov 28, 2012 #3
    Ok I'm not sure if I entirely understood your response. I think you're saying to do this:

    [itex]\frac{f(x)}{f''(x)} = 9\frac{g(t)}{g''(t)}[/itex]

    I don't see how this does anything to help me solve the equation or show anything about constants, it seems trivial.

    *does some work*

    Hmmm... I can't see how this form of the differential equation helps me. It only seems to make me unable to use any of the conditions for fear of division by zero...

    I don't understand how you get to this conclusion:

    "Thereupon you observe that the only solution is that each of those is equal to (the same) constant."

    The rest of your post seems rather hard to elucidate as well. You say "Then you solve each of the two resulting ODEs. The shared constant will link the two solutions." I'm interpreting this as:

    [itex]\frac{f(x)}{f''(x)} = k[/itex]

    [itex]9\frac{g(t)}{g''(t)} = k[/itex]

    But I still don't see how you get to this conclusion. I see how it makes sense perhaps, as it's generally true of PDEs, but is it always true? Perhaps I need to read up on separation of variables some more.

    Here's some of my work:

    [itex]u(0,t) = u(4pi, t) = 0[/itex]

    can't use this with the fractional equation, else division by 0 is possible
    this condition implies:

    [itex]f(x) = \sum_{k=1}^{∞} b_k \sin(kx/4)[/itex]

    moving on to the other conditions--

    [itex]u(x,0) = 39\sin(x/4)[/itex]

    [itex]u(x,0) = g(0)f(x) = g(0) \sum_{k=1}^{∞} b_k \sin(kx/4) = 39\sin(x/4)[/itex]

    I don't like to look at this, so I'm going to assume the constant thing you mentioned before:

    [itex]\frac{f(x)}{f''(x)} = C \hskip 2cm f(x) = Cf''(x)[/itex]

    [itex]9\frac{g(t)}{g''(t)} = C \hskip 2cm 9g(t) = Cg''(t)[/itex]

    Using the first of these with what the first condition gives, we have:

    [itex]\sum_{k=1}^{∞} b_k \sin(kx/4) = -C \sum_{k=1}^{∞} b_k \frac{k^2}{16} \sin(kx/4)[/itex]

    This is interesting, I have to think about how to deal with this.

    Well if we had two sin terms of different order, like [itex]\sin(x/4)[/itex] and [itex]\sin(4x)[/itex], their derivatives would yield different values for


    Using the double angle formula you could try to reduce things down to sins and cosines for the larger order sin term, but I don't think that would help... No it wouldn't.

    We basically end up with

    [itex] b_1\sin(x/4) + b_2\sin(x/2) + ... + b_n\sin(nx/4) = -C (\frac{b_1}{16}\sin(x/4) + \frac{b_2}{4}\sin(x/2) + ... + \frac{n^2b_n}{16}\sin(nx/4))[/itex]

    Which can't be satisfied because only one value of C is being multiplied through (we'd need a different value for each sin function to make it work with more than one sin function)

    So we need to have only one sin function in f(x).

    [itex]f(x) = b_n \sin(nx/4) \hspace 2cm n \in integers[/itex]


    [itex]1 = -C \frac{n^2}{16}[/itex]

    [itex]C = -\frac{16}{n^2}[/itex]

    Now we can use this with g(t) to determine n (I'm guessing?)

    [itex]9g(t) = -\frac{16}{n^2} g''(t)[/itex]

    [itex] -\frac{9n^2}{16} g(t) = g''(t)[/itex]

    So it seems logical that each derivative of [itex]g(t)[/itex] is yielding a factor of:


    There are only a few ways to get this that I can think of:

    [itex]g(t) = e^{3nit/4}[/itex]

    [itex]g(t) = cos(3nit/4)[/itex]

    [itex]g(t) = \sin(3nit/4)[/itex]

    or any combination thereof.

    Now we return to the conditions to try to determine which of these is true:

    • Our first condition does nothing to help us with this part of the problem, we already used it when devising f(x).
    • Our second condition may prove useful in combination with the third condition.

    [itex]u(x,0) = 39\sin(x/4)[/itex]

    [itex]\frac{\partial u}{\partial t}(x,0)=21 \sin(x/4) - 72\sin(4 x)[/itex]

    [itex]f(x)g(0) = b_n \sin(nx/4)g(0) = 39\sin(x/4)[/itex]

    In order for this to work it seems that g(0) must be equal to 1, else we have another term. This is only true with the following forms of g(t):

    [itex]g(t) = e^{3nit/4}[/itex]

    [itex]g(t) = cos(3nit/4)[/itex]

    and certain linear combinations of these forms.

    The third condition then states:

    [itex]f(x)g'(0) = b_n \sin(nx/4)g'(0) = 21 \sin(x/4) - 72\sin(4 x)[/itex]

    g'(0) for the cosine solution is 0, so obviously that won't work. So using the exponential solution:

    [itex]g'(t) = \frac{3ni}{4} e^{3nit/4}[/itex]

    [itex]g'(0) = \frac{3ni}{4}[/itex]

    [itex]f(x)g'(0) = \frac{3ni}{4} b_n \sin(nx/4) = 21 \sin(x/4) - 72\sin(4 x)[/itex]

    [itex]f(x)g'(0) = \frac{3ni}{4} 39 \sin(x/4)[/itex]

    I have no idea what happens when you multiple a trigonometric function by an imaginary number, but I'd imagine it just moves the whole function to the imaginary plane, which isn't very helpful. So I guess I'm stuck again at the same place. Hmmm...


    Edit: I suppose I could use this stuff to transform my trigonometric functions into exponentials-

    Last edited: Nov 28, 2012
  5. Nov 28, 2012 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    @ Mator: I think you would be helped best by reading about the method of separation of variables. Try this link:

    www.math.osu.edu/~kwa.1/notes/512_3.3.pdf [Broken]
    Last edited by a moderator: May 6, 2017
  6. Nov 28, 2012 #5
    Ok, thanks Kurtz.

    Will do.

    Turns out we went over this stuff during lecture today. I guess I was trying to do the homework before knowing how to do the problems. Anywho, given what I've learned in lecture this should be pretty easy now. Just have to generalize stuff a little bit more for the g(t) solution and deal with some Fourier sine series.
    Last edited: Nov 28, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook