# heat equation

• June 1st 2009, 12:22 AM
gconfused
heat equation
Hi! Can someone please help me with the heat equation, my working out is below. The question is: Solve
$
\frac {du}{dt} = \frac {d^2u}{dx^2}$

with the boundary conditions:
$
0<=x<=L, T>=0, u(x,0) =f(x), u_x(0,t)=u_x(L,t)=0.
$

My working out is:
$
X'' + sX = 0$

So first case is: $s>0$
when $s= 0$ The general Solution of ODE for $x$
$X(x) = A e^{ xs^{\frac {1}{2}}} + Be^{ xs^{\frac {-1}{2}}}$

Then i differentiate it and got
$
X'(x) = A s^{\frac {1}{2}}e^{ xs^{\frac {1}{2}}} - Bs^{\frac {1}{2}}e^{ xs^{\frac {-1}{2}}}$

From the boundary conditions:
$X'(0) = A s^{\frac {1}{2}} - Bs^{\frac {1}{2}}$
$X'(L) = A s^{\frac {1}{2}}e^{ Ls^{\frac {1}{2}}} - Bs^{\frac {1}{2}}e^{ Ls^{\frac {-1}{2}}}$

And this is where i get lost
I tried solving simultaneously but I don't know how to. Can someone please help me? Thank you :)
• June 1st 2009, 04:26 AM
Jester
Quote:

Originally Posted by gconfused
Hi! Can someone please help me with the heat equation, my working out is below. The question is: Solve
$
\frac {du}{dt} = \frac {d^2u}{dx^2}$

with the boundary conditions:
$
0<=x<=L, T>=0, u(x,0) =f(x), u_x(0,t)=u_x(L,t)=0.
$

My working out is:
$
X'' + sX = 0$

So first case is: $s>0$
when $s= 0$ The general Solution of ODE for $x$
$X(x) = A e^{ xs^{\frac {1}{2}}} + Be^{ xs^{\frac {-1}{2}}}$

Then i differentiate it and got
$
X'(x) = A s^{\frac {1}{2}}e^{ xs^{\frac {1}{2}}} - Bs^{\frac {1}{2}}e^{ xs^{\frac {-1}{2}}}$

From the boundary conditions:
$X'(0) = A s^{\frac {1}{2}} - Bs^{\frac {1}{2}}$
$X'(L) = A s^{\frac {1}{2}}e^{ Ls^{\frac {1}{2}}} - Bs^{\frac {1}{2}}e^{ Ls^{\frac {-1}{2}}}$

And this is where i get lost
I tried solving simultaneously but I don't know how to. Can someone please help me? Thank you :)

It's actually better to consider $s = - \omega^2, 0 \;\text{and}\; \omega^2$

The first case is $X'' - \omega^2 X = 0$whose solution is $X = A e^{\omega x} + Be^{- \omega x}$ as you said. Sub in the BC gives

$X'(0) = A\omega - B\omega = 0$
$
X'(L) = A \omega e^{\omega L} - B \omega e^{-\omega L}
$

The only solution to this pair is A = B = 0 which leads to the trivial solution $X = 0$ so $u = 0$. So on to the next case s = 0 - you're up.
• June 1st 2009, 05:08 AM
gconfused
Thanks !!

Are the 3 conditions the same thing that you would do for the wave equation?
• June 1st 2009, 06:57 AM
Jester
Quote:

Originally Posted by gconfused
Thanks !!

Are the 3 conditions the same thing that you would do for the wave equation?

Depends on the boundary conditions but typically yes, there are.