NAG Library Routine Document
D05BWF
1 Purpose
D05BWF computes the quadrature weights associated with the Adams methods of orders three to six and the Backward Differentiation Formulae (BDF) methods of orders two to five. These rules, which are referred to as reducible quadrature rules, can then be used in the solution of Volterra integral and integro-differential equations.
2 Specification
INTEGER |
IORDER, NOMG, LENSW, LDSW, NWT, IFAIL |
REAL (KIND=nag_wp) |
OMEGA(NOMG), SW(LDSW,NWT) |
CHARACTER(1) |
METHOD |
|
3 Description
D05BWF computes the weights
and
for a family of quadrature rules related to the Adams methods of orders three to six and the BDF methods of orders two to five, for approximating the integral:
with
, for
, for some given constant
.
In
(1),
is a uniform mesh,
is related to the order of the method being used and
,
are the starting and the convolution weights respectively. The mesh size
is determined as
, where
and
is the chosen number of convolution weights
, for
. A description of how these weights can be used in the solution of a Volterra integral equation of the second kind is given in
Section 8. For a general discussion of these methods, see
Wolkenfelt (1982) for more details.
4 References
Lambert J D (1973) Computational Methods in Ordinary Differential Equations John Wiley
Wolkenfelt P H M (1982) The construction of reducible quadrature rules for Volterra integral and integro-differential equations IMA J. Numer. Anal. 2 131–152
5 Parameters
- 1: METHOD – CHARACTER(1)Input
On entry: the type of method to be used.
- For Adams type formulae.
- For Backward Differentiation Formulae.
Constraint:
or .
- 2: IORDER – INTEGERInput
On entry: the order of the method to be used. The number of starting weights,
is determined by
METHOD and
IORDER.
If , .
If , .
Constraints:
- if , ;
- if , .
- 3: OMEGA(NOMG) – REAL (KIND=nag_wp) arrayOutput
On exit: contains the first
NOMG convolution weights.
- 4: NOMG – INTEGERInput
On entry: the number of convolution weights, .
Constraint:
.
- 5: LENSW – INTEGEROutput
On exit: the number of rows in the weights .
- 6: SW(LDSW,NWT) – REAL (KIND=nag_wp) arrayOutput
On exit:
contains the weights
, for
and
, where
is as defined in
Section 3.
- 7: LDSW – INTEGERInput
On entry: the first dimension of the array
SW as declared in the (sub)program from which D05BWF is called.
Constraints:
- if , ;
- if , .
- 8: NWT – INTEGERInput
On entry: , the number of columns in the starting weights.
Constraints:
- if , ;
- if , .
- 9: IFAIL – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
.
When the value is used it is essential to test the value of IFAIL on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
On entry, | or . |
On entry, | or , |
or | . |
On entry, | and , |
or | and . |
On entry, | and , |
or | and . |
On entry, | and , |
or | and . |
7 Accuracy
Not applicable.
Reducible quadrature rules are most appropriate for solving Volterra integral equations (and integro-differential equations). In this section, we propose the following algorithm which you may find useful in solving a linear Volterra integral equation of the form
using D05BWF. In
(2),
and
are given and the solution
is sought on a uniform mesh of size
such that
. Discretization of
(2) yields
where
. We propose the following algorithm for computing
from
(3) after a call to D05BWF:
(a) |
Equation (3) requires starting values, , for , with . These starting values can be computed by solving the linear system
|
(b) |
Compute the inhomogeneous terms
|
(c) |
Start the iteration for to compute from:
|
Note that for a nonlinear integral equation, the solution of a nonlinear algebraic system is required at step
(a) and a single nonlinear equation at step
(c).
9 Example
The following example generates the first ten convolution and thirteen starting weights generated by the fourth-order BDF method.
9.1 Program Text
Program Text (d05bwfe.f90)
9.2 Program Data
None.
9.3 Program Results
Program Results (d05bwfe.r)