D05BEF (PDF version)
D05 Chapter Contents
D05 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

D05BEF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

D05BEF computes the solution of a weakly singular nonlinear convolution Volterra–Abel integral equation of the first kind using a fractional Backward Differentiation Formulae (BDF) method.

2  Specification

SUBROUTINE D05BEF ( CK, CF, CG, INITWT, IORDER, TLIM, TOLNL, NMESH, YN, WORK, LWK, NCT, IFAIL)
INTEGER  IORDER, NMESH, LWK, NCT(NMESH/32+1), IFAIL
REAL (KIND=nag_wp)  CK, CF, CG, TLIM, TOLNL, YN(NMESH), WORK(LWK)
CHARACTER(1)  INITWT
EXTERNAL  CK, CF, CG

3  Description

D05BEF computes the numerical solution of the weakly singular convolution Volterra–Abel integral equation of the first kind
ft+1π0tkt-s t-s gs,ysds=0,  0tT. (1)
Note the constant 1π  in (1). It is assumed that the functions involved in (1) are sufficiently smooth and if
ft=tβwt  with  β>-12​ and ​wt​ smooth, (2)
then the solution yt is unique and has the form yt=tβ-1/2zt, (see Lubich (1987)). It is evident from (1) that f0=0. You are required to provide the value of yt at t=0. If y0 is unknown, Section 9 gives a description of how an approximate value can be obtained.
The routine uses a fractional BDF linear multi-step method selected by you to generate a family of quadrature rules (see D05BYF). The BDF methods available in D05BEF are of orders 4, 5 and 6 (=p say). For a description of the theoretical and practical background related to these methods we refer to Lubich (1987) and to Baker and Derakhshan (1987) and Hairer et al. (1988) respectively.
The algorithm is based on computing the solution yt in a step-by-step fashion on a mesh of equispaced points. The size of the mesh is given by T/N-1, N being the number of points at which the solution is sought. These methods require 2p-2 starting values which are evaluated internally. The computation of the lag term arising from the discretization of (1) is performed by fast Fourier transform (FFT) techniques when N>32+2p-1, and directly otherwise. The routine does not provide an error estimate and you are advised to check the behaviour of the solution with a different value of N. An option is provided which avoids the re-evaluation of the fractional weights when D05BEF is to be called several times (with the same value of N) within the same program with different functions.

4  References

Baker C T H and Derakhshan M S (1987) FFT techniques in the numerical solution of convolution equations J. Comput. Appl. Math. 20 5–24
Gorenflo R and Pfeiffer A (1991) On analysis and discretization of nonlinear Abel integral equations of first kind Acta Math. Vietnam 16 211–262
Hairer E, Lubich Ch and Schlichte M (1988) Fast numerical solution of weakly singular Volterra integral equations J. Comput. Appl. Math. 23 87–98
Lubich Ch (1987) Fractional linear multistep methods for Abel–Volterra integral equations of the first kind IMA J. Numer. Anal 7 97–106

5  Parameters

