You are on page 1of 3

MAT 3310 Computational and Applied Mathematics

(2009-2010, Second Term)


Assignment 4

Due day: 5:00 p.m., 16 April (Friday).


1. Given the following initial boundary value problem

ut uxx = x2 + t2 , 0 < x < 1,

u(0, t) = 0, t > 0

ux (1, t) = 1, t > 0

u(x, 0) = ex .

t>0
(1)

(a) Derive the variational formulation for the problem.


(b) Approximate in space with finite element method and derive the semi-variational
formulation for this problem.
(c) Solve this problem numerically by further approximation in time with the Euler
explicit scheme.
(d) If we approximate in time with the Euler implicit scheme, compare the numerical solution with the one in (c).
(Attach the computer code and graph for (c) and (d).)
2. Define the square wave

f (x) =

1, < x < 0
1,
0<x<

(2)

(a) Find the real Fourier expansion of f (x).


(b) Why are all the cosine coefficients ak = 0?
(c) From the Fourier series at this point x =
= 4(1

find the following identity:

1 1 1
+ )
3 5 7

(3)

3. Given the heat equation


ut = uxx ,

x [0, 2],

t>0

(4)

with periodic boundary condition


u(t, 0) = u(t, 2),

(5)

u(0, x) = u0 (x).

(6)

and initial condition


Suppose u0 (x) is a square 2-periodic half wave

0,
< x < 2
u0 =
sin(x), 0 < x <

(7)

(a) Find the solution for u from the Fourier series for u0 .
(b) What is u at x = according to (a)?
Hint: If f (x) can be represented as a trigonometric series
f (x) =

(ak cos kx + bk sin kx)

k=0

for some coefficients ak and bk , then

X
2
u(x, t) =
(ak cos kx + bk sin kx)ek t
k=0

solve the above heat equation with the initial condition u(0, x) = f (x).
4. The following data represent the growth of a population of fruit flies over a 6-week
period, where t and P represent the time (in days) and the number of flies, respectively. The model function is known as P (t) = atb .
t
7
P (t) 7

14
42

21 28
130 250

35 42
282 295

(a) Transform the model function to the linear function P (t) = a


+ bt.
+bt to the above data by least squares criterion.
(b) Fit the linear function P (t) = a
Hence, find the parameters a and b in the original model function P (t) = atb .
(c) Define the function S(
a, b) =

6
X

(
a + bti P (ti ))2 , verify that (
a, b) you find

i=1

in (b) is a stationary point of S(


a, b).
2

(d) Show that (


a, b) in (b) minimizes S(
a, b).
5. Given the matrix

A=

1 2r
r
0
0
0

r
1 2r
r
0
0

0
r
1 2r
r
0

0
0
r
1 2r
r

0
0
0
r
1 2r

where r = 19 .
(a) Compute the eigenvalues and eigenvectors of A.
(b) Use the power method to find the eigenvalue of largest magnitude for A.

You might also like