A fast algorithm for discrete laplace transform
A fast algorithm for discrete laplace transform
at multiple points. In order to evaluate the above sum for n different values of the
variable X, the algorithm requires order O(n + m) operations, and a simple modifi-
cation of the scheme provides an order O(n) procedure for the evaluation of an
order n polynomial at n arbitrary real points. The algorithm is numerically stable,
and its performance is demonstrated by numerical examples. 0 198X Academic
Prers. Inc.
I. INTRODUCTION
where x 2 0, & = {al, CY~,. . . , am}, fi = {PI,& . . . , Pm} are two finite
sequences of real numbers and flj 2 0 for all 1 5 j % m. To evaluate the
sum (1) at n arbitrary points on the real axis, the algorithm requires a
number of arithmetic operations proportional to
* The author was supported in part by the Office of Naval Research under Grant N00014.
86-K-0310.
12
0885-064X/88 $3.00
Copyright 0 1988 by Academic Press, Inc.
All rights of reproduction in any form reserved.
DISCRETE LAPLACETRANSFORMATION 13
where E is the precision with which the calculations are being performed,
and in most cases likely to be encountered in practice, the estimate (2) can
be reduced to
(n + m) * log2 0; (3)
P(t) = 2 Pj . tj
.I=1
Suppose that a, b are a pair of real numbers such that a < b and that k z-
2 is an integer. Chebychev nodes tl, t2, . . . , tk on the interval [a, b] are
defined by the formula
14 V. ROKHLIN
ti = a+b
- +a-6
- * cos i -. - (5)
2 2
with
IL.,+,;(t - t,)
(7)
‘ti(‘) = nl‘-,,,ii(t; - f;)’
The following well-known lemma provides an error estimate for Cheby-
chev approximations. It is the principal analytical tool of this paper and
can be found, in a somewhat different form, in Dahlquist and Bjork
(1974).
LEMMA 2.1. Zff E ck[a, b] (i.e., f has k continuous derivatives on the
interval [a, b]), thenfor any t E [a, 61,
with
M = max If(k)(t)l.
rE[o,hl
(10)
and
In the present paper, the above lemma will be used in the special case
where 0 < a < b, andf(t) = e-y’l, with y > 0. Under these conditions, the
expression (8) assumes the form
and the following lemma provides a form of the estimate (12) independent
of y.
LEMMA 2.2. Zf under the conditions of Lemma 2. I, f(t) = e-y’l, b =
2a, and a > 0, then
Now, substituting (15) into (14) and using Stirling’s formula, we obtain
3. EXACT STATEMENTOFTHE~ROBLEM
$ Pj . e-j,’ (19)
4. NOTATION
(20)
UM = [o, $1 (21)
vM=
[
o,+
1
(22)
(23)
(24)
Combining (24)-(26) with the triangle inequality, we easily see that the
sum
(27)
and that
(2%
DISCRETE LAPLACE TRANSFORMATION 19
(31)
(32)
i.wl Y
5 = C C uf . e-P;‘Xj,
(34)
i=vi+l /=I
and
(35)
Combining (35), (29) (30), and using the triangle inequality, we conclude
that
20 V. ROKHLIN
foranyj= 1,2,. . . , IZ. Now, for any given E and q > 2 * logd(s),
(37)
w, = u v;, (40)
iZ+l
(41)
le-@ - 1) 5 E. (43)
Furthermore,foranyi=1,2,. . .,M-1,
(44)
DISCRETE LAPLACETRANSFORMATION 21
with the functions uj defined by (7) and the coefficients /3j defined in
Section 4. According to Lemma 2.2,
1
l@(p) - e-@XI 5 - (48)
44’
(49)
for any x E [0, -t-m], and due to (43, the latter can be rewritten in the form
Algorithm
Stage 1.
Comment [Choose parameters and perform geometrical preprocessing.]
Choose precision E to be achieved. Set q = 2 - log(l/s). Construct the
intervals Uj, Vi, and the sets pi, li with i = 1, 2, . . . , M.
Stage 2.
Comment [On each of the non-empty intervals Uk, evaluate the coeffi-
cients U” in the expansions (27).]
Step 1.
Comment [Set all coefficients U” to zero.]
do k = 1, M - 1, Sk f 0
doi= l,q
set u” to zero.
end do
end do
Step 2.
Comment [For each pi on each of the non-empty intervals Uk, evaluate
oi * Ujk and add it to the uf.1
dok= l,M- l&f0
24 V. ROKHLIN
doi= 1,q
do fij E Uk
Evaluate Ujk via formula (23) and add the product CX~* u$ to uf.
end do
end do
end do
Stage 3.
Comment [Evaluate f” via formula (31) for all k = 1, 2, . . . , M such
that T& # 0, and i = 1, 2, . . . , q.]
dok= l,M- l,&f0
doi= 1,q
evaluate the expression ff = ~j!$+r~;l=,u-( . cP~,~:.
end do
end do
Stage 4.
Comment [For eachj = 1, 2, . . . , n, evaluate& via formula (32).]
do k = 1, M - 1, & f 0
do Xj E Vk
evaluate the expression A = &i= Ivfj * &.
end do
end do
Stage 5.
Comment [For each k = 1, 2, . . . , M and each xi E V,, use Observa-
tion 4.3 to evaluate the sum Sk = x:(y.JEWkaj.Add the result tofi, concluding
the calculation.]
Step 1.
Comment [Evaluate S1.]
set Sr = C,,,tJrCXi.
Step 2.
Comment [Evaluate Sk recursively for k = 2, 3, . . . , M.]
do k = 2, M, .Q f 0
evaluate Sk via the formula Sk = Sk-I + 2fljeukClj.
end do
Step 3.
Comment [For all k = 1,2, . . . , M, and all i such that xi E VL, add Sk to
xi, concluding the calculation.]
DISCRETE LAPLACETRANSFORMATION 25
dok= l,M,&#O
do Xj E vk
add Sk tofi.
end do
end do
7. COMPLEXITY ANALYSIS
Summing up the CPU times for all stages above, we obtain the follow-
ing time estimate:
26 V. ROKHLIN
Ttotal = a * m + b * n + c + m . q2 + d. n . q2
3
Ttotal
MSMIrn. (60)
According to (20),
Pm * &I
M - 1 5 log2 ___ (61)
i & ! = log2a?l> + lwz(&J + log2 0k .
%kM%34og,(A)+ 1, (62)
Ttotal =a*m+b=n+c.m*q2+d*n*q2
ated with the Stages 2 and 4 of the algorithm, and with the fact that in
order to evaluate each of the coefficients ujk,i(or Uj,i), a q - l-term product
of the form (24) (or (33)) has to be evaluated. Obviously, the coefficients
uti depend only on the distribution of the points pi, and not on that of xi or
ai+ Similarly, the coefficients ujk.idepend only on the distribution of the
points xi and not on that of p; or ai. Therefore, for fixed distributions of pi
and Xi, the coefficients ufi, I$; can be precomputed and stored, reducing
the total CPU time estimate to
However, q - log(l/&), and log(A) is fixed for given computer system and
language. Thus, when m, II -+ m,
Ttotal - (a * m + b . n) . q. (65)
8. NUMERICAL RESULTS
TABLE1
EXAMPLE 1: TIMINGS
TABLE11
EXAMPLE 1: ACCURACIES
tialized once, with subsequent repeated evaluation of the sums (17) for
varying sets of weights aI, CY~,. . . , (Y,. This situation is similar to that
encountered for the Fast Fourier Transformation.
The program has been applied to a variety of situations, and three such
examples are presented in this section, with the computations performed
on a VAX-8600 computer. In each case, we performed the calculations in
three ways: via the algorithm of the present paper in single precision
arithmetic, directly in single precision arithmetic, and directly in double
precision arithmetic. The first two calculations were used to compare the
speed and precision of the algorithm with that of the direct calculation.
The direct evaluation of the field in double precision was used as a stan-
dard for comparing the accuracies of the first two calculations. In all
cases, we set E = 10m8, and
m = II = 10 * 2k, (66)
TABLE III
EXAMPLE 2: TIMINGS
T hl Tdir
20 0.0097 0.0011 0.0083
40 0.0275 0.0033 0.0332
80 0.0768 0.0089 0.1328
160 0.126 0.0157 0.536
320 0.210 0.0271 2.12
640 0.326 0.0455 8.50
1280 0.497 0.0784 34.12
2560 0.698 0.1351 138.34
DISCRETE LAPLACE TRANSFORMATION 29
TABLE IV
EXAMPLE 2: ACCURACIES
maz,reJ
6Ol$ 6’”
oka
20 .3123-06 .1643-06 .160E-06 .1923-06 .2683-07 .141E-07
40 .109E-05 .2703-05 .4053-06 .3163-06 .501E-07 .1243-06
80 .3543-05 .3643-05 .6583-06 .8603-06 .8323-07 .8573-07
160 .8353-05 .161E-04 .8603-06 .8453-06 lOOE-06 .1943-06
320 .1983-04 .2983-04 .9743-06 .1583-06 .115E-06 .1733-06
640 .6063-04 .1283-03 .8243-06 .2883-05 .1853-06 .3893-06
1280 .3363-03 .6573-03 .9143-06 .4233-05 .2073-06 . IOOE-05
2560 .4513-03 .1493-02 .8273-06 .7993-05 .3483-06 .115E-05
TABLE V
EXAMPLE 3: TIMINGS
n Tinit T 42 Tdir
20 0.0135 0.0015 0.0013
40 0.0435 0.0052 0.0047
80 0.0948 0.0109 0.0179
160 0.1327 0.0172 0.0729
320 0.222 0.0286 0.2779
640 0.306 0.0445 1.101
1280 0.422 0.0718 4.54
0.664 0.1322 18.37
30 V. ROKHLIN
TABLEVI
EXAMPLE 3: ACCURACIES
precision via the algorithm of the present paper. The following is a de-
tailed description of the entries in the Tables 2, 4, and 6:
n, the number of points at which the sum (1) is being evaluated;
szr, the maximum error produced by the algorithm at any point. It is
defined by the formula
(67)
(6%
(70)
(71)
i IL@’ - &
aa; = k=’ (72)
i: lSkl ’
k=I
Pi = (73)
xk = (74)
and the weights al, CX~,. . . , CY,,,were generated randomly on the interval
[O, 11. Here, by “direct algorithm” we mean a straightforward implemen-
tation of the formula (17). The results of this set of experiments are
summarized in Tables 1 and 2.
EXAMPLE 2. In this example, the points pi, p2, . . . , Pm and x1,
x2, . * * 3 x, were generated randomly on the interval [O, 51, and the
weights (~1, (~2, . . . , CV,were generated randomly on the interval [0, 11.
Again, by “direct algorithm” we mean a straightforward implementation
of the formula (17). The results of this set of experiments are summarized
in Tables 3 and 4.
EXAMPLE 3. Here, we evaluate a polynomial of order IZat a collection
of randomly generated points on the interval [O, 11. The coefficients of the
nth order polynomial are randomly distributed on the interval [0, 11. In
this example, the direct evaluation of the polynomials is performed via the
Horner’s rule (see, for example, Dahlquist and Bjork, 1974), and the
algorithm of this paper is applied via the formula (1). The results of this set
of experiments are presented in Tables 5 and 6.
The following observations can be made from the Tables l-6 and are in
agreement with the results of our more extensive experiments.
32 V. ROKHLIN
REFERENCES
AHO, A. V., HOPCROFT, J. E., AND ULLMAN, J. D. (1974). “The Design and Analysis of
Computer Algorithms,” Addison-Wesley, Reading, MA.
BORODIN, A., AND MUNRO, I. (1975). “The Computational Complexity of Algebraic and
Numeric Problems,” Elsevier, Amsterdam/New York.
DAHLQUIST, G., AND BJORK, A. (1974), “Numerical Methods,” Prentice-Hall, Englewood
Cliffs, NJ.