



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!




Recall that we were considering the initial value problem,
x˙(t) = f (t, x(t)) x(0) = x 0
where f is a known function, and x(0) = x 0 is a given initial condition. We assumed that f was continuously differentiable in x and t, and that the derivative of f with respect to x is bounded by a constant L on the interval over which the function is being approximated. We considered a mesh of step width h. To avoid confusion with the exact solution x to the IVP, the values of the approximation were denoted by y. Subscripts indicate the point at which the approximation is to be evaluated, so that y(kh) = yk. In the Forward Euler Method, the value of the approximation was defined recursively,
yn+1 = yn + hf (nh, yn)
where n ≥ 0. We defined the error of the approximation at each mesh point, n ≡ yn − x(nh). Our goal was to find the error |yN − x(N h)| at a particular value of T = N h, which we defined to be the global truncation error. We obtained a recursive inequality that placed an upper bound on |n|. It was a first-order recursion inequality, similar to a first-order differential
equation. We solved the recursion relation by considering a homogeneous solution, in analogy to the case of a differential equation.
1.2.1 Previous results
Recall the definition from the previous lecture,
an ≡ (1 + hL)−n|n| (1)
We found that
an+1 − an ≤ h^2 M (1 + hL)−(n+1)
By definition, a 0 ∝ 0 = |x 0 − y 0 | = 0. Thus we wrote aN as a telescoping sum,
aN ≤ (aN − aN − 1 ) + (aN − 1 − aN − 2 ) +... + (a 1 − (^) >
a 0 )
= h^2 M
(1 + hL)−N^ + (1 + hL)−N^ +1^ +... + (1 + hL)−^1
Since we are interested only in an inequality, we can added the (1 + hL)^0 = 1 term to the right side of (2). The quantity in brackets then form a geometric series, with r = (1 + hL). Taking the sum of the geometric series explicitly,
aN ≤ h^2 M ·
1+hL
1 − (^) 1+^1 hL
The second term in the numerator is always negative. Since we are interested only in an upper bound, we can neglect this term,
aN ≤ h^2 M ·
1 − (^) 1+^1 hL
= h^2 M ·
hL 1+hL =
(1 + hL)h (3)
like to develop other methods for which the accuracy is of higher order in h. To decrease the global truncation error, we first focus on the problem of decreasing the local truncation error. The idea is straightforward, but the calculations involve many Taylor series and can be difficult. There is a heuristic relationship between the order of the local and the global truncation error. Consider the approximation scheme of the Forward Euler method,
x(t + h) − x(t) ≈ hf (t, x(t))
The x(t + h) term on the left can be Taylor expanded. Also, recall the definition of f (t, x(t)) = ˙x(t).
h x˙(t) +
h^2 2
x¨(t) − h x˙(t) =
h^2 2
x¨(t) +...
Thus we expect the error in one step of the Forward Euler method to be of O(h^2 ). The number of steps to get to a fixed time t = T is equal to N = Th. The global truncation error should be on the order of the local truncation error times the number of steps over which the error is accumulated,
O(h^2 ) · N = O(h^2 ) ·
h
= O(h)
Because the local truncation error of the Forward Euler method was O(h^2 ), intuitively we expect a global truncation error of one less order in h, O(h), which is what we observed. This is why we attempt to reduce the order of the local truncation error to improve the global truncation error when developing other methods.
2.2.1 Integrate with the Trapezoidal Approximation
Begin with the differential equation,
x˙ = f (t, x)
Integrate both sides, assuming we know the form of x. Call the dummy variable σ, ∫ (^) t+h
t
x ˙(σ)dσ =
∫ (^) t+h
t
f (σ, x(σ))dσ (6)
The left side can be integrated using the Fundamental Theorem of Calculus,
x(t + h) − x(t) =
∫ (^) t+h
t
f (σ, x(σ))dσ
We do not know the exact form of x over the interval (t, t + h), we cannot perform the integral explicitly. However, if we knew the value of x at the endpoints of the interval, we could use an approximate integration method. We saw in the previous chapter on integration that the Trapezoid Rule will produced the desired O(h^3 ) error when the integration is performed.
Note. If we approximated the integral as a rectangle, with height equal to the value at the left endpoint, the error would be O(h^2 ). This is equivalent to using the Forward Euler method.
Using the Trapezoidal Approximation, the integral in (6) becomes, ∫ (^) t+h
t
f (σ, x(σ))dσ =
h 2
[f (t, x(t)) + f (t + h, x(t + h))] + O(h^3 ) (7)
Substituting (7) into (6),
x(t + h) − x(t) =
h 2
[f (t, x(t)) + f (t + h, x(t + h))] + O(h^3 ) (8)
2.2.2 Taylor series
In (8), we have obtained the desired O(h^3 ) in the local truncation error. However, our goal was to solve for x(t + h) given x(t), and x(t + h) now appears buried in the argument of the function f. To remove x(t + h) from f , we use Taylor expansions. Taylor expanding x(t + h) and using the definition of f ,
x(t + h) − x(t) = h x˙(t) + O(h^2 ) (9) = hf (t, x(t)) + O(h^2 ) (10)
We can substitute (9) into the argument of f in (8). We assume that the explicit form of f is known, so that we will be able to evaluate it at this point.
f (t + h, x(t + h)) = f (t + h, x(t) + hf (t, x(t)) + O(h^2 ))
As in all calculations of local truncation error, substitute x(t) into (13). As before, simplify the term f (t+αh, x+βhF (t)) using Taylor expansions. This time, the Taylor expansion is in both dimensions in the parameter h. Setting h = 0 gives f (t, x) = F (t), which is the first term in the Taylor series. Using the multi-dimensional form of the Taylor series,
f (t + αh, x + βhF (t)) = F (t) + h αft + βF fx + O(h^2 ) (14)
Substituting (14) into (13),
x(t + h) − x(t) − h(ω 1 + ω 2 )F (t) − h^2 [ω 2 αft + ω 2 βF fx] =? O(h^3 )