You are on page 1of 9

Numerical Inversion of Laplace Transforms by Relating

Them to the Finite Fourier Cosine Transform


H. D U B N E R A N D J. A B A T E

Computer Applicalions, [nc., New York, New York


ABSTRACT. In this p a p e r the problem of readily determining the inverse Laplace t r a n s f o r m
numerically b y a method which meets the efficiency requirements of a u t o m a t i c digital computation is discussed. Because the r e s u l t a n t inverse function is given as a Fourier cosine series,
the procedure requires only a b o u t ten FOWrRA~ s t a t e m e n t s . F u r t h e r m o r e , it, does not require
the use of involved algorithms for the generation of any special functions, b u t uses only cosines
and exponentials.
The basis of the m e t h o d hinges on the fact t h a t in evaluating the inverse Laplace t r a n s f o r m
integral there exists a freedom in choosing the contour of integration. G i v e n certain restrictions, the contour may be any vertical line in the right-half plane. Specifying a line, the integral
to be evaluated is essentially a Fourier integral, ttowever, the m e t h o d is concerned with determining the proper line, so t h a t when the integral (along this line) is approximated, the error
is as small as desired b y virtue of having chosen the p a r t i c u l a r contour.
KEY WORDS AND PHRASES: q u a d r a t u r e , infinite range, integration, convolution, numerical
integration, q u a d r a t u r e error, Laplace transform, Fourier transform, inversion
CR CATEGORIES: 5.10, 5.16, 5.19

1. Introduction
The integral transform of a function f(t) known as the Laplace transform, and its
inversion formula, are defined as follows:

F(s) =

f/

e-"tf(t) dt,

(1)

= - -1 fa+i~ e'tF(s) ds,

(2)

where a > 0 is arbitrary, but must be chosen so that it is greater than the real parts
of all the singularities of F(s). For. purposes of discussion, it is herein assumed that
these integrals exist for Re s > a > 0. ( T h a t is, it is assumed there are no singularities of F(s) to the right of the origin; for the case of singularities to the right, a
suitable translation of the imaginary axis can be performed, and the theory developed here is still applicable.)
There then exists a freedom in choosing the contour over which the inverse Laplace
transform may be evaluated; any vertical line with the abscissa a > 0 will provide
a suitable contour. The freedom in assigning the parameter a provides the basis for
a powerful computational method in determining the inverse integral. We show t h a t
the inverse integral may be approximated arbitrarily close by a certain Fourier
series. The error which is calculated can be made as small as desired by appropriately choosing the parameter a. In other words, the procedure yields a good result

Journalof the Associationfor Computing l~Iaehinery,Vol. 15, No. 1, January 1968, pp. 115-123.

116

H. DUBNER AND J. ABATE

by virtue of having chosen the particular contour over which the integral is approximated.
This method is effective in meeting the requirements of automatic digital computation in an efficient manner for two reasons. First, it is fast (economical) on the
digital computers now available in contrast to other more complicated methods of
numerical quadrature. (See, for example, the method described by Schmittroth [1],
which is based on a Gaussian quadrature scheme originally developed by Hurwitz
and Zweifel [2]). Second, the method is conceptually simple and requires a minimum
of programming effort because the resultant inverse function is give:: as a Fourier
cosine series with the coefficients being appropriate values of the forward transform.
Therefore one avoids the use of involved algorithms which are encountered in
methods using orthogonal functions, such as those given by Weeks [3], Papoutis
[4], and Belhnan [5].
To begin, we make the usual restriction that f(t) be a real function. This leads to
the well-known result [1], that we may replace cqs. (1) and (2) by
Re {F(s)} =

f0 ~

e-tf(t) cos wt dt,

f(t) = 2cot

71" f0 ~

Re {F(s)} cos wt dw,

(3)
(4)

where s = a + iw. Equations (3) and (4) also constitute an integral transform and
its inversion formula, being a special case of the Laplace transform for real functions.
Now take note of the fact that eq. (3) is nothing more than the Fourier cosine
transform of a function having an attenuation factor. Therefore, speaking loosely,
it can be said that f(t) is completely determined from a knowledge of the continuous
frequency spectrum of Re {F(s)}. However, we know that if we want to determine
a function only over a finite interval, then a discrete spectrum will suffice. But this
is really always the case since one is interested in the function numerically only for
a specific region which is finite. Hence, the method we propose to develop for inverting the Laplace transform is to find the relationship of eq. (3) with the finite
ti'ourier cosine transform. Such a transform has a Fourier cosine series as its inversion formula, thereby requiring only a discrete frequency spectrum to determine
its inverse. Because the relation between the Laplace transform and the finite
Fourier cosine transform is not exact the method will determine f(t) to within a
certain eaJculable error which can be small enough to achieve the required numerical
accuracy one desires. Therefore, the method will permit a good numerical determination o f f ( t ) over a finite interval of interest from a knowledge of a discrete frequency
spectrum of Re {F(s)}.

2.

Method

Given a real furlction h(t) such


function each of length 7'. T h a t
(n -t- 1)T) for n = 0, 1, 2, . . . .
boundaries, construct an infinite
riod 2T. (See Figure 1.)

