The type double procedure is imsl_d_inverse_laplace.
Required Arguments
f_complexfcn(f_complexz) (Input) User-supplied function for which the inverse Laplace transform will be computed.
floatsigma0 (Input) An estimate for the maximum of the real parts of the singularities of fcn. If unknown, set sigma0 = 0.0.
intn (Input) The number of points at which the inverse Laplace transform is desired.
floatt[] (Input) Array of size n containing the points at which the inverse Laplace transform is desired.
Return Value
A pointer to the array of length n whose i-th component contains the approximate value of the inverse Laplace transform at the point t[i]. To release this space, use imsl_free. If no solution was computed, then NULL is returned.
IMSL_RETURN_USER, floatx[] (Output) A user-allocated array of length n containing the approximate value of the inverse Laplace transform.
IMSL_PSEUDO_ACCURACY, floatpseudo_accuracy (Input) The required absolute uniform pseudo accuracy for the coefficients and inverse Laplace transform values.
Default: pseudo_accuracy = , where ɛ is machine epsilon
IMSL_FIRST_LAGUERRE_PARAMETER, floatsigma (Input) The first parameter of the Laguerre expansion. If sigma is not greater than sigma0, it is reset to sigma0 + 0.7. Default: sigma = sigma0 + 0.7
IMSL_SECOND_LAGUERRE_PARAMETER, floatbvalue (Input) The second parameter of the Laguerre expansion. If bvalue is less than 2.0*(sigma-sigma0), it is reset to 2.5*(sigma-sigma0). Default: bvalue = 2.5*(sigma-sigma0)
IMSL_MAXIMUM_COEFFICIENTS, intmtop (Input) An upper limit on the number of coefficients to be computed in the Laguerre expansion. Argument mtop must be a multiple of four. Default: mtop = 1024
IMSL_ERROR_EST, float *error_est (Output) Overall estimate of the pseudo error, disc_error_est + trunc_error_est + cond_error_est. See the Description section for details.
IMSL_DISCRETIZATION_ERROR_EST, float*disc_error_est (Output) Estimate of the pseudo discretization error.
IMSL_TRUNCATION_ERROR_EST, float*trunc_error_est (Output) Estimate of the pseudo truncation error.
IMSL_CONDITION_ERROR_EST, float*cond_error_est (Output) Estimate of the pseudo condition error on the basis of minimal noise levels in the function values.
IMSL_DECAY_FUNCTION_COEFFICIENT, float*k (Output) The coefficient of the decay function. See the Description section for details.
IMSL_DECAY_FUNCTION_BASE, float*r (Output) The base of the decay function. See the Description section for details.
IMSL_LOG_LARGEST_COEFFICIENTS, float*log_largest_coefs (Output) The logarithm of the largest coefficient in the decay function. See the Descriptionsection for details.
IMSL_LOG_SMALLEST_COEFFICIENTS, float *log_smallest_coefs (Output) The logarithm of the smallest nonzero coefficient in the decay function. See the Description section for details.
IMSL_UNDER_OVERFLOW_INDICATORS, Imsl_laplace_flow**indicators (Output) The address of a pointer initialized by imsl_f_inverse_laplace to point to an array of length n containing the overflow/underflow indicators for the computed approximate inverse Laplace transform. For the ith point at which the transform is computed, indicators[i] signifies the following:
indicators [i]
Meaning
IMSL_NORMAL_TERMINATION
Normal termination.
IMSL_TOO_LARGE
The value of the inverse Laplace transform is too large to be representable. This component of the result is set to NaN.
IMSL_TOO_SMALL
The value of the inverse Laplace transform is found to be too small to be representable. This component of the result is set to 0.0.
IMSL_TOO_LARGE_BEFORE_EXPANSION
The value of the inverse Laplace transform is estimated to be too large, even before the series expansion, to be representable. This component of the result is set to NaN.
IMSL_TOO_SMALL_BEFORE_EXPANSION
The value of the inverse Laplace transform is estimated to be too small, even before the series expansion, to be representable. This component of the result is set to 0.0.
IMSL_FCN_W_DATA, f_complexfcn(f_complexz, void*data) ,void*data, (Input) User supplied function for which the inverse Laplace transform will be computed, which also accepts a pointer to data that is supplied by the user. data is a pointer to the data to be passed to the user-supplied function. See Passing Data to User-Supplied Functions in the introduction to this manual for more details.
Description
The function imsl_f_inverse_laplace computes the inverse Laplace transform of a complex-valued function. Recall that if f is a function that vanishes on the negative real axis, then the Laplace transform of f is defined by
It is assumed that for some value of s the integrand is absolutely integrable.
The computation of the inverse Laplace transform is based on a modification of Weeks’ method (see Weeks (1966)) due to Garbow et al. (1988). This method is suitable when f has continuous derivatives of all orders on [0, ∞). In particular, given a complex-valued function F(s) = L[f] (s), f can be expanded in a Laguerre series whose coefficients are determined by F. This is fully described in Garbow et al. (1988) and Lyness and Giunta (1986).
The algorithm attempts to return approximations g(t) to f(t) satisfying
where Ɛ = pseudo_accuracy and σ= sigma > sigma0. The expression on the left is called the pseudoerror. An estimate of the pseudo error in available in error_est.
The first step in the method is to transform F to φ where
Then, if f is smooth, it is known that φ is analytic in the unit disc of the complex plane and hence has a Taylor series expansion
which converges for all z whose absolute value is less than the radius of convergence Rc. This number is estimated in r, obtained through the optional argument IMSL_DECAY_FUNCTION_BASE. Using optional argument IMSL_DECAY_FUNCTION_COEFFICIENT, the smallest number K is estimated which satisfies
for all R < Rc.
The coefficients of the Taylor series for φ can be used to expand f in a Laguerre series
On some platforms, imsl_f_inverse_laplace can evaluate the user-supplied function fcn in parallel. This is done only if the function imsl_omp_options is called to flag user-defined functions as thread-safe. A function is thread-safe if there are no dependencies between calls. Such dependencies are usually the result of writing to global or static variables.
Examples
Example 1
This example computes the inverse Laplace transform of the function (s- 1)-2, and prints the computed approximation, true transform value, and difference at five points. The correct inverse transform is xex. From Abramowitz and Stegun (1964).
This example computes the inverse Laplace transform of the function e-1/s/s, and prints the computed approximation, true transform value, and difference at five points. Additionally, the inverse is returned in user-supplied space, and a required accuracy for the inverse transform values is specified. The correct inverse transform is