d05bdf computes the solution of a weakly singular nonlinear convolution Volterra–Abel integral equation of the second kind using a fractional Backward Differentiation Formulae (BDF) method.
The routine may be called by the names d05bdf or nagf_inteq_abel2_weak.
3Description
d05bdf computes the numerical solution of the weakly singular convolution Volterra–Abel integral equation of the second kind
(1)
Note the constant in (1). It is assumed that the functions involved in (1) are sufficiently smooth.
The routine uses a fractional BDF linear multi-step method to generate a family of quadrature rules (see d05byf). The BDF methods available in d05bdf are of orders , and ( say). For a description of the theoretical and practical background to these methods we refer to Lubich (1985) and to Baker and Derakhshan (1987) and Hairer et al. (1988) respectively.
The algorithm is based on computing the solution in a step-by-step fashion on a mesh of equispaced points. The size of the mesh is given by , being the number of points at which the solution is sought. These methods require (including ) 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 , 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 . An option is provided which avoids the re-evaluation of the fractional weights when d05bdf is to be called several times (with the same value of ) within the same program unit with different functions.
4References
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
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 (1985) Fractional linear multistep methods for Abel–Volterra integral equations of the second kind Math. Comput.45 463–469
5Arguments
1: – real (Kind=nag_wp) Function, supplied by the user.External Procedure
ck must evaluate the kernel of the integral equation (1).
On entry: , 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 d05bdf is called. Arguments denoted as Input must not be changed by this procedure.
Note:ck should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by d05bdf. If your code inadvertently does return any NaNs or infinities, d05bdf is likely to produce unexpected results.
2: – real (Kind=nag_wp) Function, supplied by the user.External Procedure
On entry: , 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 d05bdf is called. Arguments denoted as Input must not be changed by this procedure.
Note:cf should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by d05bdf. If your code inadvertently does return any NaNs or infinities, d05bdf is likely to produce unexpected results.
3: – real (Kind=nag_wp) Function, supplied by the user.External Procedure
On entry: , the value of the independent variable.
2: – Real (Kind=nag_wp)Input
On entry: the value of the solution at the point s.
cg must either be a module subprogram USEd by, or declared as EXTERNAL in, the (sub)program from which d05bdf is called. Arguments denoted as Input must not be changed by this procedure.
Note:cg should not return floating-point NaN (Not a Number) or infinity values, since these are not handled by d05bdf. If your code inadvertently does return any NaNs or infinities, d05bdf is likely to produce unexpected results.
4: – Character(1)Input
On entry: if the fractional weights required by the method need to be calculated by the routine then set (Initial call).
If (Subsequent call), the routine assumes the fractional weights have been computed on a previous call and are stored in work.
Constraint:
or .
Note: when d05bdf is re-entered with the value of , the values of nmesh, iorder and the contents of workmust not be changed.
5: – IntegerInput
On entry: , the order of the BDF method to be used.
Suggested value:
.
Constraint:
.
6: – Real (Kind=nag_wp)Input
On entry: the final point of the integration interval, .
Constraint:
.
7: – 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:
where is the machine precision.
Constraint:
.
8: – IntegerInput
On entry: , the number of equispaced points at which the solution is sought.
Constraint:
, where .
9: – Real (Kind=nag_wp) arrayOutput
On exit: contains the approximate value of the true solution at the point , for , where .
10: – Real (Kind=nag_wp) arrayCommunication Array
On entry: if , work must contain fractional weights computed by a previous call of d05bdf (see description of initwt).
On exit: contains fractional weights which may be used by a subsequent call of d05bdf.
11: – IntegerInput
On entry: the dimension of the array work as declared in the (sub)program from which d05bdf is called.
Constraint:
.
12: – Integer arrayWorkspace
13: – 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, .
Constraints: or .
On entry, .
Constraint: .
On entry, .
Constraint: ; that is, .
On entry, and .
Constraint: , for some .
On entry, and .
Constraint: .
On entry, .
Constraints: .
On entry, .
Constraint: .
An error occurred when trying to compute the starting values.
Relaxing the value of tolnl and/or increasing the value of nmesh may overcome this problem (see Section 9 for further details).
An error occurred when trying to compute the solution at a specific step.
Relaxing the value of tolnl and/or increasing the value of nmesh may overcome this problem (see Section 9 for further details).
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
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 (2) 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.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
d05bdf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
d05bdf 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.
9Further Comments
In solving (1), initially, d05bdf computes the solution of a system of nonlinear equations for obtaining the starting values. c05qdf is used for this purpose. When a failure with occurs (which corresponds 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
(2)
is required at each step of computation, where and are constants. d05bdf calls c05axf to find the root of this equation.
If a failure with occurs (which corresponds to an error exit from c05axf), you are advised to relax the value of the tolnl or choose a smaller step size by increasing the value of nmesh.
If a failure with or 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.
10Example
In this example we solve the following integral equations
with the solution , and
with the solution . In the above examples, the fourth-order BDF is used, and nmesh is set to .