that h(t) = 0 for t < 0, consider sections of the


is, separately consider h(t) in the intervals (nT,
By indefinitely reflecting each section through its
set of even periodic functions gn(t), each with pe-

Journal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968

Numerical Inversian of Laplace Transforms

117

Hence, b y definition for n = 0, 1,2, . , we have

g,~(t)

fh(t),
~h(2nT-- t), ( n -

nT < t < (n +

1)T,

1 ) T < t < nT.

(5)

For the purpose of giving a Fourier series representation to each gn(t), rewrite
eq. (5) so t h a t the functions are defined on the interval ( - T , T). We find for
n=0,2,4,
.-.,

~]~(nT +

t),

g~(l)=U~(nT_t),
and f o r n = 1 , 3 , 5 ,

0 < t < T,

(6a)

-r<t<o,

..-,

g~(t)

~h((n + 1 ) T -- t),
= [ h ( ( n + 1 ) T + t),

(6b)

h(t) : e-at f(t)

h(t)

-T

0 < t < T,
- - T < t < 0.

2T

3T

~l(t)

T
gz(t)

V
FIG. 1

Journal of the Association for Computing Machinery, Vol. 15, No. 1, J a n u a r y 1968

118

H.

DUBNER

AND

J.

ABATE

Therefore, the Fourier representation1 of each g,,(t) is given by


2

A,,,kcos

(7)

where the coefficients, which are the finite Fourier cosine transforms, are
An.k= 7'

So"

A,,k = 2

Io"

h(nT+x)

x dx,

cos

n = 0,2,4,...,

and

h((n-4- 1 ) T - - x) cos

x dx,

n = 1,3,5, . . .

(Sb)

A simple transformation of the variable of integration permits us to rewrite eq. (8)


in the more compact form:
A~,k = ~

:r

h(t) cos

t dr.

(8)

Hence, it is seen from eq. (8) that to convert the finite Fourier cosine transform

An.k to a true integral transform is to sum over n so t h a t the upper limit becomes
infinite. Then, summing eq. (7) over n, we find

g,(t) = ~

n=O

A(wk) cos

(9)

k~l

where

A(wk) =

i;

h(t) cos

t)

dt.

(10)

Now it is seen that A (wk) is a Fourier cosine transform, and if we introduce an attenuation factor by letting

h(t) = e-7(t),

(11)

it is indeed the Laplace transform of a real function f ( t ) with the transform variable
being given s = a -P i(ku/T). That is, A(wk) = Re {F(s)}.
Therefore, eq. (9) becomes

~e
n ~0

g:(t) = - - ~

Re IF(a)} --P ~ R e

F a -t- kvi\

k=l

where we have also multiplied both sides of the equation by the attentuation factor
at
e

