# Thread: Separation of variables for boundary value problems

1. ## Separation of variables for boundary value problems

Quick pre-exam question..

Say we have some sort of heat equation with boundary conditions:

u(0,t) = 0,
u(L,t) = 0

where u = u(x,t)

And using separation of variables we get to;
X''/X = (1/a^2) T'/T

where X = X(x), T = T(t), a is the alpha from the heat equation.

So both sides of the equation must be constant;
(A): X''/X = k
(B): (1/a^2) T'/T = k

Now according to my textbook k must be negative, so that T goes to zero as t --> infinity.

I can't see why this is the case. What determines whether k is negative or positive? Is it determined by the boundary conditions - if the boundary conditions were derivatives (ie u'(some x, some t) = 0) would that produce a positive constant?

I'm confused because as far as I understand, a -ve constant would leads to a basis involving cosines and sines, whereas a +ve constant would lead to a basis involving hyperbolic sines/cosines. I don't know when to use which!

thanks,
Squigles

2. Originally Posted by Squiggles
Quick pre-exam question..

Say we have some sort of heat equation with boundary conditions:

u(0,t) = 0,
u(L,t) = 0

where u = u(x,t)

And using separation of variables we get to;
X''/X = (1/a^2) T'/T

where X = X(x), T = T(t), a is the alpha from the heat equation.

So both sides of the equation must be constant;
(A): X''/X = k
(B): (1/a^2) T'/T = k

Now according to my textbook k must be negative, so that T goes to zero as t --> infinity.

I can't see why this is the case. What determines whether k is negative or positive? Is it determined by the boundary conditions - if the boundary conditions were derivatives (ie u'(some x, some t) = 0) would that produce a positive constant?

I'm confused because as far as I understand, a -ve constant would leads to a basis involving cosines and sines, whereas a +ve constant would lead to a basis involving hyperbolic sines/cosines. I don't know when to use which!

thanks,
Squigles
Let's look at it from a different point of view, from $\displaystyle \frac{X''}{X} = k$.

Now your BCs give $\displaystyle u(0,t) = T(t)X(0) = 0\;\;\Rightarrow\;\;X(0) = 0$ and $\displaystyle u(L,t) = T(t)X(L) = 0\;\;\Rightarrow\;\;X(L) = 0$

Now the three possible choices for k are $\displaystyle k = - \omega^2, k = 0, k = \omega^2$ (negative, zero or positive)

If $\displaystyle k = \omega^2$ then $\displaystyle X=c_1e^{\omega x} + c_2 e^{-\omega x}$. The BC's $\displaystyle X(0) = 0,\;\;X(L)=0$ gives

$\displaystyle c_1e^{0} + c_2 e^{0}=0,$ and $\displaystyle c_1e^{\omega L} + c_2 e^{-\omega L} = 0$

which gives $\displaystyle c_1 = 0,\;\;c_2 = 0$, thus, $\displaystyle X(x) = 0\;\;\;\Rightarrow u = 0$, the trival solution. Similarly for $\displaystyle k = 0$ you'll get the trival solution so the only possibility is $\displaystyle k = -\omega^2$

3. Hey thanks sorry I didn't reply earlier - yeah I think I remember being shown that in class. So, are there any boundary conditions that would produce a positive k? Since it seems I'm not expected to go through checking for k positive/negative/zero for every problem I do, is it safe to assume it's always going to be negative..??

4. Originally Posted by Squiggles
Hey thanks sorry I didn't reply earlier - yeah I think I remember being shown that in class. So, are there any boundary conditions that would produce a positive k? Since it seems I'm not expected to go through checking for k positive/negative/zero for every problem I do, is it safe to assume it's always going to be negative..??
Yes, for your BC's, k will be negative so no, you don't need to check every time.

5. But the question was whether there exist other boundary conditions for which k is not negative.

Squiggles, when the boundary conditions are u(0,t)= u(L,t)= 0, then you can say X(0)T(t)= 0, X(L)T(t)= 0 so X(0)= 0, X(L)= 0 no matter what t is. The solution for X must NOT be one to one and so cannot be linear or exponential as would be the case for k zero or positive. The solution must be periodic and k must be negative.

If the boundary conditions were, say, u(0,t)= f(t), u(L,t)= g(t), then we would have X(0)T(t)= f(t), X(L)T(0)= g(t) so we cannot "separate" X from t.

In that case, I would recommend defining v(x,t)= u(x,t)- f(t)(L-x)/L- g(t)x/L so that v(0,t)= u(0,t)- f(t)= f(t)- f(t)= 0 and v(L,t)= u(L,t)- g(t)= g(t)- g(t)= 0.
Of course, although $\displaystyle v_xx= u_xx$, $\displaystyle v_t= u_t- f'(t) \frac{L - x}{L} - g'(t) \frac{x}{L}$ so that the differential equation becomes $\displaystyle v_{xx}= \frac{1}{a^2} v_t - \frac{1}{a^2} f'(t) \frac{L - x}{L} - \frac{1}{a^2}g'(t) \frac{x}{L}$ which might not be "separable".