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.
The routine may be called by the names d05bwf or nagf_inteq_volterra_weights.
3Description
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:
(1)
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 9. For a general discussion of these methods, see Wolkenfelt (1982) for more details.
4References
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
5Arguments
1: – Character(1)Input
On entry: the type of method to be used.
For Adams' type formulae.
For Backward Differentiation Formulae.
Constraint:
or .
2: – 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: – Real (Kind=nag_wp) arrayOutput
On exit: contains the first nomg convolution weights.
4: – IntegerInput
On entry: the number of convolution weights, .
Constraint:
.
5: – IntegerOutput
On exit: the number of rows in the weights .
6: – Real (Kind=nag_wp) arrayOutput
On exit: contains the weights , for and , where is as defined in Section 3.
7: – 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: – IntegerInput
On entry: , the number of columns in the starting weights.
Constraints:
if , ;
if , .
9: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or 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).
6Error 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, .
Constraint: or .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, and .
Constraint: if , .
On entry, and .
Constraint: if , .
On entry, , and .
Constraint: if , .
On entry, , and .
Constraint: if , .
On entry, , and , .
Constraint: if , .
On entry, , and , .
Constraint: if , .
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
Not applicable.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
d05bwf is not threaded in any implementation.
9Further Comments
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
(2)
using d05bwf. In (2), and are given and the solution is sought on a uniform mesh of size such that . Discretization of (2) yields
(3)
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).
10Example
The following example generates the first ten convolution and thirteen starting weights generated by the fourth-order BDF method.