Example of Heat Equation Solved For Exam
Example of Heat Equation Solved For Exam
Boundary Conditions
u
t
(x, t) = ku
xx
(x, t), 0 < x < , t > 0 (1)
u(0, t) = 0, u(, t) = 0
u(x, 0) = (x)
1. Separate Variables Look for simple solutions in the form
u(x, t) = X(x)T(t).
Substituting into (1) and dividing both sides by X(x)T(t) gives
T(t)
kT(t)
=
X
(x)
X(x)
Since the left side is independent of x and the right side is independent of t, it follows
that the expression must be a constant:
T(t)
kT(t)
=
X
(x)
X(x)
= .
(Here
T means the derivative of T with respect to t and X
X = 0,
T kT = 0.
The solution of the second equation is
T(t) = Ce
kt
(2)
where C is an arbitrary constant. Furthermore, the boundary conditions give
X(0)T(t) = 0, X()T(t) = 0 for all t.
Since T(t) is not identically zero we obtain the desired eigenvalue problem
X
(x) = X(x)
2
. Integrate this expression from x = 0 to
x = . We have
_
0
X(x)
2
dx =
_
0
X(x)X
(x) dx =
_
0
X
(x)
2
dx +X(x)X
(x)
0
.
Since X(0) = X() = 0 we conclude
=
_
0
X
(x)
2
dx
_
0
X(x)
2
dx
and we see that must be less than or equal to zero.
(c) So, nally, consider =
2
so that
X(x) = a cos(x) +b sin(x).
Applying the boundary conditions we have
0 = X(0) = a a = 0 0 = X() = b sin().
From this we conclude sin() = 0 which implies
=
n
and therefore
n
=
2
n
=
_
n
_
2
, X
n
(x) = sin(
n
x), n = 1, 2, .. (4)
From (2) we also have the associated functions T
n
(t) = e
knt
.
3. Write Formal Sum From the above considerations we can conclude that for any
integer N and constants {b
n
}
N
n=0
u
n
(x, t) =
N
n=1
b
n
T
n
(t)X
n
(x) =
N
n=1
b
n
e
knt
sin
_
nx
_
.
satises the dierential equation in (1) and the boundary conditions.
2
4. Use Fourier Series to Find Coecients The only problem remaining is to somehow
pick the constants a
n
so that the initial condition u(x, 0) = (x) is satised. To do
this we consider what we learned from Fourier series. In particular we look for u as an
innite sum
u(x, t) =
n=1
b
n
e
knt
sin
_
nx
_
and we try to nd {b
n
} satisfying
(x) = u(x, 0) =
n=1
b
n
sin
_
nx
_
.
But this nothing more than a Sine expansion of the function on the interval (0, ).
b
n
=
2
_
0
(x) sin
_
nx
_
dx/. (5)
As an explicit example for the initial condition consider = 1, k = 1/10 and (x) = x(1x).
Let us recall that
n
=
_
n
_
which in this case reduces to n.
b
n
= 2
_
1
0
x(1 x) sin (nx) dx
= 2
_
1
0
x(1 x)
_
cos (nx)
n
_
dx
=
2
n
_
x(1 x)
cos(nx)
n
1
0
+
_
1
0
(1 2x)
cos(nx)
n
dx
_
=
2
n
_
1
0
(1 2x)
_
sin (nx)
n
_
dx
=
2
n
_
(1 2x)
sin(nx)
n
1
0
+
_
1
0
(2)
sin (nx)
n
dx
_
=
4
(n)
2
_
1
0
sin(nx) dx
=
4
(n)
2
_
cos(nx)
n
1
0
_
=
4 [(1)
n
1]
(n)
3
We arrive at the solution
u(x, t) =
4
n=1
[(1)
n
1]
n
3
e
n
2
2
/10t
sin (nx) . (6)
3