Docsity

Final Project Problems - Applied Mathematics I | Math 440, Study Guides, Projects, Research of Elementary Mathematics

Toggle sidebar
bg1
MATH 440/540 - Applied Mathematics I
Final Project (for grad. students)
Date assigned: April 15, 2009
Due date: May 6, 2009
•Include a cover page and this problem sheet
•Include the printout of your program(s) for completeness
PROBLEMS:
1. Consider the following initial value problem :
d2u
dx2+ 2du
dx −3u= 0 (1)
u(0) = 2; du
dx =−2
(a) Solve IVP (1) analytically using appropriate method.
(b) Transform (1) into the system of two first order equations.
(c) Solve the resulting system numerically using explicit Euler method
for systems.
(d) Plot the numerical and analytical solutions for x∈[0,2].
(e) Compute the maximum norm of the difference between numerical
and analytical solutions.
2. Consider the following heat equation:
∂u
∂t =D∂2u
∂x2= 0, x ∈[0,1], t > 0,(2)
with initial and boundary conditions given by
u(x, 0) = (x, if 0 ≤x≤0.5,
1−x, if 0.5< x ≤1.(3)
u(0, t) = u(1, t) = 0, t >= 0.(4)
Numerically solve (2)-(4) with the diffusion coefficient D= 1/2.
pf2

Partial preview of the text

Download Final Project Problems - Applied Mathematics I | Math 440 and more Study Guides, Projects, Research Elementary Mathematics in PDF only on Docsity!

MATH 440/540 - Applied Mathematics I

Final Project (for grad. students) Date assigned: April 15, 2009 Due date: May 6, 2009

  • Include a cover page and this problem sheet
  • Include the printout of your program(s) for completeness

PROBLEMS:

  1. Consider the following initial value problem :

d^2 u dx^2

du dx − 3 u = 0 (1)

u(0) = 2; du dx

(a) Solve IVP (1) analytically using appropriate method. (b) Transform (1) into the system of two first order equations. (c) Solve the resulting system numerically using explicit Euler method for systems. (d) Plot the numerical and analytical solutions for x ∈ [0, 2]. (e) Compute the maximum norm of the difference between numerical and analytical solutions.

  1. Consider the following heat equation:

∂u ∂t

= D

∂^2 u ∂x^2

= 0, x ∈ [0, 1], t > 0 , (2)

with initial and boundary conditions given by

u(x, 0) =

{ x, if 0 ≤ x ≤ 0. 5 , 1 − x, if 0. 5 < x ≤ 1.

u(0, t) = u(1, t) = 0, t >= 0. (4)

Numerically solve (2)-(4) with the diffusion coefficient D = 1/2.

Use the following difference scheme:

un j +1− unj ∆t

= D

unj+1 − 2 unj + unj− 1 ∆x^2

Take ∆x = 0.1 and compute the numerical solution of (2)-(4) with ∆t = 1/ 50 , 1 / 100 , 1 /200.

Questions.

  • Numerically check the order of accuracy in time by showing the error between exact and numerical solution for different values of ∆t.
  • Compare plots of the exact and numerical solution for each scheme at ∆t = 1/ 50 , 1 / 100 , 1 /200.
  • Explain the results of the computations.

Exact solution for 1D diffusion equation:

v(x, t) =

∑^ ∞

k=

(kπ)^2 sin( kπ 2 ) sin(kπx)e−D(kπ) (^2) t , (5)

where t is the time, x is the space coordinate and D is the diffusion coefficient.

Matlab code for computing exact solution is given below. In this code the summation has 13 terms (instead of ∞), the time variable is T (so the final time is 1 in this code), xcoord is the space coordinate, J is number of space intervals.

T=1;

xcoord=linspace(0,1,J+1) vxt=zeros(J+1,1); vxt_sum=zeros(1,J+1); for k=1: vxt=4(1/((kpi).^2))sin(kpi/2)sin(kpixcoord)exp(-D(kpi).^2*T); vxt_sum=vxt_sum+vxt; sol=vxt_sum end