Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Notes On Numerical Laplace Inversion

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Notes on Numerical Laplace Inversion

Kathrin Spendier
April 12, 2010

Introduction

The main idea behind the Laplace transformation is that we can solve an equation (or system
of equations) containing differential and integral terms by transforming the equation in time (t)
domain into Laplace () domain. For example, we can use Laplace transforms to turn an initial
value problem into an algebraic problem which is easier to solve. After we solved the problem in
Laplace domain we find the inverse transform of the solution and hence solved the initial value
problem. The Laplace transform of f (t) is:
Z
f () =

et f (t) dt,

(1)

where is a complex variable known as the Laplace variable. The inverse integral is defined as the
Bromwich contour integral ( + i) as:
1
f (t) =
2i

+i
Z

et f ()d.

(2)

is chosen so the all singular points of f () lie to the left of the line Re() = in the complex
-plane.
In simple cases the inverse transform can be found via analytical methods or with the help of
tables. You can also compute the Laplace transform by evaluation of the complex integral of inverse transformation. Unfortunately, it is not always easy to find the inverts. One possible reason
is that the inverse is not a named function or can not be represented by a simple formula. Moreover, if the Laplace transform is computable or measurable on the real and positive axis only the
problem is ill-posed. Two time domain functions which differ at a single point in time for example
will have the same transform. This case is very complicated simply because of absence of the exact
inversion formula. In these cases a numerical method must be used. There are several numerical
algorithms in literature and each individual method has its own applications and is suitable for a
particular type of functions [1]. In this report I will briefly introduce the Fourier Series expansion
and the Gaver-Stehfest method.

1.1

What is the Challenge of Numerical Laplace Inversion?

The numerical inversion of f (t) depends on the sensitivity of the inversion procedure. This is
clear when we consider the need to multiply by a potentially increasing large exponent et in Eq.2.
Algorithmic and finite precision errors (i.e. increasing round off error for large numbers) can lead
to exponential divergence of numerical solutions.

Fourier Series Expansion

This method is based on the Bromwich contour inversion integral, which can be expressed as the
integral of a real valued function of a real variable by choosing a specific contour. One first converts
the inversion integral into the Fourier transform and then approximates the transform by a Fourier
series (use trapezoidal rule) with a specific discretization error.
As mentioned, the method [2] utilizes the standard Bromwich contour + i (choose a
specific contour) to rewrite the Laplace transform integral given in Eq.2 as:
et
f (t) =
2

Z
eit f ( + i)d,

(3)

which is in the form of a Fourier transform. We can even go further and rewrite eit in Eq.3 to
obtain:
Z
et
[cos (t) + i sin (t)] f ( + i)d.
(4)
f (t) =
2

Equation 4 can then be rewritten in real and imaginary parts


et
f (t) =
2

Z h n
o
n
o
i

Re f ( + i) cos (t) Im f ( + i) sin (t) d.

(5)

With the assumption that f (t) is non-negaive, f (t) = 0 for t > 0, and Re(f) is even and Im(f)
is odd we are only interested in the real part and we may write:
2et
f (t) =

n
o
Re f ( + i) cos (t)d.

(6)

Equation 6 can now be approximated by the trapezoidal rule


Zb

ba
f (x) dx
n

f (a) + f (b)
2

with a step size h =

n1
X
ba
+
f a+k
n
k=1

ba
:
n

o 2het X
n
o
het n
f (t)
Re f ( + i) +
Re f ( + ikh) cos (kht) ,

k=1

(7)

and can be further simplified if h =

2t

and =

A
2t

and written as a nearly alternating series:

A/2 X
A
A
+
2ki
eA/2
e
k
(1) Re f
f (t)
Re f
+
.
2t
2t
t k=1
2t

(8)

Equation 8 can now be computed numerically by summing over a finite number of k. Hence, A
and k are parameters which must be optimized for increasing accuracy. This method turns out to
be very accurate. The disadvantage of this method is that it is difficult to implement and requires
a large computation time [3] (i.e. sum over many terms).

