In order to find stable, accurate, and computationally efficient methods for performing the inverse Laplace transform, a new double transformation approach is proposed. To validate and improve the inversion solution obtained using the Gaver-Stehfest algorithm, direct Laplace transforms are taken of the numerically inverted transforms to compare with the original function. The numerical direct Laplace transform is implemented with a composite Simpson’s rule. Challenging numerical examples involving periodic and oscillatory functions, are investigated. The numerical examples illustrate the computational accuracy and efficiency of the direct Laplace transform and its inverse due to increasing the precision level and the number of terms included in the expansion. It is found that the number of expansion terms and the precision level selected must be in a harmonious balance in order for correct and stable results to be obtained.
Laplace transforms play a key role in many applications of mathematics to the fields of engineering, physics, and finance, whenever probability density functions, or linear differential equations or integral equations are involved. Laplace transform techniques may simplify the task of solving systems of differential equations [
Numerical inversion of Laplace transform is crucial for many applications. Unfortunately, when considering interesting examples, it is often difficult to find an analytical expression for the inverse Laplace transform. Inverting the Laplace transform is a challenging task. This challenge faced in many application areas including the finding of various performance measures in queueing and related probability models [
This paper investigate the complicated and very interesting relationship between numerical precision and the number of terms in one particular Laplace transform inversion algorithm, the Gaver-Stehfest algorithm, and illustrates this relationship using several carefully chosen numerical examples.
For numerous practical situations the inverse of Laplace transform is com- plicated and either doesn’t have a closed form, or has a solution which cannot be represented by any simple formula, performed even in symbolic software (Maple or Mathematica). An alternative is to use a numerical technique for inversion. One way to choose among various alternative methods is to provide a large set of test problems, and to demonstrate how a specific algorithm works on each of them.
Several algorithms have been proposed for numerical Laplace transforms inversion, see for instance the surveys in [
In general, lowercase letters used to denote the function f ( t ) to be transformed, and the uppercase letter C ( s ) to denote its Laplace transform, for example, L { f ( t ) } = C ( s ) . If the closed form of C ( s ) inversion is unknown, the original C ( s ) compared with numerical solution C ˜ ˜ ( s ) after double transformation. The results are illustrated in the plots and error estimations.
With the help of the arprec library [
The remainder of the paper is organized as follows. In Section 2, a brief description of the underlying theory is given, to introduce numerical Laplace double transformation technique. Sections 3 and 4, apply the Gaver-Stehfest algorithm to the test functions with various degrees numerical accuracy. In
Function | ||
---|---|---|
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 |
Sections 5 and 6, the stability and accuracy of the Laplace transform inversion and the role that the number of expansion terms and precision of the arithmetic play in the numerical results is described. Section 7 describes the algorithm and software implementation of the numerical direct Laplace transform. This section gives background material needed to provide the method, described in the next Section 8. In Section 8 the numerical double transformation technique to confirm agreement of the numerical inversion results is presented. In Section 9 compares the execution time for various arbitrary precision calculations. Concluding remarks are given in Section 10. The Appendix introduces C++ code used to implement numerical Laplace and inverse Laplace transform in arbitrary precision, and illustrates the corresponding graphical user interface with the help of several screenshots.
Let f ( t ) be a function defined for t ≥ 0 . Then the integral
L { f ( t ) } = ∫ 0 ∞ e − s t f ( t ) d t (1)
is said to be the Laplace transform of f ( t ) , provided the integral converges. The symbol L is the Laplace transformation operator, which act on the function f ( t ) and generates a new function, C ( s ) = L { f ( t ) } .
If C ( s ) represents the Laplace transform of a function f ( t ) , that is, L { f ( t ) } = C ( s ) , then f ( t ) is the inverse Laplace transform of C ( s ) and f ( t ) = L − 1 { C ( s ) } . The inverse Laplace transform L − 1 { C ( s ) } is uniquely determined in the sense that if C ( s ) = G ( s ) and f ( t ) and g ( t ) are conti- nuous functions, then f ( t ) = g ( t ) . This result is known as Lerch’s theorem [
The Laplace transform can be inverted either algebraically or numerically. The notation f ˜ ( t ) used for the numerical approximation to f ( t ) (numerical inversion of the Laplace transform C ( s ) ), and C ˜ ( s ) for the numerical Laplace transform of f ( t ) .
These results, together with the following well known properties which provide very useful numerical checks, may be applied to numerical algorithms and corresponding software.
Integralproperty , ∫ 0 ∞ e − s t f ( t ) d t = C ( 0 ) (2)
Initialvaluetheorem , lim t → 0 f ( t ) = lim s → ∞ s C ( s ) (3)
Finalvaluetheorem , lim t → ∞ f ( t ) = lim s → 0 s C ( s ) (4)
If X is the random variable with the probability density function f and the cumulative distribution function F , this gives
C ( 0 ) = ∫ 0 ∞ e − s t d F ( t ) = ∫ 0 ∞ e − s t f ( t ) d t = 1 (5)
We define the following double transformation technique for the Laplace transform of the inversion:
C ˜ ˜ ( s ) = L { L − 1 { C ( s ) } } (6)
This definition will be used to estimate the accuracy of the Laplace transform inversion, when its closed form is unknown.
After applying the Laplace transform, the problem is said to be in the Laplace domain and it is denoted as a function of s not t . While calculations might be easier in the Laplace domain, leaving the solution in the Laplace domain is typically not useful. To transform the result back into the time-domain, inverse Laplace transforms are used. When the analytical answer is unknown, it is difficult to know whether or not the numerical inversion results are accurate. Moreover, it is hard to judge whether or not changes to the method improve or degrade the inversion estimate.
The following steps are used:
1) Begin with the Laplace domain function C ( s ) .
2) Compute the numerical inversion using some set of parameters. In this case, we will control the precision level and the number of terms in the approximation. Setting the precision level to N 1 , we get
f ^ N 1 ( t ) = L N 1 − 1 { C ( s ) } (7)
3) Take the Numerical Laplace Transform of f ^ N 1 ( t ) , resulting in
L { f ^ N 1 ( t ) } = C ˜ ˜ N 1 ( s ) (8)
4) Compare the functions C ( s ) and C ˜ ˜ N 1 ( s ) , and define the error-function as:
ε N 1 ( s ) = | C ( s ) − C ˜ ˜ N 1 ( s ) | (9)
5) Repeat the process with some other precision level N 2 .
6) Compare ε N 1 ( s ) and ε N 2 ( s ) . The precision level that provides lower errors is superior, and the difference between the error functions can provide a way of quantifying the accuracy improvement gained from increasing the precision level.
This demonstration applies the Gaver-Stehfest algorithm [
The inverse Laplace transform of C ( s ) is f ( t ) , defined such that the following must hold:
C ( s ) = ∫ 0 ∞ e − s t f ( t ) d t (10)
J 0 ( t ) = ∑ n = 0 ∞ ( − 1 ) n t 2 n 2 2 n ( n ! ) n , and J 0 ( s ) = 1 1 + s 2 (11)
The Gaver-Stehfest method [
f ( t ) ≈ ln ( 2 ) t ∑ n = 1 L K n F ( n ln ( 2 ) t ) , (12)
where F ( ⋅ ) is the Laplace transform of f ( t ) . The coefficients K n depends only on the (necessarily even) number of expansion terms, L , given by:
K n = ( − 1 ) n + L / 2 ∑ k = ⌊ n + 1 2 ⌋ min ( n , L / 2 ) k L / 2 ( 2 k ) ! ( L / 2 − k ) ! k ! ( k − 1 ) ! ( n − k ) ! ( 2 k − n ) ! (13)
For each function an error E is calculated as the measure for the accuracy of the numerical solution. Let f ( t ) be the analytical solution defined for t = t 1 , t 2 , ⋯ , t m . We define by f ˜ ( t ) = L − 1 { C ( s ) } the numerical solution. Then E gives the root-mean-square deviation between the analytical and numerical solutions for the t values [
E = ( ∑ i = 1 m ( f ( i / 2 ) − f ˜ ( i / 2 ) ) 2 / m ) 1 / 2 , i = 1 , 2 , ⋯ m (14)
The sum (12) doesn’t provide convergence due to roundoff errors for the large number of terms L , usually if L exceeds the number of decimal digits of precision N (e.g. L greater than 16 for standard double precision arithmetics). The software implementation of the numerical Laplace transform and the Laplace transform inversion are given in the Appendix.
Numerical inversion of the Laplace transform is an unstable process, so all algorithms are applied in arbitrary precision. In
Example 1. The first function explored is:
C ( s ) = 1 s + 2 , with f ( t ) = e − 2 t , (15)
where f ( t ) = e − 2 t is the exact solution of the inversion. The results correspond to finding numerical inverse Laplace transform are plotted in
Function | N = 16 | N = 32 | N = 64 | N = 128 | N = 256 | |
---|---|---|---|---|---|---|
1 | 5.66e−6 | 1.22e−9 | 6.52e−17 | 2.25e−32 | 7.02e−69 | |
2 | 3.44e−2 | 7.33e−3 | 2.46e−4 | 1.54e−10 | 5.38e−36 | |
3 | 6.13e−1 | 5.04e−1 | 1.68e−1 | 2.44e−5 | 1.01e−27 | |
4 | 1.43e+1 | 1.35e+1 | 6.34e0 | 1.33e−3 | 9.88e−26 | |
5 | 3.51e−2 | 2.09e−2 | 4.80e−3 | 3.66e−7 | 3.84e−30 | |
6 | 1.12e−1 | 8.04e−2 | 2.26e−2 | 2.12e−6 | 2.78e−16 | |
7 | 2.59e−1 | 6.16e−3 | 3.83e−13 | 2.14e−41 | 2.84e−88 |
calculations in double precision are at the order of 10 − 6 . In the plot, the inver-
sion f ˜ ( t ) = L − 1 { 1 s + 2 } and the exact solution f ( t ) = e − 2 t visibly overlapp-
ing even for N = 16 . The precision from N = 32 to N = 256 gives the sequence of improvements. High accuracy is borne out by the errors at the order 10 − 32 and 10 − 69 respectively to the precision N = 128 and N = 256 .
Example 2. The next test function inverted is
C ( s ) = 1 ( s + 0.2 ) 2 + 1 , with f ( t ) = e − 0.2 t sin ( t ) , (16)
and the results correspond to numerical inverse Laplace transform are shown graphically in
Example 3. The
C ( s ) = 1 s 2 + 1 , with f ( t ) = sin ( t ) (17)
Steady improvement of the answer is observed through N = 128 . By N = 128 the inversion is indistinguishable from the exact solution on the inter- val shown, but will eventually diverge from the exact solution for some higher values of t .
Example 4.
C ( s ) = s 2 − 1 ( s 2 + 1 ) 2 , with f ( t ) = t cos ( t ) (18)
Similar to the previous two test functions, as N increases, the interval on which the inversion is more accurate gets longer. Since the function is diverging and oscillating, the inaccuracies are more visible than in the previous two figures.
Example 5. Consider the inverse of the function
C ( s ) = tan − 1 ( 1 s ) , with f ( t ) = sin ( t ) t (19)
In
Example 6. The inverse results to the function
C ( s ) = 1 1 + s 2 , with f ( t ) = J 0 ( t ) (20)
is plotted in
Naively it would seem that continuing to increase the number of terms L would improve the accuracy of the approximation, since more terms seem to produce results closer to the exact solution. Consider the Bessel example with the precision level N = 32 , increasing the number of terms to L = 64 . The result is slightly better, close to 2.26 × 10 − 2 , that for N = 64 and L = 64 . But using the precision level N = 32 and the number of terms in the approximation L = 128 (
Example 7. Consider the inverse of the function
C ( s ) = e − 1 / s s 3 / 2 , with f ( t ) = sin ( 2 t ) π (21)
In
As can be seen from
accuracy (at least 16 decimal place accuracy) increasing the precision level up to 256 digits.
In
Let N = 16 . Increasing the number of terms in the computation to L ≥ 64 it appears that the numerical inversion becomes unstable and functions are dominated by numerical errors. If N = 32 and N = 64 , the numerical inver-
N = 16 | N = 32 | N = 64 | N = 128 | N = 256 | |
---|---|---|---|---|---|
L = 16 | 3.44e−2 | 3.44e−2 | 3.44e−2 | 3.44e−2 | 3.44e−2 |
L = 32 | 7.33e−3 | 7.33e−3 | 7.33e−3 | 7.33e−3 | 7.33e−3 |
L = 64 | 4.66e+10 | 2.66e−4 | 2.46e−4 | 2.46e−4 | 2.46e−4 |
L = 128 | 2.78e+53 | 6.86e+38 | 1.01e+10 | 1.54e−10 | 1.54e−10 |
L = 256 | 2.99e+139 | 5.47e+124 | 9.72e+95 | 4.57e+23 | 5.38e-36 |
sion becomes unstable for L ≥ 128 . If N = 128 , the numerical inversion becomes unstable for L ≥ 256 . On the other hand there is only slight improvement if the precision exceeds the number of terms, N > L .
Similar conclusions may be drawn from the results reported in
N = 16 | N = 32 | N = 64 | N = 128 | N = 256 | |
---|---|---|---|---|---|
L = 16 | 2.59e−1 | 2.59e−1 | 2.59e−1 | 2.59e−1 | 2.59e−1 |
L = 32 | 6.16e−3 | 6.16e-3 | 6.16e−3 | 6.16e−3 | 6.16e−3 |
L = 64 | 3.33e+13 | 1.19e−1 | 3.83e−13 | 3.83e−13 | 3.83e−13 |
L = 128 | 4.64e+56 | 2.00e+42 | 3.08e+13 | 2.14e−41 | 2.14e−41 |
L = 256 | 1.60e+143 | 6.17e+128 | 1.14e+100 | 7.94e+27 | 2.84e−88 |
The error estimates are given for the example
f ( t ) = sin ( 2 t ) π , with C ( s ) = e − 1 / s s 3 / 2 (22)
Let N = 16 . Increasing the number of terms in the computation to L ≥ 64 we can see that the numerical inversion becomes unstable. If N = 32 and N = 64 , the numerical inversion failed for L ≥ 128 . In case of N = 128 , the numerical inversion becomes unstable for L ≥ 256 . There is only a slight improvement if the precision exceeds the number of terms N > L . Again as can be seen from
Evidently the two plots in
The Laplace transform of a function f ( t ) is defined by (1) on the interval [ 0 , ∞ ] . The problem of an infinite upper limit of integration may be removed by the substitution t = − ln ( u ) , d t = u − 1 d u which replaces infinite by finite limits.
When t = 0 , u = 1 and when t → ∞ , u → 0 . Then
∫ 0 ∞ e − s t f ( t ) d t = ∫ 0 ∞ e ln ( u s ) f ( − ln ( u ) ) u − 1 d u = ∫ 0 1 u s − 1 f ( − ln ( u ) ) d u (23)
The behaviour of the function to be transformed must be considered at the new limits, and the exponential function inside the integral requires special examination in terms of high accuracy.
Compute the Direct Laplace Transform by Composite Simpson’s RuleFor integration over the interval [ a , b ] , an even n is chosen such that the function is adequately smooth over each subinterval [ x j , x j + 1 ] where
x j = a + j h for all j ∈ { 0 , 1 , 2 , ⋯ , n } with h = b − a n . In particular, x 0 = a and x n = b . Then, the composite Simpson’s Rule is given by [
∫ a b f ( x ) d x ≈ h 3 [ f ( x 0 ) + 2 ∑ j = 1 n / 2 − 1 f ( x 2 j ) + 4 ∑ j = 1 n / 2 f ( x 2 j − 1 ) + f ( x n ) ] (24)
Applying this to the transformed integrand from the Equation (23) we get u j = j h for all j ∈ { 0 , 1 , 2 , ⋯ , n } with h = 1 n . Therefore,
C ( s ) ≈ 1 3 n [ 0 s − 1 f ( − ln ( 0 ) ) + 2 ∑ j = 1 n / 2 − 1 u 2 j s − 1 f ( − ln ( u 2 j ) ) + 4 ∑ j = 1 n / 2 u 2 j − 1 s − 1 f ( − ln ( u 2 j − 1 ) ) + 1 s − 1 f ( − ln ( 1 ) ) ] (25)
The basic Simpson’s rule formula divides the interval [ a , b ] of integration into two pieces. To apply the composite Simpson’s rule, the interval [ a , b ] must
be divided into an even number of subintervals n = 2 m . Then h = b − a n = b − a 2 m .
Let f be a function with four continuous derivatives. Then, the composite Simpson’s rule converges to the true value of the integral with rapidity n − 4 at worst. The error committed by the composite Simpson’s rule is bounded in absolute value by [
E n = − ( b − a ) 5 180 n 4 max | f 4 ( ξ ) | , a < ξ < b (26)
For numerical Laplace transform in the obtaining approximate integral by this rule, some modifications must be made. First, the term 0 s − 1 f ( − ln ( 0 ) ) in (25) must be addressed. This term addresses the behaviour of the function at infinity. If the Laplace transform exists, the lim t → ∞ e − s t f ( t ) → 0 , meaning that the exponential dampening term outweighs the value of f ( t ) at infinity. Therefore, lim t → ∞ f ( t ) must either exist or oscillate between some finite bounds. As such, it may be concluded that the term 0 s − 1 f ( − ln ( 0 ) ) vanishes and may be dropped from the formulation.
Next, we need to examine the last term, 1 s − 1 ⋅ f ( − ln ( 1 ) ) = f ( 0 ) . Evaluating this term should require that the function be defined at t = 0 . This can however prove problematic since many applications of the Laplace transform result in t -domain functions that have singularities at t = 0 . As such, we change the domain of integration to be ( 0 , 1 − ϵ ) as opposed to ( 0,1 ) , where ϵ is the machine epsilon depending on the precision level used. For example, in double precision ( N = 16 ) , ϵ ≈ 2.22 × 10 − 16 .
Therefore we have:
C ( s ) ≈ 1 3 n [ 2 ∑ j = 1 n / 2 − 1 u 2 j s − 1 f ( − ln ( u 2 j ) ) + 4 ∑ j = 1 n / 2 u 2 j − 1 s − 1 f ( − ln ( u 2 j − 1 ) ) + u n s − 1 f ( − ln ( u n ) ) ] , (27)
where n is the number of subintervals, h = 1 − ϵ n , and ϵ is the machine epsilon at the precision level.
Our C++ software implementation of the numerical Laplace transform is based on Equation (27). The following improvements were made to speed up the calculations. Notice that only the powers of u depend on s in the Equation (27). As such, the function evaluations, f ( − ln ( u j ) ) , need not be evaluated every time a new s value is calculated. This is especially useful in the double transformation calculations because each evaluation of the function f ^ ( t ) is the numerical inversion of C ( s ) at some point t . Depending on the precision level, this can be an extremely time consuming step. The implementation of the method is shown in Appendix.
Example 8. The numerical Laplace transform for the Bessel function J 0 ( t ) is plotted in
C ( s ) = L { J 0 ( t ) } and the exact solution C ( s ) = 1 1 + s 2 for Bessel function J 0 ( t ) is shown in
Example 9. Consider the following Laplace transform example
f ( t ) = sin ( 2 t ) π , and C ( s ) = e − 1 / s s 3 / 2 (28)
Numerical Laplace transform results are shown in
Example 10. The first computation presented in this section is the theoretical error for Numerical Laplace transform of the function
f ( t ) = e − 2 t , with C ( s ) = 1 s + 2 , (29)
where C ( s ) is the exact Laplace transform solution. Let the number of subintervals n = 2 m = 256 . From the Equation (26) we have
E n ≤ 1 180 × 256 4 max | f ( 4 ) ( u ) | (30)
The integral ∫ 0 1 u s − 1 f ( − ln ( u ) ) d u is used, where u = e − t . Now f ( u ) = u 2 . This yields
∫ 0 1 u s − 1 f ( − ln ( u ) ) d u = ∫ 0 1 u s − 1 u 2 d u = ∫ 0 1 u s + 1 d u (31)
The integrand f ( u ) = u s + 1 has four continuous derivatives and f ( 4 ) ( u ) = s ( s − 1 ) ( s + 1 ) ( s − 2 ) u s − 3 .
Because 0 ≤ u ≤ 1 , then for example if s = 0.7 ,
E n ≤ 1 180 × 256 4 max | f ( 4 ) ( u ) | = 1 180 × 256 4 × 0.464 ≈ 6 × 10 − 13
Error | |||
---|---|---|---|
0.1 | 0.942376 | 0.995037 | 5.266103e−2 |
0.2 | 0.964656 | 0.980581 | 1.592439e−2 |
0.3 | 0.953056 | 0.957826 | 4.770068e−3 |
1 | 0.707105 | 0.707107 | 1.438876e−06 |
2 | 0.447214 | 0.447214 | 3.906561e−11 |
3 | 0.316228 | 0.316228 | 1.001639e−13 |
4 | 0.242536 | 0.242536 | 9.999995e−14 |
5 | 0.196116 | 0.196116 | 9.999975e−14 |
Error | |||
---|---|---|---|
1 | 3.678744e−1 | 3.678794e−1 | 5.625486e−06 |
2 | 2.144409e−1 | 2.144410e−1 | 2.318805e−08 |
10 | 2.861345e−2 | 2.861347e−2 | 2.317171e−08 |
30 | 5.886267e−3 | 5.886290e−3 | 2.317492e−08 |
50 | 2.772397e−3 | 2.772421e−3 | 2.317815e−08 |
100 | 1.719596e−3 | 1.719619e−3 | 2.318121e−08 |
120 | 7.543895e−4 | 7.544127e−4 | 2.318945e−08 |
140 | 5.993618e−4 | 5.993850e−4 | 2.319269e−08 |
Next we compare this theoretical error bound result with the numerical error obtaining by two step double transformation technique, on
C ˜ ˜ ( s ) = L { L − 1 { 1 s + 2 } } (32)
The error at s ≈ 0.7 ( log 2 s = − 0.5 ) for N = 250 subintervals. For the precision level 64 the error is at the order of 10 − 17 , and for the precision level 128 the accuracy is much better, at the order 10 − 30 .
For the precision levels 16 and 32 the accuracy are at the order 10 − 7 and 10 − 12 respectively. For the precision levels 16 and 32, the accuracy of the answer has deteriorated due to roundoff error. Note that this error of the inverse Laplace transform is ignored in the first step of the calculation as it is much smaller than suggested by the composite Simpson’s rule in the second step of the double transformation algorithm.
Example 11. This example illustrates two steps of the numerical double transformation calculation
C ˜ ˜ ( s ) = L { L − 1 { e − 1 / s s 3 / 2 } } (33)
Example 12. Numerical double transformation for Bessel function of order 0 is given in
Error | |||
---|---|---|---|
0.1 | 0.987647 | 0.995037 | 7.390034e−3 |
0.2 | 0.979209 | 0.980581 | 1.371815e−3 |
0.3 | 0.957524 | 0.957826 | 3.018401e−4 |
1 | 0.707107 | 0.707107 | 3.477729e−07 |
2 | 0.447214 | 0.447214 | 5.855865e−07 |
3 | 0.316228 | 0.316228 | 1.241552e−07 |
4 | 0.242536 | 0.242536 | 4.256322e−08 |
5 | 0.196116 | 0.196116 | 1.135660e−08 |
Example 13. Numerical double transformation results for the function C ( s ) = e − 1 / s s 3 / 2 are given in
Consider again double transformation results for the function C ( s ) = e − 1 / s s 3 / 2 .
Let s = 2 ( log 2 s = 1 ) and the precision level N = 32. The results illustrated in the four plots (
The execution time for the test functions is shown in
Let N be the precision level. We approximate the relative CPU time t ( N ) for inverse and direct Laplace transform algorithms by the polynomial p ( N ) of degree 6. There are seven coefficients and the polynomial is:
p ( N ) = p 1 ∗ x 6 + p 2 ) ∗ x 5 + p 3 ∗ x 4 + p 4 ∗ x 3 + p 5 ∗ x 2 + p 6 ∗ x + p 7 (34)
For inverse Laplace transform algorithm, the coefficients in the polynomial p ( N ) of degree 6 are:
Error | |||
---|---|---|---|
1 | 3.678790e−1 | 3.678794e−1 | 4.315168e−07 |
2 | 2.144410e−1 | 2.144410e−1 | 8.855806e−11 |
10 | 2.861347e−2 | 2.861347e−2 | 9.927583e−11 |
30 | 5.886290e−3 | 5.886290e−3 | 1.452239e−10 |
50 | 2.772420e−3 | 2.772420e−3 | 1.461473e−10 |
100 | 9.900497e−4 | 9.900498e−4 | 1.436632e−10 |
120 | 7.544126e−4 | 7.544127e−4 | 1.431769e−10 |
140 | 5.993848e−4 | 5.993850e−4 | 1.4283671e−10 |
Precision Level (N) | 16 | 32 | 64 | 128 | 256 | 512 | 750 | 1000 |
---|---|---|---|---|---|---|---|---|
Inverse Laplace Transform | 1 | 3 | 25 | 200 | 1.80e3 | 1.91e4 | 7.95e4 | 2.17e5 |
Direct Laplace Transform | 1 | 1.65 | 2.04 | 4.52 | 10.25 | 22.07 | 37.33 | 70.51 |
p ( 6 ) = ( p 1 , p 2 , p 3 , p 4 , p 5 , p 6 , p 7 ) = ( − 4.673630 e − 13 , 9.235484 e − 10 , − 4.371448 e − 07 , 2.108954 e − 04 , − 1.350226 e − 02 , 5.725313 e − 01 , − 6.348896 e + 00 ) .
For the direct Laplace transform, the coefficients in the approximation polynomial p ( N ) of degree 6 are:
p ( 6 ) = ( p 1 , p 2 , p 3 , p 4 , p 5 , p 6 , p 7 ) = ( − 6.42651 e − 17 , 2.43029 e − 14 , 3.199151 e − 10 , − 4.079160 e − 07 , 1.878244 e − 04 , 9.7309 e − 03 , 9.178160 e − 01 ) .
In
Laplace Transform applications often require high accuracy beyond IEEE double precision. Common situations involve calculations that are numerically unstable, and even double-double precision is not sufficient to reach the necessary accuracy. Roundoff and underflow/overflow errors that occur during the computations can cause severe stability problems. There are several numerical inverse Laplace transform methods, each successful in some fields. The problem is to find methods successful in stability, accuracy and computational efficiency. Overall, the presented double transformation approach provides an effective way to compare the effectiveness of numerical inversion methods. In order to validate and improve the inversion solution, the numerical direct Laplace transform are used for this inversion, and compared it with the original Laplace transform. We implemented the composite Simpson’s Rule for direct Laplace transform, and investigate the role that extended precision can play obtaining accurate transform inversions. The high precision approach seems to be an effective way to handle the challenging problems dealing with periodic functions. We demonstrated that the level of precision chosen must match algorithms properly. In the Gaver-Stehfest algorithm the balance is between the truncation error and roundoff error. High precision in an inaccurate algorithm yield little benefit, while a potentially highly accurate algorithm may be defeated by roundoff error if inadequate accuracy is used.
Matt Davison thanks to Natural Sciences and Engineering Research Council of
Canada for research funding. We are also grateful to the anonymous referees for useful suggestions which improved the present work.
Krougly, Z., Davison, M. and Aiyar, S. (2017) The Role of High Precision Arithmetic in Calculating Numerical Laplace and Inverse Laplace Transforms. Applied Mathematics, 8, 562- 589. https://doi.org/10.4236/am.2017.84045
The Gaver-Stehfest algorithm of inverse Laplace transform was implemented in multiple precision as described in Section 4. Numerical direct Laplace transform was implemented in multiple precision by the composite Simpson’s Rule, as covered in details in Section 7. The calculations can be performed in C++ up to 1000 places of decimals/1000 significant digits.
The C++ code of the inverse Laplace transform and direct Laplace transform are given below.
1. C++ implementation of the Gaver-Stehfest algorithm for inverse Laplace transform
Previously
Let increase t up to 100. The results in
Next (
Submit or recommend next manuscript to SCIRP and we will provide best service for you:
Accepting pre-submission inquiries through Email, Facebook, LinkedIn, Twitter, etc.
A wide selection of journals (inclusive of 9 subjects, more than 200 journals)
Providing 24-hour high-quality service
User-friendly online submission system
Fair and swift peer-review system
Efficient typesetting and proofreading procedure
Display of the result of downloads and visits, as well as the number of cited articles
Maximum dissemination of your research work
Submit your manuscript at: http://papersubmission.scirp.org/
Or contact am@scirp.org