# Solving a PDE by Separation of Variables - Troubling Condition

1. Nov 28, 2012

### Mator

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 $u(x,t)$, defined for $0\leq x\leq 4\pi$ and $t\geq 0$, which satisfies the following conditions:
$\frac{\partial^2 u}{\partial t^2}-9\frac{\partial^2u}{\partial x^2}=0$

and

$u(0,t)=u(4\pi,t)=0,$

$u(x,0)=39\sin (x/4),$

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

2. Relevant equations

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

$u(x,t) = f(x)g(t)$

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 $sin(4x)$ comes from in the 3rd condition.

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

$g''(t)f(x) = 9f''(x)g(t)$

$f(x)g'(0) = 21sin(x/4) - 72sin(4x)$

$f(x)g(0) = 39sin(x/4)$

$f(0)g(t) = f(4pi)g(t) = 0$

and thus by using second and third of these equations:

$g'(0) = (21/39 - (72sin(4x))/(39sin(x/4)))g(0)$

which doesn't make sense because g is a function of t (not x!) and $sin(4x)/sin(x/4)$ 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. Nov 28, 2012

### haruspex

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.

3. Nov 28, 2012

### Mator

Ok I'm not sure if I entirely understood your response. I think you're saying to do this:

$\frac{f(x)}{f''(x)} = 9\frac{g(t)}{g''(t)}$

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:

$\frac{f(x)}{f''(x)} = k$

$9\frac{g(t)}{g''(t)} = k$

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:

$u(0,t) = u(4pi, t) = 0$

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

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

moving on to the other conditions--

$u(x,0) = 39\sin(x/4)$

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

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

$\frac{f(x)}{f''(x)} = C \hskip 2cm f(x) = Cf''(x)$

$9\frac{g(t)}{g''(t)} = C \hskip 2cm 9g(t) = Cg''(t)$

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

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

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

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

$\frac{k^2}{16}$

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

$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))$

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).

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

so

$1 = -C \frac{n^2}{16}$

$C = -\frac{16}{n^2}$

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

$9g(t) = -\frac{16}{n^2} g''(t)$

$-\frac{9n^2}{16} g(t) = g''(t)$

So it seems logical that each derivative of $g(t)$ is yielding a factor of:

$\frac{3ni}{4}$

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

$g(t) = e^{3nit/4}$

$g(t) = cos(3nit/4)$

$g(t) = \sin(3nit/4)$

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.

$u(x,0) = 39\sin(x/4)$

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

$f(x)g(0) = b_n \sin(nx/4)g(0) = 39\sin(x/4)$

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):

$g(t) = e^{3nit/4}$

$g(t) = cos(3nit/4)$

and certain linear combinations of these forms.

The third condition then states:

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

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

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

$g'(0) = \frac{3ni}{4}$

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

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

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...

Thoughts?

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

http://en.wikipedia.org/wiki/Euler's_formula#Relationship_to_trigonometry

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

### LCKurtz

@ 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
5. Nov 28, 2012

### Mator

Ok, thanks Kurtz.

Will do.

Edit:
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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook