# naginterfaces.library.sum.invlaplace_​crump¶

naginterfaces.library.sum.invlaplace_crump(f, t, relerr, alphab, tfac=0.8, mxterm=100, data=None)[source]

invlaplace_crump estimates values of the inverse Laplace transform of a given function using a Fourier series approximation. A bound on the exponential order of the inverse is required.

For full information please refer to the NAG Library document for c06la

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/c06/c06laf.html

Parameters
fcallable fp = f(p, data=None)

must evaluate the function for a given value of .

Parameters
pcomplex

The argument .

dataarbitrary, optional, modifiable in place

User-communication data for callback functions.

Returns
fpcomplex

The value .

tfloat, array-like, shape

Each must specify a point at which the inverse Laplace transform is required, for .

relerrfloat

The required relative error in the values of the inverse Laplace transform. If the absolute value of the inverse is less than , absolute accuracy is used instead. must be in the range . If is set too small or to , the function uses a value sufficiently larger than machine precision.

alphabfloat

, an upper bound for (see Notes). Usually, should be specified equal to, or slightly larger than, the value of . If then the prescribed accuracy may not be achieved or completely incorrect results may be obtained. If is too large invlaplace_crump will be inefficient and convergence may not be achieved.

Note: it is as important to specify correctly as it is to specify the correct function for inversion.

tfacfloat, optional

, a factor to be used in calculating the parameter . Larger values (e.g., ) may be specified for difficult problems, but these may require very large values of .

mxtermint, optional

The maximum number of (complex) terms to be used in the evaluation of the Fourier series.

dataarbitrary, optional

User-communication data for callback functions.

Returns
valinvfloat, ndarray, shape

An estimate of the value of the inverse Laplace transform at , for .

errestfloat, ndarray, shape

An estimate of the error in . This is usually an estimate of relative error but, if , estimates the absolute error. is unreliable when is small but slightly greater than .

ntermsint

The number of (complex) terms actually used.

naint

The number of values of used by the function. See Further Comments.

alowfloat

The smallest value of used in the algorithm. This may be used for checking the value of see Further Comments.

ahighfloat

The largest value of used in the algorithm. This may be used for checking the value of see Further Comments.

nfevalint

The number of calls to made by the function.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, the elements of are not strictly increasing.

(errno )

On entry, .

Constraint: .

(errno )

On entry, is too large: . If necessary, scale the problem as described in Further Comments.

(errno )

Required accuracy cannot be obtained. Try increasing , , or both. and .

(errno )

Convergence failure in epsilon algorithm: . Some values of may be calculated to the desired accuracy; this may be determined by examining the values of . Try reducing the range of or increasing . If = 5 still results, try reducing .

Warns
NagAlgorithmicWarning
(errno )

All values of have been calculated, but are not of the required accuracy; the values of should be examined carefully. Try reducing the range of , or increasing , or both.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

Given a function defined for complex values of , invlaplace_crump estimates values of its inverse Laplace transform by Crump’s method (see Crump (1976)). (For a definition of the Laplace transform and its inverse, see the C06 Introduction.)

Crump’s method applies the epsilon algorithm (see Wynn (1956)) to the summation in Durbin’s Fourier series approximation (see Durbin (1974))

for , by choosing such that a prescribed relative error should be achieved. The method is modified slightly if so that an estimate of can be obtained when it has a finite value. is calculated as , where . You specify and , an upper bound on the exponential order of the inverse function . has two alternative interpretations:

1. is the smallest number such that

for large ,

2. is the real part of the singularity of with largest real part.

The method depends critically on the value of . See Further Comments for further details. The function calculates at least two different values of the argument , such that , in an attempt to achieve the requested relative error and provide error estimates. The values of , for , must be supplied in monotonically increasing order. The function calculates the values of the inverse function in decreasing order of .

References

Crump, K S, 1976, Numerical inversion of Laplace transforms using a Fourier series approximation, J. Assoc. Comput. Mach. (23), 89–96

Durbin, F, 1974, Numerical inversion of Laplace transforms: An efficient improvement to Dubner and Abate’s method, Comput. J. (17), 371–376

Wynn, P, 1956, On a device for computing the transformation, Math. Tables Aids Comput. (10), 91–96