Now the left-hand side of eq. (12) is almost the inverse Laplace transform of
F(s) in the interval (0, T), but it contains an error. Let us determine the left-hand
side of eq. (12) for the interval (0, 7') by using eq. (6); then

~ea~gn(t) = ~ea~h(2nT + t)~- ~ea~h(2nT - t ) .


Using also eq. (11 ) and separating out the zero term which is f(t), we find

e"tg~(t) = f(t) -p nI~aon,

Journal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968

(13)

Numerical [nvers'i(m of Laplace Transforms

119

where
exp (--2aTn)[f(2nT + t) + exp (2at)j(.n7 -- t)].

ERROt{ -~

(14)

n=l

In Section 3 it, is demonstrated that the error term can be made conveniently
small only for t < 7'/2. Therefore, we further restrict our determination of eq. (12)
to the interval (0, T/2). Hence, we reach the conclusion t h a t for this interval the
inverse Laplace transform can be found to any desired accuracy by the formula

f ( t ) "- ~- - 3 ~

{F(a) } + R e
k=l

a + - ~ T ) f cos

(15)
'

Upon comparison of eq. (15) with eq. (4), it is seen t h a t the approximation
formula we have derived for the integral is nothing more t h a n a trapezoidal rule.
At first this m a y be surprising; however, in a recent paper by de Balbine and Franklin [6] concerning the evaluation of Fourier integrals, it is shown that "the trapezoidal rule is at least as good as any other rule of quadrature for infinite-range integrals." However, our result goes further, since the error usually associated with a
trapezoidal rule is simply determined by the size of the step used. Also, in our case,
for a given step size, we can make the error smaller by varying the parameter a.

3. Error Analysis
We now show t h a t after having determined T, which yields the step size (~r/T) for
the trapezoidal rule that approximates f(t), the error can be made arbitrarily small
by appropriately choosing the parameter a. To determine the size of the error given
by eq. (14), we must know something about the function f(t) for large t. Since it
has been assumed that F(s) has no singularities to the right of the origin, then f(t)
is bounded at infinity by some function of the form Ctm, where C is a constant and
m can be any nonnegative integer.
To begin, let us assume that f(t) is bounded by some constant C for all t. T h a t is,
if f(/) < C, then for this ease eq. (14) may be summed and we find
ERROR < C exp ( - a T "4- at) cosh at/sinh aT.

(16)

Since the error becomes prohibitively large as t approaches T, our representation


is restricted to the interval 0 < t < T/2. Then it can be said t h a t eq. (15) represents
f(t) on the interval (0, T/2) with an error of the order C exp ( - - a T ) . For example,
suppose after determining T, an a is chosen such that aT = 10. Then for the ease
under consideration, our approximation of f(t) on the interval (0, T/2) is good to
within an error of the order C. 10-5.
In general it is found that if f(t) < Ct~, then the error in representing f(l) by
eq. (15) on the interval (0, T/2) is given by
ERROR ~ C(1.5T) m exp ( - - a T ) .

(17)

Therefore, the numerical procedure for using the approximation for f ( l ) given by
eq. (15) is as follows: First we determine T from the interval over which f(t) is desired. T h a t is, suppose tm,x is the largest value of t for which we require the function;
then T = 2t ...... Having 7' and knowing how f(t) behaves at infinity, we then use

Journal of tile Association for Computing Machinery, Voi. 15, No. 1, J a n u a r y 1968

120

*L DUBNE[{ AND a. ABATE

eq. (17) in choosing the parameter a such that our error is within the numerical
accuracy desired.
To obtain a certain desired numerical accuracy we must yet contend with another
error, that of not being able to sum the Fourier series to infinity. In all practical
problems we truncate the series after N terms. For a precise determinatio~ of this
error, the well-known result of [7] is given: "The partial sum of the Fourier series
truncated after ( N 4- 1) terms is given

f~(t)

-- j_

t)

where the kernel is defined as


CN(X)

9 sin x/21-1. ''


sin ( N -~ ~)X [~

However, use of this criterion requires ~ knowledge of the function. A more


practical determination is found by using the fact that for an oscillating series,
the error intruneating the series is approximately the value of the term at which t,he
truncation is made.
4.

Numerical Examples

The following three examples are representative of problems used to test the approximation method developed above. T h e first example was chosen to demonstrate
the method for a function which is unboun<led. The other two were chosen because
they have been used by other authors to illustrate other methods for the mmlerical
inversion of Laplace transforms. T h e format of the examples is as follows (see Tables
1-3): The first column gives values (>f the independent w,riable t and the second
column, exact values of f(t). The third e.ohmm gives the approximate values of
f(t) given the value of a T and N, the mmd)er of terms used in the Fourier series.
Column four gives approximate values obtained by other authors using differen~
techniques for numerical inversion.
Example 1.

F(s)

Example 2.

F(s) = (,s~ + s + 1) -~', f(t) = } e x p ( - t / 2 )

Example3.

F(s) = s -1 exp ( - - 2 5 8 ) ;

= s(s 2 +

t)=2;

f(t)

= t/2 sin t.

j'(t) = U(t - 25).

TABI,E 1
t

O.
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
10.0

Exact f ( t )

0.
.4207355
.9092974
.2116800
--1.5136050
--2.3973107
--.8382465
2.2994530
3.9574329
1.8545331
--2.7201055

A.pproximate f(t)
aTl" = 15, N ,- 1000

0.
.4207355
.9092974
.2116800
--1.5136050
--2.3973107
--.8382465
2.2994531
3.9574330
1.8545326
--2.7201104

A pproxin~ate f(t)

aT = 10, N = 100
.000082
.420732
.009297
.211683
--1.513614
-2.397300
-.838262
2.299529
3.957423
1.854535
--2.7209556

............T...........
1 ~ t.ha Asaodatioa for Computing Maehinerr~,:! V!: !5! N 0- I, January 1968

sin3t/2.

Nuance'iced fnversian of Laplace Transforms

121

TABLE 2
t

Exact/(t)

.0
.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
5.5
6.0
6.5
7.0
7.5
8.0
8.5
9.0
9.5
10.0

A ppro,yimate/(t)
aT
= 8, N = 2000

.0
.3773
.5335
.5254
.4193
.2741
.1332
.0221
-.0495
-.0834
-.0879
--.0737
-.0509
-.0272
--.0076
.0057
.0127
.0145
.0128
.0093
.0054

.0020
.3773
.5335
,5254
.4193
.2741
.1332
.0221
--.0495
-.0834
--.0879
-.0737
--.0509
--.0272
--.0076
,0057
.0127
.0145
.0128
.0093
.0054

Schmiltroth [1]

--.372
.534
.525
.419
.274
.133
.022
-.0496
-.0833
-.0877
-.0735
-.0508
-.0271
--.0076
.0057
.0127
.0144
.0127
.0092
.0053

TABLE 3
t

5
10
15
20
25
30
35
40
45
50
55
60
65
70
75

Exact/(t)

.0
.0
.0
.0
.5
1.
1.
1.
1.
1.
1.
1.
1.
1.
1.

A pproximate f(t)
aT =8, N = 150

.0003
.0004
.0007
.0017
.5000
.9976
.9985
.9988
.9989
.9989
.9989
.9988
.9988
.9987
.9986

Weeks [3]

-.@i12
.0570
.1071
.0952
.5161
.9589
1.0090
1.0206
.9816
1.0030
1.0030
.9901
1.0076
.9892
1.0050

As t:tt:t illustration of the numerical procedure for a given problem, consider Ex~m~ple 1. T h e interval for which we require f(t) is (0, 10); therefore we take T -~ 20.
If a c c u r a c y in the fifth decimal place is' desired, it is necessary to choose an a such
that e x p ( - - 2 0 a ) is of the order of 10 -5 and to take enough terms in the Fourier
series to i n s u r e a truncation error of the order of 10 -5. I t was found for this case
that 10OO t e r m s sufficed to achieve the desired accuracy. This is evidenced by extra,fining c o l u m n three of Table 1. I t is also worthy to note that if we were willing
~,o t o l e r a t e a n absolute error of 10-3 for Example 1, then the number of terms needed

Journal of the Association for Computing Machinery, Vol. 15, No. 1, January 1968

H. D U B N E R

122

AND ft. AB&TE

in the Fourier series would be much less. In fact, column four of Table 1 shows that
in this instance only 100 terms need be taken.
As for the calculation time of each value of f(t) using eq. (15), it depends entirely
on how many terms of the ti'ourier series one takes. If one' performs the calculation
in a straightforward manner, say for 1000 terms, on the Control D a t a 3600 computer, the time required is of the order of a tenth of a second. Most of this time is
used to compute the needed cosine functions. However, this time m a y be reduced
significantly by milking use of techniques that have been developed [8-10], which
provide algorithms for the machine calculation of Fourier series. These techniques
have come to be known as the Fast Fourier Transforms ( F F T ) . These matters are
discussed in Section 5.

5.

Implementations

Depending on the application for which the inverse Laplace transform is calculated,
the implementation of the result (15) must necessarily be varied. T h e straightforward procedure of simply calculating the Fourier cosine series given b y eq. (15) has
the advantage that the FORTRAN program needed to perform this task requires only
about ten statements. However, this simple approach does not always yield minimum computing effort. We now show how the techniques of the Fast Fourier Transform methods ( F F T ) can be advantageously implemented to significantly reduce
the computation time for our method in certain instances.
Consider those instances when one wants the inverse f(t) for really t-values. As is
discussed in [9], the methods of F F T are only effective when a large number of terms
are involved. To be specific, t t T deals with the following situation (see [8, eq. (1)]:
The finite Fourier transform pair X ( j ) ~ A (k) is defined by

X(j) = ~A(k)

exp

j = 0,1,...

,N--1.

(18)

k=0

A complete calculation of (18) would require N 2 operations. However, using FFT


the number of actual calculations is reduced to less than N log2 N when N is taken
to be a power of 2.
Let us now cast our method into a form compatible with eq. (18). As a first step,
it is easily seen that eq. (15) may be rewritten as

f(t) = ~

,~

Re

F a+i-~

exp

(19)

Now let the situation be such that we require f(t) for the equidistant points t = jSt,
wherej = 0, 1, 2, .. , N. T h a t is, At is the desired sampling interval and the maxi
mum t-value is t .... = ~NAt. Then referring back to our definition and interpretation
of the quantity T, we have T = 2tmax or 7' = NAt. At this point a word of caution
is in order to the reader concerning notation when referring to papers on F F T The
standard usage is to designate the time period of the "aliased" function as T (for
clarification, see [10]); however, we have used the period 2T for the aliased functioni
go(t) (see Figure 1). Hence, in our notation we reflect the slight complication that
NAt = 2T.
Using these definitions, we are able to manipulate the series so t h a t eq. (19) can

Journal of tho A,saociation for Computing Machinery, Vol. 15, No. 1, January 1968

N~tmerical Inversion of Laplace Transforms

123

be put into the following form:

j~

f(jAt) _ ~ A(~) exp

b(j)

k=0

where

((

2~ri

1 . .~. . Re F a + - ~
A(k) _ Nat

b(j)

kq-nN

exp (ajAr).

(~0a)

))}

(20b)
(20c)

The right-hand side of eq. (20a) is of the same form as eq. (18), thereby permitting
~,he use of F F T on the problem. The procedure is as follows:
1. Compute A ( k ) from F(s) by use of eq. (20b), where ,the truncation of the
~xeries and the value of a are dictated b y the consideration already discussed.
2. Then let A ( k ) be the input to the F F T subroutine. The output will be X(j)
i~orj = 0, 1, 2, . . . , N - - 1 .
3. Then the inverse function is given by f(jAt) = b(j)X(j), where b(j) is deiiI~ed by eq. (20c). However, due to our error analysis we only accept b(j)Xij) as a
representation of the f u n c t i o n f f o r j = 0, 1, 2, .. , N.
As a closing thought, consider the case when one wants f(t) for only a few values
of t. For this situation we m a y eliminate the cosine factors by letting T = 2t in eq.
(15). However, then the coefficients become t-dependent and must therefore be
ev:tluatcd for each new value of t. Now let a T = A or a = A/2t; then eq. (15) roduces to:

The advantage of eq. (21) is obvious for a few t-values.


f~EFEI(ENCES

~, SCHMITTROTH,L.A.
2,
~.
4.
5,
(i,
7.
8.
9~
~-

Numerical inversion of Laplace transforms. Comm. ACM 8 (1960),


171-173.
tIURWITZ,H., ANDZWEXFEL,P.F. Numerical quadrature of Fourier transform integrals.
Math. Tables and Other Aids to Comput. 10 (1956), 140-149.
WEEKS,W.T. Numerical inversion of Laplace transforms using Laguerre functions. J.
ACM 18 (1966), 419-429.
PApOC~LiS,A. A new method of inversion of the Laplace transform. Quart. Appl. Math.
14 (1956), 405-414.
BELLMAN,R., KALABA, t~., AND LOCKETT,J. Numerical Inversion of the Laplace Transform. American Elsevier, New York, 1966.
t)E BALnINE,G., ANDFRANKLIN,J. The calculation of Fourier integrals. Math. Comp. 20
(1966), 570-589.
C~IURCHILL,R.V. Fourier Series. McGraw-Hill, New York, 1941.
COOLEy,J. W., ANDTUKEY, J.W. An algorithm for the machine calculation of complex
Fourier series. Math. Comp. 19 (1965), 297-301.
GENTLEMAN,W. M., AND SANDE, G. Fast Fourier transforms. Proc. AFIPS 1966 Fall
Joint Comput. Confer., Vol. 29, pp. 563-578.
COOLEy,J. W., LEwis, P. A. W., ANDWELCH, P.D. Application of the fast Fourier transform to computation of Fourier integrals, Fourier series, and convolution integrals. I E E E
Trans. A E q 5 (1967), 79-85.

i~ECEIVED JANUARY~ 1967; REVISED MARCH AND AUGUST, 1967

Journal of the Association for Computing Machinery, VoL 15, No. I, January 1968

You might also like