









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, 4/12/
u′′^ +
t
u′^ = Q(t), 0 < t ≤ 1 , u′(0) = 0, u′(1) + αu(1) = β
(a) Show that lim t→ 0
t
u′^ = u′′. (Hint: use L’Hˆopital’s rule.)
(b) Write a code to solve the BVP numerically using the finite-difference scheme
1 h^2
δ t^2 vj +
2 htj
δ 0 tvj = Q(tj ),
2 h
δ 0 tv 0 = 0,
2 h
δ 0 tvN + αvN = β
with tj = jh, h = 1/N. Note that the finite-difference approximation is singular at tj = 0. Use the result in part (a) to redefine the approximation of the ODE when tj = 0 (i.e. when j = 0). Eliminate the ghost values v− 1 and vN +1 from the resulting equations so that the linear system is tridiagonal (similar to what was discussed in class).
(c) Use your code to solve the BVP for the case Q(t) = 1 − t^2 and α = β = 1. Compare the numerical solution with the exact solution for N = 40, 80 and 160, and verify the method is second-order accurate. Plot the numerical solution for N = 40 and the exact solution on the same graph.
u′′^ − cosh(λu) = 0, − 1 ≤ t ≤ 2 , u(−1) = 1, u(2) = 3
Note that when λ = 1, the BVP agrees with the one considered in Problem Set 6. A finite-difference approximation of the BVP is
1 h^2
δ^2 t vj − cosh(λvj ) = 0, j = 1, 2 ,... , N − 1 , v 0 = 1, vN = 3.
For a path-following procedure, a key step is to determine how v = (v 0 , v 1 ,... , vN ) changes with the parameter. Let us consider this step alone (and not the whole path-following procedure). Write a code to determine vλ, the derivative of v with respect to λ, when λ = 1. (Hint: this code should be a minor modification of the one used in Problem Set 6.) Use N = 60 and plot vλ versus tj.
ut = kuxx + Q(x, t), 0 ≤ x ≤ L, t ≥ 0 ,
with initial condition u(x, 0) = f (x) and Neumann-type boundary conditions ux(0, t) = α(t) and ux(L, t) = β(t). An explicit finite-difference approximation is
vn j +1= vnj + νδ^2 xvnj + ∆tQ(xj , tn), 0 ≤ j ≤ N, n ≥ 0
with v^0 j = f (xj ), δ 0 xv 0 n = 2∆x α(tn), and δ 0 xvnN = 2∆x β(tn). Here ν = k∆t/∆x^2.
(a) Find Q(x, t), f (x), α(t) and β(t) so that u(x, t) = cos(2t) sin(3x) is an exact solution of the initial-boundary-value problem (IBVP).
(b) Write a code to solve the IBVP numerically using the finite-difference approximation above. Test your code using k = L = 1 and the functions found in part (a) so that an exact solution is known. Compute the error in the numerical solution at t = .2 for N = 40, 80 and 160 with ∆t chosen such that ν has the same value (less that 0.5) for each N. Verify the rate of convergence for the approximation.