



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/10/
Lu = ut + cux = 0.
Find the leading terms in the truncation error for the following approximations:
(a) Lhvnj =
∆t
( vn j +1−
vnj+1 + vjn− 1 2
)
c 2∆x
( vnj+1 − vnj− 1
) = 0
(b) Lhvnj =
∆t
( vn j +1− vjn
)
c 2∆x
( vnj+1 − vnj− 1
) − c^2 ∆t 2∆x^2
( vjn+1 − 2 vnj + vjn− 1
) = 0
What is the order of accuracy of each approximation assuming ∆t is proportional to ∆x.
vn j +1= vnj − σ 2
δ 0 xvnj + σ^2 2
δ^2 xvjn , σ = c∆t ∆x
Consider Fourier modes of the form vjn = aneiαxj^ , where a is an amplitude factor, α is a wave number, and xj = j∆x, to determine a constraint on the parameter σ such that the approximation is stable. Hint: consider |a|^2 = (Re(a))^2 + (Im(a))^2 and find σ such that |a|^2 ≤ 1.
ut + cux = 0, 0 < x < L, t > 0
with u(x, 0) = x sin(x) and u(0, t) = 0. Write a code to solve the IBVP using the Lax- Wendroff method given in problem 2. Use
v j^0 = xj sin(xj ), vn 0 = 0, vnN = 2vNn − 1 − vnN − 2 ,
where xj = j∆x, ∆x = L/N , j = 0, 1 ,... , N. Run your code for the case c = 0.95 and L = 10. Compare the numerical solution with the exact solution at t = 1 for N = 500, 1000 and 2000. Use ∆t = ∆x for each case and and verify that the method is second-order accurate. Plot the numerical solution for N = 500 and the exact solution on the same graph.