1:     CK – REAL (KIND=nag_wp) FUNCTION, supplied by the user.External Procedure
CK must evaluate the kernel kt of the integral equation (1).
The specification of CK is:
FUNCTION CK ( T)
REAL (KIND=nag_wp) CK
REAL (KIND=nag_wp)  T
1:     T – REAL (KIND=nag_wp)Input
On entry: t, the value of the independent variable.
CK must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which D05BEF is called. Parameters denoted as Input must not be changed by this procedure.
2:     CF – REAL (KIND=nag_wp) FUNCTION, supplied by the user.External Procedure
CF must evaluate the function ft in (1).
The specification of CF is:
FUNCTION CF ( T)
REAL (KIND=nag_wp) CF
REAL (KIND=nag_wp)  T
1:     T – REAL (KIND=nag_wp)Input
On entry: t, the value of the independent variable.
CF must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which D05BEF is called. Parameters denoted as Input must not be changed by this procedure.
3:     CG – REAL (KIND=nag_wp) FUNCTION, supplied by the user.External Procedure
CG must evaluate the function gs,ys in (1).
The specification of CG is:
FUNCTION CG ( S, Y)
REAL (KIND=nag_wp) CG
REAL (KIND=nag_wp)  S, Y
1:     S – REAL (KIND=nag_wp)Input
On entry: s, the value of the independent variable.
2:     Y – REAL (KIND=nag_wp)Input
On entry: the value of the solution y at the point S.
CG must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which D05BEF is called. Parameters denoted as Input must not be changed by this procedure.
4:     INITWT – CHARACTER(1)Input
On entry: if the fractional weights required by the method need to be calculated by the routine then set INITWT='I' (Initial call).
If INITWT='S' (Subsequent call), the routine assumes the fractional weights have been computed by a previous call and are stored in WORK.
Constraint: INITWT='I' or 'S'.
Note: when D05BEF is re-entered with a value of INITWT='S', the values of NMESH, IORDER and the contents of WORK must not be changed
5:     IORDER – INTEGERInput
On entry: p, the order of the BDF method to be used.
Suggested value: IORDER=4.
Constraint: 4IORDER6.
6:     TLIM – REAL (KIND=nag_wp)Input
On entry: the final point of the integration interval, T.
Constraint: TLIM>10×machine precision.
7:     TOLNL – REAL (KIND=nag_wp)Input
On entry: the accuracy required for the computation of the starting value and the solution of the nonlinear equation at each step of the computation (see Section 9).
Suggested value: TOLNL=ε where ε is the machine precision.
Constraint: TOLNL>10×machine precision.
8:     NMESH – INTEGERInput
On entry: N, the number of equispaced points at which the solution is sought.
Constraint: NMESH=2m+2×IORDER-1, where m1.
9:     YNNMESH – REAL (KIND=nag_wp) arrayInput/Output
On entry: YN1 must contain the value of yt at t=0 (see Section 9).
On exit: YNi contains the approximate value of the true solution yt at the point t=i-1×h, for i=1,2,,NMESH, where h=TLIM/NMESH-1.
10:   WORKLWK – REAL (KIND=nag_wp) arrayCommunication Array
On entry: if INITWT='S', WORK must contain fractional weights computed by a previous call of D05BEF (see description of INITWT).
On exit: contains fractional weights which may be used by a subsequent call of D05BEF.
11:   LWK – INTEGERInput
On entry: the dimension of the array WORK as declared in the (sub)program from which D05BEF is called.
Constraint: LWK2×IORDER+6×NMESH+8×IORDER2-16×IORDER+1.
12:   NCTNMESH/32+1 – INTEGER arrayWorkspace
13:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. 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 -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
IFAIL=1
On entry,IORDER<4 or IORDER>6,
orTLIM10×machine precision,
orINITWT'I' or 'S',
orINITWT='S' on the first call to D05BEF,
orTOLNL10×machine precision,
orNMESH2m+2×IORDER-1,m1,
orLWK<2×IORDER+6×NMESH+8×IORDER2-16×IORDER+1.
IFAIL=2
The routine cannot compute the 2p-2 starting values due to an error in solving the system of nonlinear equations. Relaxing the value of TOLNL and/or increasing the value of NMESH may overcome this problem (see Section 9 for further details).
IFAIL=3
The routine cannot compute the solution at a specific step due to an error in the solution of the single nonlinear equation (3). Relaxing the value of TOLNL and/or increasing the value of NMESH may overcome this problem (see Section 9 for further details).
IFAIL=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.8 in the Essential Introduction for further information.
IFAIL=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.7 in the Essential Introduction for further information.
IFAIL=-999
Dynamic memory allocation failed.
See Section 3.6 in the Essential Introduction for further information.

7  Accuracy

The accuracy depends on NMESH and TOLNL, the theoretical behaviour of the solution of the integral equation and the interval of integration. The value of TOLNL controls the accuracy required for computing the starting values and the solution of (3) at each step of computation. This value can affect the accuracy of the solution. However, for most problems, the value of ε, where ε is the machine precision, should be sufficient.

8  Parallelism and Performance

D05BEF is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
D05BEF makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

Also when solving (1) the initial value y0 is required. This value may be computed from the limit relation (see Gorenflo and Pfeiffer (1991))
-2π k0 g 0,y0 = lim t0 ft t . (3)
If the value of the above limit is known then by solving the nonlinear equation (3) an approximation to y0 can be computed. If the value of the above limit is not known, an approximation should be provided. Following the analysis presented in Gorenflo and Pfeiffer (1991), the following pth-order approximation can be used:
lim t0 ft t fhphp/2 . (4)
However, it must be emphasized that the approximation in (4) may result in an amplification of the rounding errors and hence you are advised (if possible) to determine lim t0 ft t  by analytical methods.
Also when solving (1), initially, D05BEF computes the solution of a system of nonlinear equation for obtaining the 2p-2 starting values. C05QDF is used for this purpose. If a failure with IFAIL=2 occurs (corresponding to an error exit from C05QDF), you are advised to either relax the value of TOLNL or choose a smaller step size by increasing the value of NMESH. Once the starting values are computed successfully, the solution of a nonlinear equation of the form
Yn-αgtn,Yn-Ψn=0, (5)
is required at each step of computation, where Ψn and α are constants. D05BEF calls C05AXF to find the root of this equation.
When a failure with IFAIL=3 occurs (which corresponds to an error exit from C05AXF), you are advised to either relax the value of the TOLNL or choose a smaller step size by increasing the value of NMESH.
If a failure with IFAIL=2 or 3 persists even after adjustments to TOLNL and/or NMESH then you should consider whether there is a more fundamental difficulty. For example, the problem is ill-posed or the functions in (1) are not sufficiently smooth.

10  Example

We solve the following integral equations.
Example 1
The density of the probability that a Brownian motion crosses a one-sided moving boundary at before time t, satisfies the integral equation (see Hairer et al. (1988))
-1t exp 12-at2/t+0texp -12at-as2/t-s t-s ysds=0,  0t7.  
In the case of a straight line at=1+t, the exact solution is known to be
yt=12πt3 exp- 1+t 2/2t  
Example 2
In this example we consider the equation
-2log1+t+t 1+t +0t ys t-s ds= 0,   0t 5.  
The solution is given by yt=11+t .
In the above examples, the fourth-order BDF is used, and NMESH is set to 26+7.

10.1  Program Text

Program Text (d05befe.f90)

10.2  Program Data

None.

10.3  Program Results

Program Results (d05befe.r)


D05BEF (PDF version)
D05 Chapter Contents
D05 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015