






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Math 4820
Due: Monday, 5/3/
ut =
( urr +
r
ur
)
with an initial condition and boundary conditions taken to be
u(r, 0) = f (r) , u(1, t) = α(t) , u(2, t) = β(t).
(a) Write a code to solve the heat flow problem on a uniform grid rj = 1 + j∆r, j = 0 , 1 ,... , N , ∆r = 1/N using the Crank-Nicolson method.
(b) Find Q(r), f (r), α(t) and β(t) such that u(r, t) = (1 + t + t^2 )(1 − r + r^2 ) is an exact solution. Compute the numerical solution for this problem using N = 50, tfinal = 1 and ∆t = .01. Verify that your code is behaving correctly.
(c) Let Q = (r − 1)(2 − r), f = sin(3π(r − 1)) and α(t) = β(t) = 0. Compute the numerical solution for this problem using N = 50, tfinal = 1 and ∆t = .01. Plot the numerical solution at t = tfinal.
Consider the finite-difference approximation
Lhvjn =
∆t^2 δ^2 t vjn −
c^2 ∆x^2 δ x^2 vnj −
c^2 12∆x^2
( c^2 ∆t^2 ∆x^2
) δ^4 xvnj ,
where δ^4 xvjn = δ^2 x(δ^2 xvnj ). Show that the approximation is consistent and find its order of accuracy.
utt = c^2 uxx , 0 < x < 10 , t > 0 ,
with initial conditions and boundary conditions taken to be
u(x, 0) =
[ 1 cosh(3x − 9)
] 2 , ut(x, 0) = 0 , u(0, t) = u(10, t) = 0.
Write a code to solve the problem based on the second-order explicit scheme
vn j +1= 2vnj − vn j −^1 + σ^2 δ^2 xvnj , σ = c∆t ∆x
Solve the problem numerically for the case c = .95 using a grid with ∆x = ∆t = 0.05. Make a surface plot of the numerical solution for 0 ≤ x ≤ 10 and 0 ≤ t ≤ 15. Discuss the behavior of the solution in terms of waves traveling with speeds equal to ±c.