NAG CL Interface
d05bwc (volterra_​weights)

Settings help

CL Name Style:


1 Purpose

d05bwc 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

#include <nag.h>
void  d05bwc (Nag_ODEMethod method, Integer iorder, Integer nomg, double omega[], double sw[], NagError *fail)
The function may be called by the names: d05bwc or nag_inteq_volterra_weights.

3 Description

d05bwc computes the weights Wi,j and ωi 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:
0t ϕ(s) ds h j=0 p-1 Wi,j ϕ(j×h) + h j=p i ωi-j ϕ(j×h) ,   0tT , (1)
with t=i×h, for i=0,1,,n, for some given constant h.
In (1), h is a uniform mesh, p is related to the order of the method being used and Wi,j, ωi are the starting and the convolution weights respectively. The mesh size h is determined as h=Tn, where n=nw+p-1 and nw is the chosen number of convolution weights wj, for j=1,2,,nw-1. 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.

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 Arguments

1: method Nag_ODEMethod Input
On entry: the type of method to be used.
method=Nag_Adams
For Adams' type formulae.
method=Nag_BDF
For Backward Differentiation Formulae.
Constraint: method=Nag_Adams or Nag_BDF.
2: iorder Integer Input
On entry: the order of the method to be used. The number of starting weights, p is determined by method and iorder.
If method=Nag_Adams, p=iorder-1.
If method=Nag_BDF, p=iorder.
Constraints:
  • if method=Nag_Adams, 3iorder6;
  • if method=Nag_BDF, 2iorder5.
3: nomg Integer Input
On entry: the number of convolution weights, nw.
Constraint: nomg1.
4: omega[nomg] double Output
On exit: contains the first nomg convolution weights.
5: sw[n×p] double Output
Note: the (i,j)th element of the matrix is stored in sw[(j-1)×n+i-1].
On exit: sw[j×n+i-1] contains the weights Wi,j, for i=1,2,,n and j=0,1,,p-1, where n is as defined in Section 3.
6: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_ENUM_INT
On entry, method=Nag_Adams and iorder=2.
Constraint: if method=Nag_Adams, 3iorder6.
On entry, method=Nag_BDF and iorder=6.
Constraint: if method=Nag_BDF, 2iorder5.
NE_INT
On entry, iorder=value.
Constraint: 2iorder6.
On entry, nomg=value.
Constraint: nomg1.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

d05bwc is not threaded in any implementation.

9 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
y(t)=f(t)+0tK(t,s)y(s)ds,  0tT, (2)
using d05bwc. In (2), K(t,s) and f(t) are given and the solution y(t) is sought on a uniform mesh of size h such that T=nh. Discretization of (2) yields
yi=f(i×h)+hj=0 p-1Wi,jK(i,h,j,h)yj+hj=piωi-jK(i,h,j,h)yj, (3)
where yiy(i×h). We propose the following algorithm for computing yi from (3) after a call to d05bwc:
  1. (a)Equation (3) requires starting values, yj, for j=1,2,,p-1, with y0=f(0). These starting values can be computed by solving the linear system
    yi = f(i×h) + h j=0 p-1 sw[j×n+i-1] K (i,h,j,h) yj ,   i=1,2,,p-1 .  
  2. (b)Compute the inhomogeneous terms
    σi = f(i×h) + h j= 0 p-1 sw[j×n+i-1] K(i,h,j,h) yj ,   i=p,p+ 1,,n .  
  3. (c)Start the iteration for i=p,p+1,,n to compute yi from:
    (1-h×omega[0]K(i,h,i,h)) y i = σ i + h j = p i - 1 omega[i-j] K (i,h,j,h) y j .  
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).

10 Example

The following example generates the first ten convolution and thirteen starting weights generated by the fourth-order BDF method.

10.1 Program Text

Program Text (d05bwce.c)

10.2 Program Data

Program Data (d05bwce.d)

10.3 Program Results

Program Results (d05bwce.r)