Symbolic Integration Tutorial: Manuel - Bronstein@
Symbolic Integration Tutorial: Manuel - Bronstein@
TUTORIAL
Manuel Bronstein
INRIA Sophia Antipolis
[email protected]
Contents
1 Rational Functions
1.1 The full partial-fraction algorithm . . . . . . . . . . . . . . . . .
1.2 The Hermite reduction . . . . . . . . . . . . . . . . . . . . . . . .
1.3 The RothsteinTrager and LazardRiobooTrager algorithms . .
2 Algebraic Functions
2.1 The Hermite reduction . .
2.2 Simple radical extensions
2.3 Liouvilles Theorem . . .
2.4 The integral part . . . . .
2.5 The logarithmic part . . .
5
6
7
8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9
10
14
15
16
17
3 Elementary Functions
3.1 Differential algebra . . . . . . . . . .
3.2 The Hermite reduction . . . . . . . .
3.3 The polynomial reduction . . . . . .
3.4 The residue criterion . . . . . . . . .
3.5 The transcendental logarithmic case
3.6 The transcendental exponential case
3.7 The transcendental tangent case . .
3.8 The algebraic logarithmic case . . .
3.9 The algebraic exponential case . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
20
21
22
23
24
26
27
28
29
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1 tx1
(e
ex 1t )
2
where
1 e2 1(x x x+1)
.
t=
1 + e2 1(x3 x3 x+1)
Rational Functions
1.1
This method, which dates back to Newton, Leibniz and Bernoulli, should not be
used in practice, yet it remains the method found in most calculus texts and is
often taught. Its major drawback is the factorization of the denominator of the
integrand over the real or complex numbers. We outline it because it provides
the theoretical foundations for all the subsequent algorithms. Let f R(x) be
our integrand, and write f = P + A/D where P, A, D R[x], gcd(A, D) = 1,
and deg(A) < deg(D). Let
D=c
n
Y
(x ai )ei
i=1
m
Y
(x2 + bj x + cj )fj
j=1
ei
n X
X
i=1 k=1
fj
X X Bjk x + Cjk
Aik
+
k
(x ai )
(x2 + bj x + cj )k
j=1
k=1
Z
f=
P+
ei Z
n X
X
i=1 k=1
fj
XX
Aik
+
(x ai )k j=1
k=1
Bjk x + Cjk
.
(x2 + bj x + cj )k
Computing P poses no problem (it will for any other class of functions), and
for the other terms we have
Z
Aik
Aik (x ai )1k /(1 k) if k > 1
=
(2)
k
Ai1 log(x ai )
if k = 1
(x ai )
and, noting that b2j 4cj < 0 since x2 + bj x + cj is irreducible in R[x],
Z
Bj1 x + Cj1
Bj1
2C
b
B
2x
+
b
j1
j j1
j
=
log(x2 +bj x+cj )+ q
arctan q
(x2 + bj x + cj )
2
2
4c b
4c b2
j
q X
ei
X
i=1 j=1
ei
i=1 (x i ) ,
Aij
.
(x i )j
and then
(3)
Aiei
Ai2
Ai1
+ +
+
+
e
2
i
(x i )
(x i )
(x i )
where the Aij s are the same as those in (3). Thus, this approach can be
seen as expanding the integrand into series around all its poles (including ),
then integrating the series termwise, and then interpolating for the answer,
by summing all the polar terms, obtaining the integral of (3). In addition,
this alternative shows that any rational function f K(x) has an elementary
integral in the form
Z
f = v + c1 log(u1 ) + + cm log(um )
(4)
where v, u1 , . . . , um K(x) are rational functions, and c1 , . . . , cm K are
constants. The original Risch algorithm is essentially a generalization of this
approach that searches for integrals of arbitrary elementary functions in a form
similar to (4).
1.2
in [14] that any field containing an integral of 1/(x2 + 2) must also contain 2.
Modern research has yielded so-called rational algorithms that
compute as much of the integral as possible with all calculations being
done in K(x), and
compute the minimal algebraic extension of K necessary to express the
integral.
The first rational algorithms for integration date back to the 19th century, when
both Hermite [6] and Ostrogradsky [11] invented methods for computing the
v of (4) entirely within K(x). We describe here only Hermites method, since
it is the one that has been generalized to arbitrary elementary functions. The
basic idea is that if an irreducible p K[x] appears with multiplicity k > 1 in
7
the factorization of the denominator of the integrand, then (2) implies that it
appears with multiplicity k 1 in the denominator of the integral. Furthermore,
it is possible to compute the product of all such irreducibles for each k without
factoring the denominator into irreducibles by computing its squarefree factorm
ization, i.e. a factorization D = D1 D22 Dm
, where each Di is squarefree and
gcd(Di , Dj ) = 1 for i 6= j. A straightforward way to compute it is as follows:
m1
let R = gcd(D, D0 ), then R = D2 D32 Dm
, so D/R = D1 D2 Dm and
gcd(R, D/R) = D2 Dm , which implies finally that
D1 =
D/R
.
gcd(R, D/R)
+
UV m
V m1
Vm
U V m1
and integrating both sides yields
Z
Z
B
(1 m)C U B 0
A
=
+
UV m
V m1
U V m1
so the integrand is reduced to one with a smaller power of V in the denominator.
This process is repeated until the denominator is squarefree, yielding g, h K(x)
such that f = g 0 + h and h has a squarefree denominator.
1.3
Following the Hermite reduction, we only have to integrate fractions of the form
f = A/D with deg(A) < deg(D) and D squarefree. It follows from (2) that
Z
n
X
f=
ai log(x i )
i=1
where the i s are the zeros of D in K, and the ai s are the residues of f at
the i s. The problem is then to compute those residues without splitting D.
Rothstein [18] and Trager [19] independently proved that the ai s are exactly
the zeroes of
R = resultantx (D, A tD0 ) K[t]
(5)
and that the splitting field of R over K is indeed the minimal algebraic extension
of K necessary to express the integral in the form (4). The integral is then given
by
Z
m
X
X
A
=
a log(gcd(D, A aD0 ))
(6)
D
i=1
a|Ri (a)=0
Qm
ei
i=1 Ri
P
Pa|Qi (a)=0 a log(D)
a|Qi (a)=0 a log(ppx (Rki )(a, x))
if i = deg(D)
where deg(Rki ) = i, 1 ki n
if i < deg(D)
Algebraic Functions
2.1
Now that we have numerators and denominators for algebraic functions, we can
attempt to generalize the Hermite reduction of the previous section, so let f E
n
be our
Pmintegrand, w = (w1 , . . . , wn ) OK[x] be a basis for E over K(x) and
let i=1 Ai wi OK[x] and D K[x] be the numerator and denominator of f
m
with respect to w, Let D = D1 D22 Dm
be a squarefree factorization of D and
suppose that m 2.
Let
then
V
=
D
and
U = D/V m , and we ask whether we
m
Pn
can compute B = i=1 Bi wi OK[x] and h E such that deg(Bi ) < deg(V )
for each i,
Z
Z Pn
B
i=1 Ai wi
=
+
h
(7)
UV m
V m1
and the denominator of h with respect to w has no factor of order m or higher.
This turns out to reduce to solving the following linear system
f1 S1 + . . . + fn Sn = A1 w1 + . . . + An wn
(8)
w 0
i
V m1
10
for 1 i n .
(9)
Indeed, suppose that (8) has a solution f1 , . . . , fn K(x), and write fi = Ti /Q,
where Q, T1 , . . . , Tn K[x] and gcd(Q, T1 , . . . , Tn ) = 1. Suppose further that
gcd(Q, V ) = 1. Then, we can use the extended Euclidean algorithm to find
A, R K[x] such that AV + RQ = 1, and Euclidean division to find Qi , Bi
K[x] such that deg(Bi ) < deg(V ) when Bi 6= 0 and RTi = V Qi + Bi for each i.
We then have
0
Pn
i=1 Bi wi
h = f
V m1
Pn
Pn
n
w 0
0
X
i
i=1 Ai wi
i=1 Bi wi
=
(RT
V
Q
)
i
i
m1
UV m
V m1
V
i=1
Pn
Pn
n
w 0 Pn B 0 w
X
R i=1 Ti Si
i
i
i=1 Ai wi
+
V
=
Q
i=1m1i
i
m1
UV m
UV m
V
V
i=1
Pn
Pn
Pn
Pn
0
0
(1 RQ) i=1 Ai wi
0
i=1 Qi wi
i=1 Qi wi
i=1 Bi wi
+
(m
1)V
=
m
m2
m1
m1
UV
V
V
Pn
Pn
Pn V
0
0
0
AA
w
((m
1)V
Q
+
B
)w
Q
w
i
i
i
i
i
i
i=1
=
i=1
+ i=1m2 i .
U V m1
V m1
V
Hence, if in
Pnaddition the denominator of h has no factor of order m or higher,
then B = i=1 Bi wi OK[x] and h solve (7) and we have reduced the integrand.
Unfortunately, it can happen that the denominator of h has a factor of order
m or higher, or that (8) has no solution in K(x) whose denominator is coprime
with V , as the following example shows.
Example 1 Let E = K(x)[y]/(y 4 + (x2 + x)y x2 ) with basis w = (1, y, y 2 , y 3 )
over K(x) and consider the integrand
f=
w4
y3
= 2 E.
x2
x
S4 = x
y3
x
0
=
(27x4 +81x3 +209x2 +27x)y 3 +18x(x3 +x2 x1)y 2 +24x2 (x2 1)y+96x3 (1x)
so (8) becomes
f1
0
f2 0
M =
f3
0
f4
1
11
(10)
where
0
M =
0
0
48x2 (1x2 )
F
12x(x3 +x2 x1)
F
9(x4 +2x3 2x1)
F
64x(1x)
F
96x3 (1x)
F
24x2 (x2 1)
F
18x(x3 +x2 x1)
F
(27x4 +81x3 +209x2 +27x)
F
and F = 27x4 + 108x3 + 418x2 + 108x + 27. The system (10) admits the unique
solution f1 = f2 = 0, f3 = 2 and f4 = (x + 1)/x, whose denominator is not
coprime with V , so the Hermite reduction is not applicable.
The above problem was first solved by Trager [20], who proved that if w is an
integral basis, i.e. its elements generate OK[x] over K[x], then the system (8)
always has a unique solution in K(x) when m > 1, and that solution always
has a denominator coprime with V . Furthermore, the denominator of each wi0
must be squarefree, implying that the denominator of h is a factor of F U V m1
where F K[x] is squarefree and coprime with U V . He also described an
algorithm for computing an integral basis, a necessary preprocessing for his
Hermite reduction. The main problem with that approach is that computing
the integral basis, whether by the method of [20] or the local alternative [21],
can be in general more expensive than the rest of the reduction process. We
describe here the lazy Hermite reduction [5], which avoids the precomputation
of an integral basis. It is based on the observation that if m > 1 and (8) does
not have a solution allowing us to perform the reduction, then either
the Si s are linearly dependent over K(x), or
(8) has a unique solution in K(x) whose denominator has a nontrivial
common factor with V , or
the denominator of some wi is not squarefree.
In all of the above cases, we can replace our basis w by a new one, also made
up of integral elements, so that the K[x]-module generated by the new basis
strictly contains the one generated by w:
Theorem 1 ([5]) Suppose that m 2 and that {S1 , . . . , Sn } as given by (9)
are linearly
Pndependent over K(x), and let T1 , . . . , Tn K[x] be not all 0 and
such that i=1 Ti Si = 0. Then,
w0 =
n
U X
Ti wi OK[x] .
V i=1
Ai wi =
1 X
T i Si .
Q i=1
12
Then,
n
w0 =
U (V / gcd(V, Q)) X
Ti wi OK[x] .
gcd(V, Q)
i=1
..
F
C1
Cn
C2
1,1
C1,2
C2,2
..
.
C1,n
C2,n
..
Cn,n
C2,1
.
.
.
Cn,1 Cn,2
0
0
Pn
with Cij K[x]. Let wi = ( j=1 Cij wj )/F for 1 i n. Then, w =
(w1 , . . . , wn ) is a basis for E over K and
K[x]w1 + + K[x]wn = K[x]w1 + + K[x]wn + K[x]w0
is a submodule of OK[x] , which strictly contains K[x]w1 + + K[x]wn , since it
contains w0 . Any stricly increasing chain of submodules of OK[x] must stabilize
after a finite number of steps, which means that this process produces a basis
for which either the Hermite reduction can be carried out, or for which f has a
squarefree denominator.
Example 2 Continuing example 1 for which the Hermite reduction failed, Theorem 2 implies that
w0 =
1
(2xw3 + (x + 1)w4 ) = 2xy 2 + (x + 1)y 3 x OK[x] .
x
13
x
0
2x
x
x+1
yields
x
0
1
0
so the new basis is w = (1, y, y 2 , y 3 /x), and the denominator of f with respect
to w is x, which is squarefree.
2.2
j=1
z i1
b(i1)j/nc
for 1 i n
(11)
Hj
and the Hermite reduction with respect to the above basis is always guaranteed
to succeed. Furthermore, when using that basis, the system (8) becomes diagQm
bij/nc
onal and its solution can be written explicitly: writing Di = j=1 Hj
we
have
0
w 0
z i1
i
m
=
U
V
Si = U V m
V m1
Di1 V m1
0
i 1 H0
Di1
V0
z i1
= UV m
(m 1)
n H
Di1
V
Di1 V m1
i 1 H0
Di1 0
= U V
(m 1)V 0 wi
n H
Di1
14
Ai
H0
U V i1
n H
Di1 0
Di1
(m 1)V 0
for 1 i n
(12)
and it can be shown that the denominator of each fi is coprime with V when
m 2.
Example 3 Consider
Z
(2x8 + 1) x8 + 1
dx .
x17 + 2x9 + x
The integrand is
f=
(2x8 + 1)y
E = Q(x)[y]/(y 2 x8 1)
+ 2x9 + x
x17
(2x8 + 1)/4
2x8 + 1
=
.
f2 =
7
x8
7
x (x8 + 1) 21 x8x
8 +1 8x
Z 8
(2x8 + 1) x8 + 1
x8 + 1
x +1
dx =
+
dx
17
9
8
x + 2x + x
4(x + 1)
x(x8 + 1)
2.3
Liouvilles Theorem
Up to this point, the algorithms we have presented never fail, yet it can happen
that an algebraic function does not have an elementary integral, for example
Z
xdx
1 x3
which is not an elementary function of x. So we need a way to recognize such
functions before completing the integration algorithm. Liouville was the first
to state and prove a precise theorem from Laplaces observation that we can
restrict the elementary integration problem by allowing only new logarithms
to appear linearly in the integral, all the other terms appearing in the integral
being already in the integrand.
15
u01
u0
+ + ck k .
u1
uk
(13)
Z
1
1 + x
dx
= arctan(x) =
.
log
1 + x2
2
1 x
2.4
c1 du1
ck duk
+ +
u1 dz
uk dz
(14)
2.5
Following the previous sections, we are left with solving equation (14) for the
constants c1 , . . . , ck and for u1 , . . . , uk . We must make at this point the following
additional assumptions:
we have an integral primitive element for E over K(z), i.e. y OK[z] such
that E = K(z)(y),
17
x8 + 1
w2
=
E = Q(x)[y]/(y 2 x8 1)
x(x8 + 1)
x(x8 + 1)
where (w1 , w2 ) = (1, y) is an integral basis normal at infinity, and the denominator D = x(x8 + 1) of the integrand is squarefree. Its numerator is w2 = y, so
the resultant of step 3 is
resultantx (ppt (resultanty (y t(9x8 + 1), y 2 x8 1)), x(x8 + 1)) = ct16 (t2 1)
where c is a large nonzero integer. Its nonzero roots are 1, and the integrand
has residue 1 at the place P corresponding to the point (x, y) = (0, 1) and 1 at
the place Q corresponding to the point (x, y) = (0, 1), so the divisor 1 of step
5 is 1 = P Q. It turns out that 1 , 21 and 31 are not principal, but that
4
w2
1 (x4 /(1 + y))0
x
and
=0
41 =
1+y
x(x8 + 1) 4 x4 /(1 + y)
which implies that
Z
x8 + 1
1
dx = log
x(x8 + 1)
4
19
x4
1 + x8 + 1
.
Example 5 Consider
Z
xdx
.
1 x3
The integrand is
f=
xy
E = Q(x)[y]/(y 2 + x3 1)
1 x3
where (w1 , w2 ) = (1, y) is an integral basis normal at infinity, and the denominator D = 1 x3 of the integrand is squarefree. Its numerator is xw2 = xy, so
the resultant of step 3 is
resultantx (ppt (resultanty (xy + 3tx2 , y 2 + x3 1)), 1 x3 ) = 729t6
R
whose only root is 0. Since f 6= 0, we conclude from step 6 that f dx is not an
elementary function.
Example 6
Z
dx
.
x 1 x3
The integrand is
f=
y
E = Q(x)[y]/(y 2 + x3 1)
x x4
where (w1 , w2 ) = (1, y) is an integral basis normal at infinity, and the denominator D = x x4 of the integrand is squarefree. Its numerator is w2 = y, so
the resultant of step 3 is
resultantx (ppt (resultanty (y + t(4x3 1), y 2 + x3 1)), x x4 ) = 729t6 (t2 1) .
Its nonzero roots are 1, and the integrand has residue 1 at the place P corresponding to the point (x, y) = (0, 1) and 1 at the place Q corresponding to the
point (x, y) = (0, 1), so the divisor 1 of step 5 is 1 = P Q. It turns out
that 1 and 21 are not principal, but that
y1
y
1 ((y 1)/(y + 1))0
31 =
and
=0
4
y+1
xx
3 (y 1)/(y + 1)
which implies that
Z
dx
1
= log
3
3
x 1x
1 x3 1
.
1 x3 + 1
Elementary Functions
3.1
Differential algebra
and Q(x)(elog(x)/2 ) = Q(x)( x). There are however algorithms that detect all
such occurences and modify the tower accordingly [16], so we can assume that
all the logarithms and exponentials appearing in E are monomials, and that
Const(E) = C. Let now k0 be the largest index such that tk0 is transcendental
over K = C(x)(t1 , . . . , tk0 1 ) and t = tk0 . Then E is a finitely generated algebraic extension of K(t), and in the special case k0 = k, E = K(t). Thus, f E
can be seen as a univariate rational or algebraic function over K, the major
difference with the pure rational or algebraic cases being that K is not constant
with respect to the derivation. It turns out that the algorithms of the previous
sections can be generalized to such towers, new methods being required only for
the polynomial (or integral) part. We note that Liouvilles Theorem remains
valid when E is an arbitrary differential field, so the integration algorithms work
by attempting to solve equation (13) as previously.
21
1
Example 7 The
function (1) is the element f = (t t ) 1/2 of E = K(t)
where K = Q( 1)(x)(t1 , t2 ) with
p
3
t1 = x3 x + 1, t2 = e2 1(x t1 ) ,
and t = e((1t2 )/(1+t2 ))x 1
which is transcendental over K. Alternatively, it can also be written as the
element f = 2/(1 + 2 ) of F = K() where K == Q(x)(1 , 2 ) with
p
x + 2
3
3
1 = x x + 1, 2 = tan(x 1 ),
and = tan
2
which is a transcendental monomial over K. It turns out that both towers can
be used in order to integrate f .
The algorithms of the previous sections relied extensively on squarefree factorization and on the concept of squarefree polynomials. The appropriate analogue
in monomial extensions is the notion of normal polynomials: let t be a monomial over K, we say that p K[t] is normal (with respect to 0 ) if gcd(p, p0 ) = 1,
and that p is special if gcd(p, p0 ) = p,i.e. p | p0 in K[t]. For p K[t] squarefree,
let ps = gcd(p, p0 ) and pn = p/ps . Then, p = ps pn while ps is special and pn is
normal. Therefore, squarefree factorization can be used to write any q K[t]
as a product q = qs qn , where gcd(qs , qn ) = 1, qs is special and all the squarefree
factors of qn are normal. We call qs the special part of q and qn its normal part.
3.2
The Hermite reductions we presented for rational and algebraic functions work
in exactly the same way algebraic extensions of monomial extensions of K,
as long as we apply them only to the normal part of the denominator of the
integrand. Thus, if D is the denominator of the integrand, we let S be the
m
special part of D, D1 D22 Dm
be a squarefree factorization of the normal part
m
of D, V = Dm , U = D/V and the rational and algebraic Hermite reductions
proceed normally, eventually yielding an integrand whose denominator has a
squarefree normal part.
Example 8 Consider
Z
x tan(x)
dx .
tan(x)2
The integrand is
f=
xt
K(t)
t2
implying that
Z
x
x tan(x)
dx =
tan(x)2
tan(x)
Z
xdx
t2 + 2xt + x2 + (x + 1)y
E = K(t)[y]/(y 2 x t)
xt2 + 2x2 t + x3
where K = Q(x) and t = log(x). The denominator of f with respect to the basis
w = (1, y) is D = xt2 + 2x2 t + x3 whose squarefree factorization is x(t + x)2 .
Both x and t + x are normal, so m = 2, V = t + x, U = D/V 2 = x, and the
solution (12) of (8) is
f1 =
t2 + 2xt + x2
t2 + 2xt + x2
x+1
= 2 .
=
, f2 =
0
0 +1
x((t + 1))
x+1
x (t + x) 12 tt+x
(t0 + 1)
+
x log(x)2 + 2x2 log(x) + x3
x
x + log(x)
and the remaining integrand has a squarefree denominator.
3.3
rd1 S 0
1
+R
degt (S) cd S
The integrand is
where K = Q(x) and t0 = t2 + 1 .
f = 1 + xt + t2 K(t)
3.4
K[z]
be the RothsteinTrager resultant, R = R1 R22 . . . Rkk be its squarefree factorization, Qi = gcdz (Ri , (Ri )) for each i, and
g=
k
X
24
Note that the the roots of each Qi must all be constants, and that the arguments
of the logarithms can be obtained directly from the subresultant PRS of D and
A zD0 as in the rational function case. It can then be proven [4] that
f g 0 is always simpler than f ,
the splitting field of Q1 . . . Qk over
R K is the minimal algebraic extension
of K needed in order to express f in the form (4),
if f has an elementary integral over K(t), then R | (R) in K[z] and the
denominator of f g 0 is special.
Thus, while in the pure rational function case the remaining integrand is a
polynomial, in this case the remaining integrand has a special denominator.
In that case we have additionally that if its integral is elementary, then (13)
has a solution such that v K(t) has a special denominator, and each ui
K(c1 , . . . , ck )[t] is special.
Example 11 Consider
Z
2 log(x)2 log(x) x2
dx .
log(x)3 x2 log(x)
The integrand is
2t2 t x2
K(t)
t3 x2 t
f=
1
Q1 = gcd z (R, R) = x2 z 2
4
and
gcd t
2x 3a 2
t + (2xa 1)t + x(a x) = t + 2ax
t + x t,
x
3
a log(t + 2ax) =
a|a2 1/4=0
25
1
1
log(t + x) log(t x) .
2
2
Computing f g 0 we find
Z
Z
2 log(x)2 log(x) x2
1
log(x) + x
dx
dx
=
log
+
3
2
log(x) x log(x)
2
log(x) x
log(x)
and since degz (Q1 ) < degz (R), it follows that the remaining integral is not an
elementary function (it is in fact the logarithmic integral Li(x)).
In the most general case, when E = K(t)(y) is algebraic over K(t) and y
is integral over K[t], the criterion part of the above result remains valid: let
w = (w1 , . . . , w
Pnn) be an integral
Pnbasis for E over K(t) and write the integrand
f E as f = i=1 Ai wi /D+ i=1 Bi wi /S
Pnwhere S is special and, following the
Hermite reduction, D is normal. Write i=1 Ai wi = G/H, where G K[t, y]
and H K[t], let F K[t, y] be the (monic) minimum polynomial for y over
K(t), z be a new indeterminate and compute
R(z) = resultantt (ppz (resultanty (G tHD0 , F )), D) K[t] .
(16)
It can then be proven [2] that if f has an elementary integral over E, then
R | (R) in K[z].
Example 12 Consider
Z
(1/3)
log(1 + ex )
dx .
1 + log(1 + ex )
(17)
The integrand is
f =f =
y
E = K(t)[y]/(y 3 t)
t+1
t31
z 3 1 .
(1 + t1 )3
3t31
z3
(1 + t1 )4
which is coprime with R in K[z], implying that the integral (17) is not an elementary function.
3.5
Suppose now that t = log(b) for some b K , and that E = K(t). Then, every
special polynomial must be in K, so, following the residue criterion, we must
look for a solution v K[t], u1 , . . . , uk K(c1 , . . . , cn ) of (13). Furthermore,
26
Pd
the integrand f is also in K[t], so write f = i=0 fi ti where f0 , . . . , fd K and
Pd+1
fd 6= 0. We must have degt (v) d + 1, so writing v = i=0 vi ti , we get
Z
fd td + . . . f1 t + f0 = vd+1 td+1 + . . . + v1 t + v0 +
k
X
ci log(ui ) .
i=1
b0
.
b
(18)
3.6
Suppose now that t = eb for some b K, and that E = K(t). Then, every
nonzero special polynomial must be of the form atm for a K and m N.
Since
(atm )0
a0
t0
a0
=
+m =
+ mb0 ,
m
at
a
t
a
we must then look for a solution v K[t, t1 ], u1 , . . . , uk K(c1 , . . . , cn )
Pd
of (13). Furthermore, the integrand f is also in K[t, t1 ], so write f = i=e fi ti
where fe , . . . , fd K and e, d Z. Since (atm )0 = (a0 + mb0 )tm for any m Z,
Pd
we must have v = M b + i=e vi ti for some integer M , hence
Z X
d
i=e
fi ti = M b +
d
X
i=e
27
vi ti +
k
X
i=1
ci log(ui ) .
for e i d, i 6= 0 .
3.7
/K
Suppose now that t = tan(b) for some b K,i.e. t0 = b0 (1 + t2 ), that 1
and that E = K(t). Then, every nonzero special polynomial must be of the
form a(t2 + 1)m for a K and m N. Since
a0
(t2 + 1)0
a0
(a(t2 + 1)m )0
=
+
m
=
+ 2mb0 t
a(t2 + 1)m
a
t2 + 1
a
we must look for v = V /(t2 + 1)m where V K[t], m1 , . . . , mk N, constants
c1 , . . . , ck K and u1 , . . . , uk K(c1 , . . . , ck ) such that
f = v 0 + 2b0 t
k
X
ci mi +
i=1
k
X
i=1
ci
u0i
.
ui
28
Example 13 Consider
Z
sin(x)
dx .
x
The integrand is
f=
2t/x
K(t)
t2 + 1
x
2
3.8
The transcendental logarithmic case method also generalizes to the case when
E = K(t)(y) is algebraic over K(t), t = log(b) for b K and y is integral over
K[t]: following the residue criterion, we can assume that R | (R) where R is
given by (16), hence that all its roots in K are constants. The polynomial part
of the integrand is replaced by a family of at most [E : K(t)] Puiseux expansions
at infinity, each of the form
X
am m + . . . + a1 1 +
ai i
(20)
i0
s
X
i=1
mrij
rl Pl
q
X
i=1
msij
sl Ql
j for which N j is not principal for any nonzero integer N , then the integral is
not elementary, otherwise, let n1 , . . . , nk be nonzero integers such that nj j is
principal for each j, and
k
1 X qj u0j
h=f
m j=1 nj uj
where f is the integrand and uj E(1 , . . . , s , 1 , . . . , q ) is such that nj j =
(uj ). If the integral of h is elementary, then (13) must have a solution with
v OK[x] and u1 , . . . , uk K, so we must solve
Pn
h=
n
n
k
X
X
X
Ai wi
u0
0
0
=
vi wi +
vi wi +
ci i
D
ui
i=1
i=1
i=1
i=1
(21)
vi for 1 < i n
D
n H
Di1
(23)
(24)
We have
(R) =
so R | (R) in K[z]. Its only nonzero root is 2, and the integrand has residue
2 at the place P corresponding to the point (t, y) = (x2 x, x). There is only
one place Q at infinity of ramification index 2, and the coefficient of t1 in the
Puiseux expansion of f at Q is
a2 = 1 2x +
x0
1
= (x x2 )0 +
x
x
which implies that the corresponding is 1. Therefore, the divisor for the logand
is = 2P 2Q. It turns out that = (u) where u = (x + y)2 E , so the new
integrand is
0
u0
(x + y)
(x + 1)y
.
h=f
=f 2
=
u
x+y
xt + x2
We have y 2 = t + x, which is squarefree, so (23) becomes
0 = v10 +
k
X
i=1
ci
u0i
ui
3.9
The transcendental exponential case method also generalizes to the case when
E = K(t)(y) is algebraic over K(t), t = eb for b K and y is integral over K[t]:
following the residue criterion, we can assume that R | (R) where R is given
by (16), hence that all its roots in K are constants. The denominator of the
integrand must be of the form D = tm U where gcd(U, t) = 1, U is squarefree,
and m 0.
If m > 0, E is a simple radical extension of K(t), and we use the basis (11),
then it is possible to reduce the power of t appearing in D by a process similar
31
Pn
to the Hermite reduction: writing the integrand f = i=1 Ai wi /(tm U ), we ask
whether we can compute b1 , . . . , bn K and C1 , . . . , Cn K[t] such that
Pn
Z Pn
Z Pn
i=1 Ci wi
i=1 bi wi
i=1 Ai wi
+
=
.
tm U
tm
tm1 U
Differentiating both sides and multiplying through by tm we get
Pn
Pn
n
n
n
X
X
X
t i=1 Ci wi
i=1 Ai wi
=
.
b0i wi +
bi wi0 mb0
bi wi +
U
U
i=1
i=1
i=1
Using (22) and equating the coefficients of wi on both sides, we get
Ai
tCi
= b0i + (i mb0 )bi +
U
U
where
i =
for 1 i n
(25)
D0
i 1 H0
i1 K(t) .
n H
Di1
for 1 i n
(26)
which are Risch differential equations over K(t). If any of them has no solution
in K(t), then the integral is not elementary, otherwise we repeat this process
until the denominator of the integrand is normal. We then perform the change
0
of variable t = t1 , which is also exponential over K since t = b0 t, and repeat
the above process in order to eliminate the power of t from the denominator of
the integrand. It can be shown that after this process, any solution of (13) must
have v K.
Example 15 Consider
Z
(1/3)
3(x + ex )
x(x + ex )
dx .
The integrand is
f=
where K = Q(x) and t = ex . Its denominator with respect to the integral basis
w = (1, y, y 2 ) is D = xt + x2 , which is normal, and the resultant is
R
We have
(R) =
11x 8
R
x(x 1)
so R | (R) in K[z], its only root being 0. Since D is not divisible by t, let
0
2
3
t = t1 and z = ty. We have t = t and z 3 t xt = 0, so the integral
basis (11) is
z2
.
w = (w1 , w2 , w3 ) = 1, z,
t
Writing f in terms of that basis gives
2
f=
x2 t + xt
2
(1 3x)t 2
(2 3x)t 1
, and 3 =
.
3xt + 3
3xt + 3
(1/3)
ex )
(2/3)
dx = 3x(x + ex )
Z
+3
dx
.
x
33
References
[1] L. Bertrand. Computing a hyperelliptic integral using arithmetic in the
jacobian of the curve. Applicable Algebra in Engineering, Communication
and Computing, 6:275298, 1995.
[2] M. Bronstein. On the integration of elementary functions. Journal of
Symbolic Computation, 9(2):117173, February 1990.
[3] M. Bronstein. The Risch differential equation on an algebraic curve. In
S. Watt, editor, Proceedings of ISSAC91, pages 241246. ACM Press, 1991.
[4] M. Bronstein. Symbolic Integration I Transcendental Functions. Springer,
Heidelberg, 1997. 2nd Ed., 2004.
[5] M. Bronstein. The lazy Hermite reduction. Rapport de Recherche RR
3562, INRIA, 1998.
[6] E. Hermite. Sur lintegration des fractions rationelles. Nouvelles Annales
de Mathematiques (2eme serie), 11:145148, 1872.
[7] D. Lazard and R. Rioboo. Integration of rational functions: Rational computation of the logarithmic part. Journal of Symbolic Computation, 9:113
116, 1990.
[8] J. Liouville. Premier memoire sur la determination des integrales dont la
valeur est algebrique. Journal de lEcole Polytechnique, 14:124148, 1833.
[9] J. Liouville. Second memoire sur la determination des integrales dont la
valeur est algebrique. Journal de lEcole Polytechnique, 14:149193, 1833.
[10] T. Mulders. A note on subresultants and a correction to the Lazard
RiobooTrager formula in rational function integration. Journal of Symbolic Computation, 24(1):4550, 1997.
[11] M.W. Ostrogradsky. De lintegration des fractions rationelles. Bulletin de
la Classe PhysicoMathematiques de lAcademie Imperiale des Sciences de
St. Petersbourg, IV:145167,286300, 1845.
[12] R. Risch. On the integration of elementary functions which are built up
using algebraic operations. Research Report SP-2801/002/00, System Development Corporation, Santa Monica, CA, USA, 1968.
[13] R. Risch. Further results on elementary functions. Research Report RC2402, IBM Research, Yorktown Heights, NY, USA, 1969.
[14] R. Risch. The problem of integration in finite terms. Transactions of the
American Mathematical Society, 139:167189, 1969.
[15] R. Risch. The solution of problem of integration in finite terms. Bulletin
of the American Mathematical Society, 76:605608, 1970.
34
35