CAAM 336
·
DIFFERENTIAL EQUATIONS
Problem Set 12
Due Wednesday 9 April 2008 in class.
1. [60 points]
We wish to approximate the solution to the heat equation
∂u
∂t

∂
2
u
∂x
2
= 100
tx,
0
≤
x
≤
1
, t
≥
0
with homogeneous Dirichlet boundary conditions
u
(0
, t
) =
u
(1
, t
) = 0
and initial condition
u
(
x,
0) = 0
using the finite element method (method of lines).
Let
N
≥
1,
h
= 1
/
(
N
+ 1), and
x
k
=
kh
for
k
= 0
, . . . , N
+ 1. We shall construct approximations using the hat functions
φ
k
(
x
) =
(
x

x
k

1
)
/h,
x
∈
[
x
k

1
, x
k
);
(
x
k
+1

x
)
/h,
x
∈
[
x
k
, x
k
+1
);
0
,
otherwise
.
The approximate solution shall have the form
u
N
(
x, t
) =
N
summationdisplay
k
=1
a
k
(
t
)
φ
k
(
x
)
.
(a) Write down the system of ordinary differential equations that determines the coefficients
a
k
(
t
),
k
= 1
, . . . , N
. Specify the entries in the mass and stiffness matrices and the load vector.
(You may use results from previous homeworks and class as convenient.)
(b) Write a MATLAB code that uses the backward Euler method to solve for the coefficients
a
k
(
t
).
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '09
 Tompson
 homogeneous Dirichlet boundary, Dirichlet boundary conditions

Click to edit the document details