

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 128A, Spring 2007
Homework 11 Solution
y(tn+1) − y(tn) =
∫ (^) tn+
tn
y′(t)dt ≈ Ay′(tn) + By′(tn− 1 ) + Cy′(tn− 2 )
was exact for y′(t) a polynomial of degree ≤ 2. We can use this to compute the local truncation error: If p 2 (t) is the interpolation of y′(t) at tn, tn− 1 , and tn− 2 , then we may write y′(t) = p 2 (t) + e 2 (t) and thus ∫ (^) tn+
tn
y′(t)dt = Ay′(tn) + By′(tn− 1 ) + Cy′(tn− 2 ) +
∫ (^) tn+
tn
e 2 (t)dt
Using the Newton form for the error term, namely,
e 2 (t) = y′[tn− 2 , tn− 1 , tn, t](t − tn− 2 )(t − tn− 1 )(t − tn)
We can apply the mean value theorem and integrate to get ∫ (^) tn+
tn
e 2 (t)dt = y′[tn− 2 , tn− 1 , tn, ξ¯] h^4 4
and then apply a theorem from class to get ∫ (^) tn+
tn
e 2 (t)dt =
y^5 (ξ) 4!
h^4 4
putting this all together, we have
y(tn+1) − y(tn) = Ay′(tn) + By′(tn− 1 ) + Cy′(tn− 2 ) + y^5 (ξ) 4 · 4!
h^4
In particular, if y(tk) = yk for k = n, n − 1 , n − 2, then
y(tn+1) − yn+1 =
y^5 (ξ) 4 · 4!
h^4
so we have found the local truncation error.
Solution: Applying the fundamental solution of calculus followed by the midpoint rule approximation,
y(tn+1) − y(tn− 1 ) =
∫ (^) tn+
tn− 1
y′(t)dt ≈ 2 hy′(tn)
which leads to the multistep scheme
yn+1 = yn− 1 + 2hf (tn, yn)
If we specialize this scheme to the ODE y′^ = λy, it becomes
yn+1 = yn− 1 + 2hλyn
This finite difference equation has characteristic polynomial
r^2 − 2 hλr − 1
with roots hλ ±
(hλ)^2 + 1 and hence general solution
yn = C 1 (hλ +
(hλ)^2 + 1)n^ + C 2 (hλ −
(hλ)^2 + 1)n
Since some of the solutions diverge for any hλ 6 = 0, this method is unstable.
yn+1 = yn + (− 5 yn+1 + 6 cos(tn+1) + 4 sin(tn+1))
for yn + 1, i.e.:
yn+1 =
[yn + 6 cos(tn+1) + 4 sin(tn+1)]