Numerical Integration of Multiple Integrals using Taylor Polynomial
Jan Chaloupka
1
, Ji
ˇ
r
´
ı Kunovsk
´
y
1
, V
´
aclav
ˇ
S
´
atek
1,2
, Petr Veigend
1
and Al
ˇ
zbeta Martinkovi
ˇ
cov
´
a
1
1
Faculty of Information Technology, Brno University Of Technology, Boz
ˇ
et
ˇ
echova 2, Brno, Czech Republic
2
IT4Innovations, V
ˇ
SB Technical University of Ostrava, 17. listopadu 15/2172, 708 33 Ostrava-Poruba, Czech Republic
Keywords:
Multiple Integrals, Numerical Integration, Taylor Polynomial, Modern Taylor Series Method.
Abstract:
The paper concentrates on a new method of numerical computation of multiple integrals. Equations based
on Taylor polynomial are derived. Multiple integral of a continuous function of n-variables is numerically
integrated step by step by reducing its dimension. First, integration formulas for a function of two variables
are derived. Formulas for function of n-variables are generalized using composition. Numerical derivatives for
Taylor terms are repeatedly computed from simple integrals. Finally method is demonstrated on an exponential
function of two-variables and a new approach to determine a number of Taylor terms is discussed.
1 INTRODUCTION
The aim of this paper is to show a way how to nu-
merically integrate a function of n variables by trans-
forming the integral into a differential equation. Dif-
ferential equation is solved by Taylor polynomial
where higher derivatives are numerically computed
from simple integrals of previously solved differen-
tial equations.
To determine a number of Taylor terms for a gen-
eral function known only by its discrete points and to
achieve a given error is still an open problem. Upper
bound of an absolute value of all terms can be inves-
tigated. Optimal order approach to determine an inte-
gration step and a degree of Taylor polynomial (Jor-
dan, Maorong, 2005) and its modification (Abad, Bar-
rio, Blesa, Rodriguez, 2012) can be found. In this pa-
per terms are computed by dot product of rows of an
inverse matrix and a vector of discrete points. Anal-
ysis of the product and partial approximation of the
bound is given.
2 DOUBLE INTEGRAL
Let’s have a double integral of general continuous
function
R
y
1
y
0
R
x
1
x
0
f (x,y)dx dy.
Translating f into origin, the equivalent integral
can be obtained.
Z
y
1
y
0
0
Z
x
1
x
0
0
f
t
(x,y)dx dy (1)
f
t
(x,y) = f (x
0
+ x,y
0
+ y) (2)
Without any loss of generality all double inte-
grals can be rewritten into the following form (lower
bounds are equal to zero).
Z
b
2
0
Z
b
1
0
f (x,y)dx dy (3)
Integration step for x-axis is denoted by h, for y-
axis by k, h =
b
1
p
, k =
b
2
q
, where p, resp. q are number
of partitions of x, resp. y axis.
2.1 Sampling by an Axis
Sampling the function f by y-axis, the following sys-
tem is obtained.
g(x,0) = f (x,0)
g(x,k) = f (x,k)
g(x,2k) = f (x,2k)
.
.
.
g(x, jk) = f (x, jk) (4)
.
.
.
g(x,qk) = f (x,qk)
From here on, g
j
(x) denotes g(x, jk).
163
Chaloupka J., Kunovský J., Šátek V., Veigend P. and Martinkovi
ˇ
cová A..
Numerical Integration of Multiple Integrals using Taylor Polynomial.
DOI: 10.5220/0005539701630171
In Proceedings of the 5th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH-2015),
pages 163-171
ISBN: 978-989-758-120-5
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
2
1.5
1
0.5
0
0.5
1
1.5
2
0
0.2
0.4
0.6
0.8
1
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
g
0
(x)
g
1
(x)
g
2
(x)
g
3
(x)
g
4
(x)
g
p
y
(x)
x
y
f(x, y)
Figure 1: Graph of f(x,y).
2.2 First Integration
From the Figure 1.
I
0
=
Z
b
1
0
g
0
(x)dx
I
1
=
Z
b
1
0
g
1
(x)dx
.
.
.
I
j
=
Z
b
1
0
g
j
(x)dx (5)
.
.
.
I
q
=
Z
b
1
0
g
q
(x)dx
This system can be transformed into an equivalent
system of differential equations.
I
0
0
(t) = g
0
(t),I
0
(0) = 0
I
0
1
(t) = g
1
(t),I
1
(0) = 0
.
.
.
I
0
j
(t) = g
j
(t),I
j
(0) = 0 (6)
.
.
.
I
0
q
(t) = g
q
(t),I
q
(0) = 0
2.3 Numerical Solution of Differential
Equations using Taylor Polynomial
Taylor polynomial is used to approximate functions
I
j
(x) (system of equations (6)).
I
j
(h) = I
j
(0) +
n
m=1
DI
j
(m,0)
I
j
(2h) = I
j
(h) +
n
m=1
DI
j
(m,1)
.
.
.
I
j
(sh) = I
j
((s 1)h) +
n
m=1
DI
j
(m,s 1) (7)
.
.
.
I
j
(ph) = I
j
((p 1)h) +
n
m=1
DI
j
(m, p 1)
where j = 1..q, DI
j
(m,s) are members of Taylor
expansion, j : I
j
(0) = 0 (area starts from 0).
2.4 Sampled Integrals
New function ψ (Figure 2) can be created from solu-
tions of the system (7). Its domain consists of points
given as multiples of k.
ψ(0) = I
0
ψ(k) = I
1
.
.
.
ψ( jk) = I
j
(8)
.
.
.
ψ(qk) = I
q
Using ψ, double integral can be approximated us-
ing the following formula (supposing
˜
ψ is continuous
version of ψ).
Z
b
2
y
0
Z
b
1
0
f (x, y)dx dy
Z
b
2
0
˜
ψ(y)dy (9)
0
h
y
2h
y
3h
y
4h
y
p
y
h
y
I
0
I
1
I
2
I
3
I
4
I
p
y
˜
λ
y
I
j
Figure 2: Graph of ψ(y).
SIMULTECH2015-5thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
164
Let’s denote integral (9) as function e.
e(y
1
) =
Z
b
2
0
ψ(y)dy (10)
Now the process of differentiation can be re-
peated.
e
0
(t) = ψ(t) e(0) = 0 (11)
Again, function e can be solved using Taylor poly-
nomial.
e(k) = e(0) +
n
m=1
e
(m)
(0)
m!
k
m
e(2k) = e(k) +
n
m=1
e
(m)
(k)
m!
k
m
.
.
.
e( jk) = e(( j 1)k) +
n
m=1
e
(m)
(( j 1)k)
m!
k
m
(12)
.
.
.
e(qk) = e((q 1)k) +
n
m=1
e
(m)
((q 1)k)
m!
k
m
Using (11).
e
(m)
(t)
m!
k
m
=
ψ
(m1)
(t)
m!
k
m
(13)
So the system of equations (12) can be rewritten.
e(k) = e(0) +
n
m=1
ψ
(m1)
(0)
m!
k
m
e(2k) = e(k) +
n
m=1
ψ
(m1)
(k)
m!
k
m
.
.
.
e( jk) = e(( j 1)k) +
n
m=1
ψ
(m1)
(( j 1)k)
m!
k
m
(14)
.
.
.
e(qk) = e((q 1)k) +
n
m=1
ψ
(m1)
((q 1)k)
m!
k
m
However, in this case the derivatives of ψ are
unknown, which means that a different approach is
needed. Let’s construct the following system,
ψ(k) = ψ(0)+
n
m=1
Dψ(m,0)
ψ(2k) = ψ(0)+
n
m=1
2
m
Dψ(m,0)
.
.
.
ψ( jk) = ψ(0)+
n
m=1
j
m
Dψ(m,0) (15)
.
.
.
ψ(nk) = ψ(0)+
n
m=1
n
m
Dψ(m,0)
where Dψ(m,t) =
ψ
(m)
(t)
m!
k
m
.
Because ψ(y
0
+ jk) = I
j
, the system (15) is equivalent
to system (16).
I
1
=I
0
+
n
m=1
Dψ(m,0)
I
2
=I
0
+
n
m=1
2
m
Dψ(m,0)
.
.
.
I
j
=I
0
+
n
m=1
j
m
Dψ(m,0) (16)
.
.
.
I
n
=I
0
+
n
m=1
n
m
Dψ(m,0)
System can then be expressed in matrix form.
b =
I
1
I
0
I
2
I
0
...
I
j
I
0
...
I
n
I
0
A =
1 1
2
... 1
n
2 2
2
... 2
n
...
j j
2
... j
n
...
n n
2
... n
n
x =
Dψ(1,0)
Dψ(2,0)
...
Dψ( j, 0)
...
Dψ(n,0)
NumericalIntegrationofMultipleIntegralsusingTaylorPolynomial
165
Putting it all together.
Ax = b (17)
Solving a vector x terms Dψ( j,0) are obtained.
These terms can be used to solve e(k) in system of
equations (14). The remaining e( jk) can be calculated
analogically, the matrix A stays the same, matrix b
needs to be recalculated for each e( jk).
Matrix A is ill-conditioned, multiple precision
arithmetic must be used for higher order. Block-
wise inversion and twelfth-order convergence numer-
ical method (Haghani and Soleymani, 2014) can be
used for inverse matrix computation.
3 MULTIPLE INTEGRAL
Generally, a multiple integral is in the following form.
Z
b
n
a
n
...
Z
b
1
a
1
f (x
1
,.. .,x
n
)dx
1
... dx
n
(18)
Translating function f to origin, equivalent inte-
gral is obtained.
Z
b
n
a
n
0
...
Z
b
1
a
1
0
g(x
1
,.. .,x
n
)dx
1
... dx
n
(19)
g(x
1
,.. .,x
n
) = f (a
1
+ x
1
,.. .,a
n
+ x
n
) (20)
3.1 Basic Definitions
Let N = {1, ... ,n}. Permutation from N to N is a
bijective function π : N N. In order to eliminate an
ordering of integration steps in (19), permutation is
used.
Z
b
π(n)
0
...
Z
b
π(1)
0
g(x
1
,.. .,x
n
)dx
π(1)
... dx
π(n)
(21)
With no loss of generality, it can be written as fol-
lows.
Z
b
n
0
...
Z
b
1
0
g(x
1
,.. .,x
n
)dx
1
... dx
n
(22)
Further, isomorphism of composition of tuples
is implicitly taken, e.i. ((1,. .., n),(n + 1,. .. ,m))
(1,.. .,m). Integral’s bounds define a closed space
Π
iN
h0,b
i
i. Integration step for i-th interval is de-
noted as h
i
, number of partitions as d
i
. Then h
i
=
b
i
d
i
.
3.2 First Integration
To simplify a notation of sampling.
g
1
(x
1
,i
2
,.. .,i
n
) = f (x
1
,i
2
h
2
,.. .,i
n
h
n
) (23)
The definition of g
1
is derived from the the num-
ber of simple integrals after sampling (c = ×
iN
(d
i
+
1)). The set of indexes has to be defined.
Φ(x
j
) = Π
iN−{1,..., j}
{0,.. .,d
i
},1 j n (24)
To compute all c integrals, for each s Φ(x
1
).
I
s
= I
s
(b
1
) =
Z
b
1
0
g
1
(x
1
,s)dx
1
(25)
Transformed into differential equation (initial
value problem).
I
0
s
(t) = g
1
(t,s), I
s
(0) = 0 (26)
Solving using Taylor polynomial
I
s
(h
1
) = I
s
(0) +
α(s,1)
m=1
h
m
1
m!
I
(m)
s
(0)
I
s
(2h
1
) = I
s
(h
1
) +
α(s,2)
m=1
h
m
1
m!
I
(m)
s
(h
1
) (27)
.
.
.
I
s
(d
1
h
1
) = I
s
(d
p
h
1
) +
α(s,d
1
)
m=1
h
m
1
m!
I
(m)
s
(d
p
h
1
)
where d
p
= d
1
1 and α(s, j) stands for number of
members of Taylor polynomial for integral s in time
jh
1
.
At the point d
1
h
1
.
I
s
(d
1
h
1
)
Z
b
1
0
g
1
(x
1
,s)dx
1
(28)
3.3 Composition
For each p Φ(x
2
) where
s
i
= (i, p), 0 i d
2
(29)
new function is obtained (analogy to double inte-
gral depicted in Figure 2).
Multiple integral can be approximated
Z
b
n
0
...
Z
b
1
0
f (x
1
,.. .,x
n
)dx
1
... dx
n
Z
b
n
0
...
Z
b
2
0
˜
ψ
2
(x
2
,.. .,x
n
)dx
2
... dx
n
(30)
where
˜
ψ
2
is a continuous version of ψ
2
.
ψ
2
(i
2
h
2
,.. .,i
n
h
n
) = I
s
,s = (i
2
,.. .,i
n
) Φ(x
1
) (31)
Further
Z
b
n
0
...
Z
b
2
0
˜
ψ(x
2
,.. .,x
n
)dx
2
... dx
n
=
Z
b
n
0
...
Z
b
3
0
σ
2
(x
3
,.. .,x
n
)dx
3
... dx
n
(32)
where
σ
2
(t
3
,.. .,t
n
) =
Z
b
2
0
˜
ψ(x
2
,t
3
... ,t
n
)dx
2
(33)
SIMULTECH2015-5thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
166
3.4 Generalization
I
s
was defined previously for s Φ(x
1
). This can be
generalized for p
k
Φ(x
k
),2 k < n:
I
p
k
= I
p
k
(b
k
) =
Z
b
k
0
g
k
(x
k
, p
k
)dx
k
(34)
g
k
(x
k
, p
k
) = I
p
k1
, p
k1
= (d
x
k
h
k
e, p
k
) (35)
For integrals:
Z
b
n
0
...
Z
b
k
0
˜
ψ
k
(x
k
,.. .,x
n
)dx
k
... dx
n
=
Z
b
n
0
...
Z
b
k+1
0
σ
k
(x
k+1
,.. .,x
n
)dx
k+1
... dx
n
(36)
where
σ
k
(t
k+1
,.. .,t
n
) =
Z
b
k
0
˜
ψ
k
(x
k
,t
k+1
... ,t
n
)dx
k
(37)
ψ
k
(i
k
h
k
,.. .,i
n
h
n
) = I
p
k1
, p
k1
= (i
k
,.. .,i
n
) (38)
Using formula (35) ψ
k
can be expressed as
ψ
k
(i
k
h
k
,.. .,i
n
h
n
) = g
k
(i
k
h
k
,i
k+1
,.. .,i
n
) (39)
3.5 Numerical Computation of
Derivatives
From sampled values f
l
,.. ., f
1
, f
0
, f
1
,.. ., f
k
at
points lh, .. .,h, 0,h,. .. ,kh, n = k + l + 1, set
of equations from Taylor polynomials can be con-
structed.
i {−l, l + 1,. .., 1,0, 1,.. .,k 1,k} :
f
i
= f
0
+
n
m=1
i
m
h
m
m!
f
(m)
(0) (40)
Written in matrix form:
b =
f
l
f
0
f
l+1
f
0
...
f
1
f
0
f
1
f
0
...
f
k1
f
0
f
k
f
0
A =
(l)
1
(l)
2
... (l)
n
(l + 1)
1
(l + 1)
2
... (l + 1)
n
...
(1)
1
(1)
2
... (1)
n
(1)
1
(1)
2
... (1)
n
...
(k 1)
1
(k 1)
2
... (k 1)
n
(k)
1
(k)
2
... (k)
n
x =
f
(1)
(0)
...
f
(n)
(0)
x = A
1
b (41)
Vector x represents a vector of Taylor terms.
Terms in x can be transformed (transformation de-
noted by G) into derivatives.
For given numbers (l,k), matrix b changes, A
1
stays the same. From now on, this system is
going to be denoted as κ
l,k
h
and its solution as
κ
l,k
h
( f
l
,.. ., f
k
) = G(A
1
b).
3.6 Approximation of I
k
The main task is to solve the following integral.
I
p
k
= I
p
k
(b
k
) =
Z
b
k
0
g
k
(x
k
, p
k
)dx
k
(42)
It can be transformed into an initial value problem.
I
0
p
k
(t) = g
k
(t, p
k
) I
p
k
(0) = 0 (43)
Solved by Taylor polynomial the system can be
written as follows
I
p
k
(h
k
) = I
p
k
(0) +
α(p
k
,1)
m=1
h
m
k
m!
I
(m)
p
k
(0)
I
p
k
(2h
k
) = I
p
k
(h
k
) +
α(p
k
,2)
m=1
h
m
k
m!
I
(m)
p
k
(h
k
) (44)
.
.
.
I
p
k
(d
k
h
k
) = I
p
k
(d
b
k
h
k
) +
α(p
k
,d
k
)
m=1
h
m
k
m!
I
(m)
p
k
(d
b
k
h
k
)
where d
b
k
= d
k
1. Substituting (43) into (44):
I
p
k
(h
k
) = I
p
k
(0) +
α(p
k
,1)
m=1
h
m
k
m!
g
(m1)
k
(0, p
k
) (45)
I
p
k
(2h
k
) = I
p
k
(h
k
) +
α(p
k
,2)
m=1
h
m
k
m!
g
(m1)
k
(h
k
, p
k
) (46)
.
.
.
I
p
k
(d
k
h
k
) = I
p
k
(d
b
k
h
k
) +
α(p
k
,d
k
)
m=1
h
m
k
m!
g
(m1)
k
(d
b
k
h
k
, p
k
)
(47)
Derivatives of g
k
(t, p
k
) cannot be computed ana-
lytically, because g
k
is a sampled function. However,
the sampled values can be used to compute numerical
derivatives
g
(m)
k
(0, p
k
) = x
0
k
(m),1 m n (48)
NumericalIntegrationofMultipleIntegralsusingTaylorPolynomial
167
where
x
0
k
= κ
0,n
h
k
(g
k
(0, p
k
),g
k
(h
k
, p
k
),.. .,g
k
(nh
k
, p
k
)) (49)
Generally for x
i
x
i
k
= κ
l,m
h
k
(g
k
(i + j
1
h
k
, p
k
),.. .,g
k
(i + j
|β(i,k)|
h
k
, p
k
))
β(i,k) = {−l, ... ,m}, j
1
,.. ., j
|β(i,k)|
β(i,k),
j
1
< j
2
< ··· < j
|β(i,k)|
,i + j
1
0
where β(i,k) stands for a set of indeces in time ih
k
for p
k
, x
i
k
s first coordinate has index 1.
g
(m)
k
(ih
k
, p
k
) = x
i
k
(m),1 m n (50)
I
p
k
(h
k
) = E
0
k
+
α(p
k
,1)
m=2
h
m
k
m!
x
0
k
(m 1) (51)
I
p
k
(2h
k
) = E
1
k
+
α(p
k
,2)
m=2
h
m
k
m!
x
1
k
(m 1) (52)
...
I
p
k
(d
k
h
k
) = E
d
b
k
k
+
α(p
k
,d
k
)
m=2
h
m
k
m!
x
d
b
k
k
(m 1) (53)
where E
j
k
= I
p
k
(0) + g
k
( jh
k
, p
k
), d
b
k
= d
k
1.
From (35)
x
i
k
= κ
l,m
h
k
(I
(i+ j
1
,p
k
)
,I
(i+ j
2
,p
k
)
,.. .,I
(i+|β(i,k)|,p
k
)
) (54)
4 INTEGRATION OF AN
EXPONENTIAL FUNCTION
The method was tested on a computation of double in-
tegral of an exponential function, i.e.
R
2
0
R
2
0
e
x+y
dydx.
Tests were run for a different lengths of an integra-
tion step, number of Taylor terms and arithmetic pre-
cision. Precision is determined by a number of bits
used for the mantissa of each number. Numerical so-
lution was compared with an analytical solution of the
double integral. Error of computation for each test in-
stance is shown in table 1. For fixed integration step
and precision, only a number of the Taylor term with
the smallest error is shown.
5 COMPUTATION OF TAYLOR
TERMS
In order to compute a value of function f (h) at h, the
following equation is used.
f (h) = f (0) +
f
(1)
(0)
1!
h +
f
(2)
(0)
2!
h
2
+ .. . (55)
Table 1: Error of computation of
R
2
0
R
2
0
e
x+y
dydx.
step no. of terms precision [bits] error
0.2 11 400 1.13e-06
0.1 19 400 8.95e-20
0.05 39 400 6.88e-52
0.04 49 400 9.14e-70
0.02 99 800 8.02e-170
0.01 104 900 8.09e-208
0.005 94 900 4.59e-217
0.004 91 900 4.13e-220
0.002 85 900 3.49e-227
The equation can be expressed using Di terms.
f (h) = f (0) + D1 + D2 + D3 + . .. (56)
The terms can be computed using combined
method, where I
i
are samples from which terms (b
column vector) can be computed. Matrix A is a spe-
cial form of matrix and x is a vector of the correspond-
ing terms.
b =
I
1
I
0
I
2
I
0
...
I
j
I
0
...
I
n
I
0
A =
1 1
2
... 1
n
2 2
2
... 2
n
...
j j
2
... j
n
...
n n
2
... n
n
x =
D1
D2
...
D j
...
Dn
In matrix equation form.
Ax = b (57)
The terms can be then computed by solving the
matrix.
x = A
1
b (58)
In order to compute x, it is necessary to compute
inverse of matrix A.
5.1 Rate of Change of Taylor Terms
The number of terms n to be computed depends on the
precision, i.e. it is a function of ε, i.e. n(ε). The ideal
case is when the terms form a descending sequence.
|D
1
| > |D
2
| > |D
3
| > ... (59)
SIMULTECH2015-5thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
168
The function n(ε) is then given.
n(ε) = sup{i||D
i
| < ε} (60)
Generally, this is not the case. In order to find
n(ε), it is necessary to find a decreasing sequence U(i)
such that U(i) >= |Di|.
n(ε) = sup{i|U
i
< ε} (61)
Looking at equation (58) i-th term is given as a dot
product of i-th row of A
1
and x.
D
i
= a
1
i
x (62)
From (62) it can see the value of D
i
depends only
on the A
1
(which is independent of h) and x (depen-
dent of h). In order to construct n(ε), inverse matrix
and x have to be analyzed.
5.2 Analysis of A
1
and x
Dot product (62) can be over-approximated. Vector
x is given as a difference of samples I
i
. Taking the
maximum value M and the minimum value m value of
samples, new vector x
0
= (M m,M m,. .. ,M m)
is constructed. Then x x
0
. For the product, if x 0
the following holds.
|D
i
| = |a
1
i
x| =
n
j=1
a
1
i, j
x
j
=
n
a
1
i, j
>0
a
1
i, j
x
j
+
n
a
1
i, j
<0
a
1
i, j
x
j
(63)
For sum of positive members.
n
a
1
i, j
>0
a
1
i, j
x
j
n
a
1
i, j
>0
a
1
i, j
(M m) =
(M m)
n
a
1
i, j
>0
a
1
i, j
= (M m)P(i) (64)
For sum of negative members.
n
a
1
i, j
<0
a
1
i, j
x
j
n
a
1
i, j
<0
a
1
i, j
(M m) =
(M m)
n
a
1
i, j
<0
a
1
i, j
= (M m)N(i) (65)
Figure 3 shows the progress of summing the posi-
tive and negative members of matrix with 93 samples
taken from the left and 113 samples taken from the
right of a sampled function f . The sum of all mem-
bers can be seen in Figure 4. Multiplying positive
members with M n implies greater sum. Thus the
entire sum is the upper bound of the term. Multi-
plying negative members with M m implies smaller
sum. Now the question is how big is the decrease.
Expressing M n in powers of 10.
M n = 10
e
(66)
If all components of x on index of negative mem-
bers of row i are smaller than 1, their weighted sum
N(i) increases. Thus an upper bound is still obtained.
If there is a component c
j
> 1, the sum is decreased.
If c
j
is substited with M m, the sum is decreased by
(M m c
j
)a
i, j
. In general, the decrease is given as
c
j
>1
(M m c
j
)a
i, j
, because M n > M n c
j
(as M n > c
j
).
=
c
j
>1
(M m c
j
)|a
1
i, j
|
c
j
>1
(M m)|a
1
i, j
| =
= (M m)
c
j
>1
|a
1
i, j
| (67)
This decrease for i-th row will be denoted as (i).
Figure 3: Sum of positive members as a function of row
number.
To compensate for the decrease (i), let’s first take
a look at Figure 3 again. Adding (i) to N(i), N(i)
is decreased by a factor of 10
e
. Assuming N(i) and
P(i) are of the same order, the resulting sum is de-
creased by the same factor of 10
e
. Denoting
n
j=1
a
1
i, j
as S(i) and putting it all together.
|Di| |(M n)P(i) + (M n)N(i) + (i)| =
= |(M m)S(i) + (i)| (68)
Because (i) (M m)|N(i)|.
|Di| |(M m)S(i) + (i)|
(M m)|S(i)| + (i)
(M m)|S(i)| + (M m)|N(i)| = (69)
(M m)(|S(i)| + |N(i)|)
NumericalIntegrationofMultipleIntegralsusingTaylorPolynomial
169
Assuming |N(i)| |S(i)| terms are upper bounded
only by N(i).
|Di| (M m)(|N(i)| + |N(i)|) =
= 2(M m)|N(i)| 10
e
|N(i)| (70)
Figure 4: Sum of negative members as a function of row
number.
Inequality (70) is valid because given values N(i)
and P(i) are very similar and their sum S(i) has
smaller exponent. However any weighted sum with
weights different from w
i
= 1 changes mantissa of
both N(i) and P(i) and their sum D(i) therefore has
bigger exponent.
Thus using (M m)S(i) for upper bound results in
smaller value, but with a suitable vector x, weighted
sum of Di can give greater value than (M m)S(i).
From observation, S(i) is always smaller than N(i).
The higher the dimension of A, the greater ratio
N(i)
S(i)
(in positive powers of 10). For example, for dimen-
sion equal to 400, the ratio can be 10
40
.
Figure 5 shows N(n) of the last row for each k,l-
matrix on h3; 100i × h3;100i (k stands for a number
of samples taken from left, l for a number of samples
taken from the right). Symmetry in sums of negative
members can be seen. For k = l the greatest sum is
obtained. If k 6= l, the sum gets smaller. To eliminate
dependency on k and l, only cases, where k = l need
to be analyzed.
Figure 6 shows the case where k + l = n. It can be
seen, that the graph decreases as n increases.
Figure 5: |N(n)| of A
1
as a function of n.
Figure 6: |N(n)| for k = l as a function of n.
6 COMPUTATION OF N(I)
The number of terms needed to compute the Taylor
series depends on the quality of the approximation of
the decreasing upper bound of an absolute value of
the sum of the last row for each dimension.
6.1 Approximation of a N(i) of the Last
Rows
The better approximation of the upper bound the
smaller number of Taylor terms needed. Denoting the
upper bound as s(n) minimization problem is to min-
imize error
err =
i=1
||Di| s(i)| (71)
given the following equations:
|Di| s(i)i N (72)
s(i) > s(i + 1)i N (73)
6.2 State of the Art Approximation
Figure 7 shows an approximation of log(|N(n)|) by a
function:
g(n) = nlog
a
(n) + b (74)
where a = 21.1 and b = 40.
In the Figure 7 function g(n) is an upper bound
of the graph. Values a and b were determined experi-
mentally.
Function g(n) is given by multiplication of loga-
rithmic and linear function. As logarithm is negative
and determines a tangent, g(n) is decreasing function
of n.
SIMULTECH2015-5thInternationalConferenceonSimulationandModelingMethodologies,Technologiesand
Applications
170
Figure 7: Approximation of g(n).
Upper bound s(n) is given by the following equa-
tion.
s(n) = (M m)10
40nlog
21.1
(n)
(75)
= 10
e+40nlog
21.1
(n)
7 TEST OF THE UPPER BOUND
Figure 8 shows progress of computed value of Di of
a function e
x
for k = l =
n
2
. Graph e
x
gives a value of
e
x
s D(n). As we can see its values are upper bounded
by s(n). Bound log(|N(i)|) still holds for this case as
M m is of order 10
0
. Second function is
1
x
2
+10
. It is
upper bounded again, M m is of order 10
2
. Poly-
nomial function 10
85
x
33
+ 10
10
x
45
test a case where
a range of first to 32-th terms are equal to 0, 33-th
derivative is non-zero, 34-th to 44-th equal to 0, 45-
th non-zero and the higher are equal to 0. Forward
method poly1 f (Figure 8) is used for this case as it
computes derivatives in time 0. The polynom is for
the first 100 samples of order 10
9
. As it can be seen
in the graph it is still upper bounded. However the
bound is too high and multiplicator (M m) must be
analyzed to give better upper bound. The same apply
for poly1 c (Figure 8). It uses combined method with
samples of order 10
61
.
Figure 8: Approximation of Di by g(n).
8 CONCLUSIONS
New method for numerical integration of a function of
n-variables has been introduced. It is based on Taylor
polynomials and computation of its terms from dif-
ferential equations previously solved. Determining an
optimal number of terms for each polynomial is still
an open problem. Further analysis of a dot product is
required.
The method has been tested on integrals with
known analytical solution. Only hyper-cubical inte-
gration areas were explored so far.
ACKNOWLEDGEMENTS
This paper has been elaborated in the framework of
the project New creative teams in priorities of scien-
tific research, reg. no. CZ.1.07/2.3.00/30.0055 (as
well as the the IT4Innovations Centre of Excellence
CZ.1.05/1.1.00/ 02.0070), supported by Operational
Programme Education for Competitiveness and co-
financed by the European Social Fund and the state
budget of the Czech Republic. The paper includes the
solution results of the international AKTION research
project Number 69p22 and the internal BUT projects
FIT-S-12-1 and FIT-S-14-2486.
REFERENCES
F. Khaksar Haghani, F. Soleymani. (2014). A New High-
Order Stable Numerical Method for Matrix Inversion.
The Scientific World Journal, Volume 2014
A. Jordan, Z. Maorong. (2005). A Software Package for
the Numerical Integration of ODEs by Means of High-
Order Taylor Methods. Experimental Mathematics,
Vol. 14, No. 1
A. Abad, R. Barrio, F. Blesa, M. Rodriguez. (2012). Al-
gorithm 924: TIDES, a Taylor Series Integrator for
Differential EquationS. ACM Transactions on Mathe-
matical Software, Vol. 39, No. 1, Article 5.
NumericalIntegrationofMultipleIntegralsusingTaylorPolynomial
171