In numerical analysis and scientific computing, the trapezoidal rule is a numerical method to solve ordinary differential equations derived from the trapezoidal rule for computing integrals. The trapezoidal rule is an implicit second-order method, which can be considered as both a Runge–Kutta method and a linear multistep method.
Suppose that we want to solve the differential equationThe trapezoidal rule is given by the formulawhere
h=tn+1-tn
This is an implicit method: the value
yn+1
Integrating the differential equation from
tn
tn+1
yn ≈ y(tn)
yn+1 ≈ y(tn+1)
\taun
O(h2)
h
The region of absolute stability for the trapezoidal rule isThis includes the left-half plane, so the trapezoidal rule is A-stable. The second Dahlquist barrier states that the trapezoidal rule is the most accurate amongst the A-stable linear multistep methods. More precisely, a linear multistep method that is A-stable has at most order two, and the error constant of a second-order A-stable linear multistep method cannot be better than the error constant of the trapezoidal rule.
In fact, the region of absolute stability for the trapezoidal rule is precisely the left-half plane. This means that if the trapezoidal rule is applied to the linear test equation y = λy, the numerical solution decays to zero if and only if the exact solution does.