next up previous contents
Next: Theta Method Up: The INITIAL VALUE PROBLEM Previous: Taylor-series Method   Contents

Trapezoidal Rule

Adopt the ''integral'' interpretation of problem (see 0.1.3). Recall Forward Euler approximates derivative by a constant at $x_n$

$Y_{n+1}=Y_n+\int^{x_{n+1}}_{x_n} f(t,Y(t))dt\approx Y_n+hf(x_n, Y(x_n))$
The Trapezoidal rule estimates ``height'' of box by average of $f$ at $x_n$ and $x_{n+1}$ :
(30) $\displaystyle \fbox{\parbox {8.5cm} {$y_{n+1}=y_n+\frac12 h \big[f(x_n, y_n)+f(x_{n+1}, y_{n+1})\big]$}}$    

i.e.
  $\displaystyle y(x)=y(x_n)+\int^x_{x_n}f(t,y(t))dt$    
  $\displaystyle \approx y(x_n)+\frac12 (x-x_n)(f(x_n, y_n)+f(x_{n+1}, y_{n+1})).$    

To find the order of method, take an exact solution

$\displaystyle Y_{n+1}=Y_n+hY'(x_n)+\frac12 hY''(x_n)+{\cal O}(h^3)
$

and subtract (30):
  $\displaystyle Y_{n+1}$ $\displaystyle -$ $\displaystyle \left\{y_{n}+\displaystyle \frac12 h[f{(x_{n},y_n)}+f(x_{n+1}, y_{n+1})]
\right\}$
    $\displaystyle =$ $\displaystyle Y_n+hY'(x_n)+\frac12 h^2 Y'' (x_n)+ {\cal O}(h^3)$
    $\displaystyle -$ $\displaystyle \left\{y_n+\frac12 h\Big[y'_n+[y'(x_n)+h y''(x_n)+
O(h^2)]\Big]\right\}=O(h^3)$

Hence, trapezoidal is Order-2 Method. Before inferring that the error decays globally as ${\cal O}(h^2)$, we need to prove the method is convergent:

Theorem.

The Trapezoidal Rule is convergent.

Proof. Exercise (use strategy of multistep method considered later). $\Box$ Consider trapezoidal on model

(31) $\displaystyle \left\{\begin{array}{ll} Y'=\lambda Y Y(0)=1 & \mbox{solution }Y(x)=e^{\lambda x} \end{array}\right.$

or more generally, on
  $\displaystyle \left\{\begin{array}{ll}
Y'=\lambda Y+g(x)\\
Y(0)=Y_0
\end{array}\right.$    

where $x>0$ and $\lambda$ complex.

(32) % latex2html id marker 21691
$\displaystyle \therefore \left\{\begin{array}{ll} ...
..._n + g(x_n) +\lambda y_{n+1} +g(x_{n+1})] & n\ge 0 y_0=Y_0 \end{array}\right.$

and perturbed case


  $\displaystyle \left\{\begin{array}{ll}
z_{n+1}=z_n+\frac {h} {2} [\lambda z_n +...
...lambda z_{n+1}
+g(x_{n+1})] & n\ge 0\\
z_0=Y_0 +\varepsilon
\end{array}\right.$    

let $w_n = z_n-y_n$. Subtracting:
  $\displaystyle \left\{\begin{array}{ll}
w_{n+1}=w_n+\frac {h} {2} [\lambda W_n + \lambda W_{n+1}]
& n\ge 0\\
w_0=\varepsilon
\end{array}\right.$    

i.e. Trapezoidal rule again! Solution is what's obtained by trapezoidal on (31) except $Y_0=\varepsilon $.

% latex2html id marker 21703
$ \therefore$ Can look at (31) to assess stability:

Apply trapezoidal on (31):


  $\displaystyle \left\{\begin{array}{ll}
y_{n+1}=y_n+\frac {h\lambda} {2} [y_n + y_{n+1}]
& n\ge 0\\
y_0=1
\end{array}\right.$    

Consider
  $\displaystyle \left\{\begin{array}{ll}
Re(\lambda) < 0, \\
\lambda \mbox{ comp...
...{i.e. } \displaystyle \frac{\partial f} { \partial Y} \le 0.
\end{array}\right.$    

In this case we expect the limiting value of the approximation to be the same as that of the solution, i.e. $\lim_{x \rightarrow \infty} Y(x) =
0$. So

$\displaystyle y_{n+1}=\Big[\frac{1+(h\lambda/2)}{1-(h\lambda/2)}\Big] y_n \qquad
n\ge 0
$

thus, by induction,

$\displaystyle y_{n}=\Big[\frac{1+(h\lambda/2)}{1-(h\lambda/2)}\Big]^n y_0 \qquad
n\ge 0
$

since $y_0 = 1$. with $h\lambda \ne 2$. What we want to check is to see if there are any limits imposed on $h$ for the scheme to deliver an approximation that has the same asymptotic quality as the exact solution.

For $ \mathbb{R}e (\lambda) < 0$

$\displaystyle r=\frac{1+(h\lambda/2)}{1-(h\lambda/2)}=1+\frac{h\lambda}{1-(h\lambda/2)}=
-1+\frac{2}{1-(h\lambda/2)}
$

(33) % latex2html id marker 21727
$\displaystyle \therefore -1<r<1\quad \forall h>0\quad\therefore \quad \displaystyle \lim _{n\rightarrow \infty} y_n=0$

% latex2html id marker 21729
$ \therefore$ no limitations on $h$ in order to have boundedness of % latex2html id marker 21733
$ \{y_n\} \therefore$ stability of method on model equation (30) assured for $\forall h>0$ and all $(\lambda)$
with $Re(\lambda) < 0$.

Remark. This is stronger then in most methods were stability is assured for sufficiently small $h$. (33) property $A h>0$ and $ \mathbb{R}e (\lambda) < 0$ is called ``$A$-Stability $\cdots$ important in stiff problems. (More later.)

Remark. Two asumptions lead to Trapezoidal: (A) approximate derivative by constant (B) average (not discriminate) endpoints.

% latex2html id marker 21751
$ \therefore$ another possibility:

$\displaystyle y'(x)\approx f(x_n+\frac12 h, \frac12(y_n+y_{n+1}))\quad x \in
[x_n, x_{n+1}]
$

leads to ``implicit midpoint'' method:

$\displaystyle y_{n+1}=y_n+hf\left(t+\frac12h, \frac12(y_n+y_{n+1})\right)
$

Exercise: show that this scheme is $2^{nd}$ order and convergent.


next up previous contents
Next: Theta Method Up: The INITIAL VALUE PROBLEM Previous: Taylor-series Method   Contents
Juan Restrepo 2003-05-02