PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_inteq_volterra_weights (d05bw)
Purpose
nag_inteq_volterra_weights (d05bw) 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.
Syntax
Description
nag_inteq_volterra_weights (d05bw) 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
Further Comments. For a general discussion of these methods, see
Wolkenfelt (1982) for more details.
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
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
The type of method to be used.
- For Adams' type formulae.
- For Backward Differentiation Formulae.
Constraint:
or .
- 2:
– int64int32nag_int scalar
-
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:
– int64int32nag_int scalar
-
The number of convolution weights, .
Constraint:
.
- 4:
– int64int32nag_int scalar
-
, the number of columns in the starting weights.
Constraints:
- if , ;
- if , .
Optional Input Parameters
None.
Output Parameters
- 1:
– double array
-
Contains the first
nomg convolution weights.
- 2:
– int64int32nag_int scalar
-
The number of rows in the weights .
- 3:
– double array
-
.
contains the weights
, for
and
, where
is as defined in
Description.
- 4:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
-
-
On entry, | or . |
-
-
On entry, | or , |
or | . |
-
-
On entry, | and , |
or | and . |
-
-
On entry, | and , |
or | and . |
-
-
On entry, | and , |
or | and . |
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
Not applicable.
Further 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
using
nag_inteq_volterra_weights (d05bw). 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
nag_inteq_volterra_weights (d05bw):
(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).
Example
The following example generates the first ten convolution and thirteen starting weights generated by the fourth-order BDF method.
Open in the MATLAB editor:
d05bw_example
function d05bw_example
fprintf('d05bw example results\n\n');
method = 'BDF';
iorder = int64(4);
nomg = int64(10);
nwt = int64(4);
[omega, lensw, sw, ifail] = d05bw( ...
method, iorder, nomg, nwt);
fprintf('\nThe convolution weights\n\n');
n = [0:double(nomg)-1]';
fprintf('%3d %10.4f\n',[n omega]');
fprintf('\nThe weights W\n\n');
n = [1:double(lensw)]';
fprintf('%3d %10.4f%10.4f%10.4f%10.4f\n',[n sw]');
d05bw example results
The convolution weights
0 0.4800
1 0.9216
2 1.0783
3 1.0504
4 0.9962
5 0.9797
6 0.9894
7 1.0003
8 1.0034
9 1.0017
The weights W
1 0.3750 0.7917 -0.2083 0.0417
2 0.3333 1.3333 0.3333 0.0000
3 0.3750 1.1250 1.1250 0.3750
4 0.4800 0.7467 1.5467 0.7467
5 0.5499 0.5719 1.5879 0.8886
6 0.5647 0.5829 1.5016 0.8709
7 0.5545 0.6385 1.4514 0.8254
8 0.5458 0.6629 1.4550 0.8098
9 0.5449 0.6578 1.4741 0.8170
10 0.5474 0.6471 1.4837 0.8262
11 0.5491 0.6428 1.4831 0.8292
12 0.5492 0.6438 1.4798 0.8279
13 0.5488 0.6457 1.4783 0.8263
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015