Gaver-Stehfest Method

This method requires sampling of the Laplace space function f() only on the real line and is
explained in detail in Refs [5] and [6]. Similarly to the Fourier Method, we make the following
transformation in Eq.2. We define a new complex variable z = t and rewrite Eq.2 as:
Z
1
z z
f (t) =
f
e dz,
(9)
2it
t
C0

where C 0 is the same contour as in Eq.2 as a function of z. Next we approximate ez by a rational


function
n
X
k
z
e
,

k z
k=0
where k and k are complex numbers and called weights and nodes respectively. Using this
approximation and applying the Cauchy integral formula we obtain
1 X k
k f
.
f (t)
t k=0
t
n

(10)

Equation 10 approximates the inverse Laplace transform by a linear combination of transform


values. The nodes and weights are complex numbers but do not depend on f of the function argument t, but typically depend upon n. Since the weights are initially left unspecified it is typically
called a framework rather than algorithm. Hence, Eq. 10 is referred to as Unified Framework for
Numerical Laplace Inversion [4] since many different algorithms can be but into this framework,
even the Fourier method (or Euler) for which the nodes are complex values, Eq.8 [4].
The Gaver-Stehfest method considers the case in which f (t) is real-valued and the weights and
nodes are real which leads to very accurate result for functions of type et . The Stehfests algorithm is based on a probabilistic derivation [5] and approximates the time domain solution using
the following equation [1,4]:

2M
ln (2) X k ln (2)
f (t)
,
k f
t k=1
t

(11)

with the weights


min(k,M )

k = (1)

M +k

j=b(k+1)/2c

j M +1
M!

M
j

2j
j

j
kj

where bxc being the greatest integer or less than or equal to x. I implemented Eq. 11 and 12 in
Matlab using double precision, which restricts M to be less than 7. Hence, the Gaver-Stehfest
method only evaluates the function at real and positive values of the Laplace variable and sums
a total of 14 (2M ) terms. This method is easy to implement and very accurate for functions of
type et . For functions with oscillatory behavior in time domain, the Gaver-Stehfest algorithm
fails.

3.1

Some Numerical Inversion Examples implemented in Matlab

In Fig.1, I inverted f() = 1/ ( + 1) numerically and compared it to the known analytic solution
in time domain f (t) = et . As expected the Graver-Stehfest method approximates the solution
very well.
1

numerical
analytical

0.8

f(t)

0.6
0.4
0.2
0
0

10

Figure 1: Numerical Inversion (black dots) compared to analytic solution (red line) for f (t) = et .
In Fig.2, I inverted f() = 1/ (2 + 1) numerically and compared it to the known analytic
solution in time domain f (t) = sin(t). This is an example for which the Graver-Stehfest method
fails. Only for short time we obtain a good approximation.
numerical
analytical

f(t)

0.5

0.5

1
0

10

Figure 2: Numerical Inversion (black dots) compared to analytic solution (red line) for f (t) =
sin(t).

References

[1] Hassan Hassanzadeh, and Mehran Pooladi-Darvish (2007), Comparison of different numerical
Laplace inversion methods for engineering applications, Applied Mathematics and Computation,
189:1966-1981.
[2] Joseph Abate (1995), Numerical Inversion of Laplace Transforms of Probability Distributions,
ORSA Journal on Computing, 7:36-43.
[3] Kenny S. Crump (1976), Numerical Inversion of Laplace Transforms Using a Fourier Series
Approximation, Journal of the Association for Computing Machinery, 23:89-96.
[4] Joseph Abate and Ward Whitt (2006), Unified Framework for Numerically Inverting Laplace
Transforms, INFORMS Journal on Computing, 18:408-421.
[5] D. P. Gaver Jr. (1966), Observing Stochastic Processes and Approximate Transform Inversion,
Operations Research, 14:444-459.

You might also like