NAG Library Routine Document

c06lcf (invlaplace_weeks_eval)

1
Purpose

c06lcf evaluates an inverse Laplace transform at a given point, using the expansion coefficients computed by c06lbf.

2
Specification

Fortran Interface
Subroutine c06lcf ( t, sigma, b, m, acoef, errvec, finv, ifail)
Integer, Intent (In):: m
Integer, Intent (Inout):: ifail
Real (Kind=nag_wp), Intent (In):: t, sigma, b, acoef(m), errvec(8)
Real (Kind=nag_wp), Intent (Out):: finv
C Header Interface
#include <nagmk26.h>
void  c06lcf_ (const double *t, const double *sigma, const double *b, const Integer *m, const double acoef[], const double errvec[], double *finv, Integer *ifail)

3
Description

c06lcf is designed to be used following a call to c06lbf, which computes an inverse Laplace transform by representing it as a Laguerre expansion of the form:
f~ t = eσt i=0 m-1 ai e -bt/2 Li bt ,   σ > σO ,   b > 0  
where Lix  is the Laguerre polynomial of degree i.
This routine simply evaluates the above expansion for a specified value of t.
c06lcf is derived from the subroutine MODUL2 in Garbow et al. (1988)

4
References

Garbow B S, Giunta G, Lyness J N and Murli A (1988) Algorithm 662: A Fortran software package for the numerical inversion of the Laplace transform based on Weeks' method ACM Trans. Math. Software 14 171–176

5
Arguments

1:     t – Real (Kind=nag_wp)Input
On entry: the value t for which the inverse Laplace transform ft must be evaluated.
2:     sigma – Real (Kind=nag_wp)Input
3:     b – Real (Kind=nag_wp)Input
4:     m – IntegerInput
5:     acoefm – Real (Kind=nag_wp) arrayInput
6:     errvec8 – Real (Kind=nag_wp) arrayInput
On entry: sigma, b, m, acoef and errvec must be unchanged from the previous call of c06lbf.
7:     finv – Real (Kind=nag_wp)Output
On exit: the approximation to the inverse Laplace transform at t.
8:     ifail – IntegerInput/Output
On entry: ifail must be set to 0, -1 or 1. If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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
The approximation to ft is too large to be representable.
ifail=2
The approximation to ft is too small to be representable.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

7
Accuracy

The error estimate returned by c06lbf in errvec1  has been found in practice to be a highly reliable bound on the pseudo-error f t - f~ t e-σt .

8
Parallelism and Performance

c06lcf is not threaded in any implementation.

9
Further Comments

c06lcf is primarily designed to evaluate f~t  when t>0 . When t0 , the result approximates the analytic continuation of ft ; the approximation becomes progressively poorer as t becomes more negative.

10
Example

See example for c06lbf.