(Algorithms and Computation in Mathematics 1) Manuel Bronstein (Auth.) - Symbolic Integration I - Transcendental Functions (2005, Springer-Verlag Berlin Heidelberg)
(Algorithms and Computation in Mathematics 1) Manuel Bronstein (Auth.) - Symbolic Integration I - Transcendental Functions (2005, Springer-Verlag Berlin Heidelberg)
in Mathematics ® Volume i
Editors
Manuel Bronstein Arjeh M. Cohen
Henri Cohen David Eisenbud
Bernd Sturmfels
Manuel Bronstein
Symbolic
Integration I
Transcendental Functions
Second Edition
^ Spri
rineer
Manuel Bronstein
INRIA
2004 route des Lucioles - B.P. 93
06902 Sophia Antipolis Cedex, France
e-mail: [email protected]
ISSN 1431-1550
This work is subject to copyright. All rights are reserved, whether the whole or part of the material
is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilm or in any other way, and storage in data banks. Dupfication
of this publication or parts thereof is permitted only under the provisions of the German Copyright
Law of September 9,1965, in its current version, and permission for use must always be obtained
from Springer. Violations are liable for prosecution under the German Copyright Law.
Springer is a part of Springer Science+Business Media
springeronline.com
© Springer-Verlag Berlin Heidelberg 2005
Printed in Germany
The use of general descriptive names, registered names, trademarks, etc. in this publication does not
imply, even in the absence of a specific statement, that such names are exempt from the relevant pro-
tective laws and regulations and therefore free for general use.
This book brings together two streams of research in mathematics and com-
puting t h a t were begun in the nineteenth century and made possible t h r o u g h
results brought to fruition in t h e twentieth century.
Methods for indefinite integration have been important ever since t h e in-
vention of the calculus in the 1700s. In the 1800s Abel and Liouville began t h e
earliest mathematical research on algorithmic methods on integration in finite
terms leading to what might be considered today as an early mathematical
vision of a complete algorithmic solution for integrating elementary functions.
In an 1842 publication Lady A d a Augusta, Countess of Lovelace, describing
t h e capabilities of Babbage's analytical engine put forth the vision t h a t com-
putational devices could do algebraic as well as numerical calculations when
she said t h a t "[Babbage's Analytical Engine] can arrange and combine its nu-
merical quantities exactly as if they were letters or any other general symbols;
and in fact it might bring out its results in algebraical notation were provi-
sions made accordingly." Thus these two visions set the stage for a century
and a half of research t h a t partially culminates in this book.
Progress in the mathematical realm continued through out the nineteenth
and twentieth centuries. The Russian mathematician Mordukhai-Boltovskoi
wrote t h e first two books on this subject in 1910 and 1913^
W i t h the invention of electronic computers in the late 1930s and early
1940s, a new impetus was given to b o t h the mathematical and computa-
tional streams of work. In the meantime in the mathematical world i m p o r t a n t
progress had been made on algebraic methods of research. Ritt began t o ap-
ply the new algebraic techniques to the problem of integration in finite terms,
an approach t h a t has proven crucially important. In 1948 he published t h e
results of his research in a little book. Integration in Finite Terms, T h e use of
these algebraic ideas were brought to further fruition by Kolchin, Rosenlicht,
and, particularly for problems of symbolic integration, by three of Rosenlicht's
P h . D . students — Risch, Singer, and Bronstein^.
On the Integration in Finite Terms of Linear Differential Equations. Warsaw,
1910 (in Russian) and On the Integration of Transcendental Functions. Warsaw,
1913 (in Russian).
Let me hasten to add that there have been important contributions by many
others and it is not my intention to give a complete history of the field in this short
paragraph, but to indicate some of main streams of work that have led to the current
book.
VI Foreword
On the computational side, matters rested until 1953 when two early pro-
grams were written, one by Kahrimanian at Temple University and another by
Nolan at Massachusetts Institute of Technology, to do analytic differentiation
— the inverse of indefinite integration. There was active research in the late
1950s and early 1960s on list processing packages and languages that laid the
implementation foundations for today's computer algebra systems. Slagle's
1961 thesis was an early effort to write a program, in LiSP, to do symbolic
integration. With the advent of general computer algebra systems, some kind
of symbolic integration facility was implemented in most. These integration
capabilities opened the eyes of many early users of symbolic mathematical
computation to the amazing potential of this form of computation. But yet
none of the systems had a complete implementation of the full algorithm that
Risch had announced in barest outline in 1970. There were a number of rea-
sons for this. First and foremost, no one had worked out the many aspects of
the problem that Risch's announcement left incomplete.
Starting with his Ph.D. dissertation and continuing in a series of beautiful
and important papers, Bronstein set out to fill in the missing components
of Risch's 1970 announcement. Meanwhile working at the IBM T. J. Wat-
son Research Center, he carried out an almost complete implementation of
the integration algorithms for elementary functions. It is the most complete
implementation of symbolic integration algorithms to date.
In this book, Bronstein brings these mathematical and computational
streams of research together in a highly effective manner. He presents the algo-
rithmic details in pseudo-code that is easy to implement in most of the general
computer algebra systems. Indeed, my students and I have implemented and
tested many of the algorithms in M A P L E and MACSYMA. Bronstein's style
and appropriate level of detail makes this a straightforward task, and I ex-
pect this book to be the standard starting place for future implementers of
symbolic integration algorithms. Along with the algorithms, he presents the
mathematics necessary to show that the algorithms work correctly. This is a
very interesting story in its own right and Bronstein tells it well. Nonetheless,
for those primarily interested in the algorithms, much of the mathematics can
be skipped at least in a first study. But the full beauty of the subject is to be
most appreciated by studying both aspects.
The full treatment of the subject is a long one and it is not finished in
this volume. The longer and more difficult part involving the integration of
algebraic functions must await a second volume. This volume serves as a good
foundation to the topic of symbolic integration and as a nice introduction to
the literature for integration of algebraic functions and for other aspects such
as integration involving non-elementary functions. Study, learn, implement,
and enjoy!
B. F. Caviness
Preface to the Second Edition
I have taken the opportunity of this second edition to add a chapter on parallel
integration, a method that is used by several computer algebra systems, either
before or in place of the complete integration algorithm. I have also added new-
references and exercises that expand on topics such as obtaining continuous
integrals or the relations between special polynomials, Darboux polynomials
and constants in monomial extensions.
I would like to thank all the readers of the first edition who have sent me
various corrections and suggestions. While I have tried to incorporate all of
them in this edition, I remain responsible for the remaining errors.
In all those courses, the material of Chap. 1 is covered as and when needed,
depending on the background of the students. Chap. 9 contains complete
proofs of several structure theorems and can be presented independently of
the rest of this book.
By presenting the algorithm in pseudocode in various "algorithm boxes"
throughout the text, we also hope to make this book useful for programmers
implementing symbolic integrators: by following the pseudocode, they should
be able to write an integrator without studying in detail the associated theory.
The reader will notice that several topics in symbolic integration are miss-
ing from this book, the main one being the integration of algebraic func-
tions. Including algorithms for integrating algebraic and mixed algebraic-
transcendental functions would however easily double the size of this book, as
well as increase the mathematical prerequisites, since those algorithms re-
quire prior famiharity with algebraic curves and functions. We have thus
decided to cover algebraic functions in a second volume, which will hope-
fully appear in the near future. In the meantime, this book is an adequate
preparation to the extensive literature on the integration of algebraic func-
tions [8, 9, 11, 14, 29, 73, 74, 76, 91]. Another related topic is integration
in nonelementary terms, i.e. with new special functions allowed in the an-
tiderivatives. Here also, the reader should have no difficulty moving on to the
research literature [5, 6, 21, 22, 52, 53, 70, 94] after completing this book.
Acknowledgements
I am thankful to several colleagues and students who have read and cor-
rected many early drafts of this book. I am particularly grateful to Bob Cavi-
ness. Thorn Mulders and Paul Zimmermann, who corrected many errors in
the final text and suggested several improvements. Sergei Abramov, Cedric
Bächler, Johannes Grabmeier, David Stoutemyer, Jacques-Arthur Weil and
Clifton Williamson have also helped a great deal with their corrections and
suggestions. Of course, I am fully responsible for any error that may remain.
Finally, I wish to thank Dr. Martin Peters and his staff at Springer-Verlag
for their great patience with this project.
Foreword V
1 Algebraic Preliminaries 1
1.1 Groups, Rings and Fields 1
1.2 EucHdean Division and Pseudo-Division 8
1.3 The EucHdean Algorithm 10
1.4 Resultants and Subresultants 18
1.5 Polynomial Remainder Sequences 21
1.6 Primitive Polynomials 25
1.7 Squarefree Factorization 28
Exercises 32
2 Integration of Rational Functions . 35
2.1 The BernouUi Algorithm 36
2.2 The Hermite Reduction 39
2.3 The Horowitz-Ostrogradsky Algorithm 45
2.4 The Rothstein-Trager Algorithm . 47
2.5 The Lazard-Rioboo-Trager Algorithm 49
2.6 The Czichowski Algorithm 53
2.7 Newton-Leibniz-Bernoulli Revisited 54
2.8 Rioboo's Algorithm for Real Rational Functions 59
2.9 In-Field Integration 70
Exercises 72
3 Differential Fields 75
3.1 Derivations 75
3.2 Differential Extensions 79
XIV Contents
10 Parallel I n t e g r a t i o n 297
10.1 Derivations of Polynomial Rings 298
10.2 Structure of Elementary Antiderivatives 301
10.3 The Integration Method 305
10.4 Simple Differential Fields 311
References 317
Index 323
Algebraic Prelimmaries
We review in this chapter the basic algebraic structures and algorithms that
will be used throughout this book. This chapter is not intended to be a re-
placement for an introductory course in abstract algebra, and we expect the
reader to have already encountered the definitions and fundamental proper-
ties of rings, fields and polynomials. We only recall those definitions here and
describe some algorithms on polynomials that are not always covered in intro-
ductory algebra courses. Since they are well-known algorithms in computer
algebra, we do not reprove their correctness here, but give references instead.
For a comprehensive introduction to constructive algebra and algebraic algo-
rithms, including more efficient alternatives for computing greatest common
divisors of polynomials, we recommend consulting introductory computer al-
gebra textbooks [2, 28, 39, 64, 97]. Readers with some background in algebra
can skip this chapter and come back to it later as needed.
Example 1.1.1. Let G = GL{Q,2) be the set of all the 2 by 2 matrices with
rational number coefficients and nonzero determinant, and let o denote the
usual matrix multiplication. (C, o) is then a group: associativity can easily
be checked, the identity element is the identity matrix, and the inverse of a
matrix in G is given by
a b\ 1 f d -
c dj ad-bc\-c a
which is in G since the determinant of any element of G is nonzero. Note that
(G, o) is not a commutative group since
Example 1.1.2. Let G = A^2,2(Q) be the set of all the 2 by 2 matrices with
rational number coefficients, and let o denote the usual matrix addition. It
can easily be checked that (G, o) is a commutative group with the zero matrix
as identity element.
Definition 1.1.2. A ring (fi,+,•) ^-^ ^ ^^^ Ft, together with two operations
-i- : R X R ^ R and - : R x R -^ R such that:
(i) (i?, +) is a commutative group.
(ii) (Associativity) \/a^b,c ^ R^a • {h • c) = {a - b) • c.
(Hi) (Multiplicative identity) 3i G R such that \/a E R^i • a = a • i = a.
(iv) (Distributivity)
In the rest of this book, whenever (fi,+, •) is a ring, we write 0 for the
identity element of R with respect to +, 1 for the identity element of R with
respect to -, and for a^b E R^ we write ab instead of a • b.
Example 1.1.3. Let R = A42,2(Q) be the set of all the 2 by 2 matrices with
rational number coefficients, and let + denote matrix addition and • denote
matrix multiplication. {R, +, •) is then a ring, but not a commutative ring (see
example L L l ) . Since
1.1 Groups, Rings and Fields
1 0\ (n 0^
0 \) \\) n
is nonzero for any positive integer n, R has characteristic 0.
Example 1.1.4- Let R — IJQ (the integers modulo 6) with + and • being the
addition and multiplication of integers modulo 6. (i?, +, •) is then a commu-
tative ring, and the map (/> : Z ^ Ze defined by (/)(n) = n (mod 6) is a
ring-homomorphism. Since 1 + 1 + 1 + 1 + 1 + 1 = 0 i n Z 6 , and nl j^ 0 for
0 < n < 6, ZQ has characteristic 6. Note that 2 • 3 = 0 in Ze, while 2 7^ 0 and
3 7^ 0, so we cannot in general deduce from an equation ab = 0 that either a
or b must be 0. Commutative rings where we can make this simplification are
very useful and common, so they receive a special name.
Definition 1.1,3. An integral domain ( ß , + , •) is a commutative ring where
0 7^ 1 and
\/a,be R,a-b = 0=^ a = 0 or 5 = 0.
Example 1.1.5. Let R = Z[-\/—b] = {a+6^—5; a, 6 E Z} with + and • denoting
complex addition and multipHcation. (i?, +, •) is then an integral domain.
We now come to the problem of factoring, i.e. writing elements of an
integral domain as a product of other elements.
Definition 1.1.4. Let (ß,+,•) be an integral domain, and x,y ^ R. We say
that X divides y, and write x \ y, if y — xt for some t £ R. An element
X £ R is called a unit if x \ 1. The set of all the units of R is written R*.
We say that z E R is a greatest common divisor (gcd) of x i , . . . , x^ and write
z = gcd{xi,...,Xn) if:
(i) z I Xi for 1 < i < n,
(ii) yt G R,t \ Xi for 1 < i < n => t \ z.
In addition, we say that x and y are coprime if there exists a unit u E R*,
which is a gcd of x and y.
Example 1.1.6. Let R = Z [A/—5j as in example 1.1.5, x = 6 and y = 2 +
2 \ / ^ . A norm argument shows that x and y have no gcd in R. Let N : R -^ Z
be the map given by N{a + 5\A-5) = a^ + 56^ for a, 6 G Z. It can easily be
checked that N{uv) = N{u)N{v) for any u^v £ R^ so u \ v in R implies that
N{u) I N{v) in Z. Suppose that z E R is a greatest common divisor of x and
y, and let n = N{z) > 0. Then, n \ N{x) = 36 and n \ N{y) = 24, so n | 12 in
Z. We have 2 | x and 2 | y in fi, so 4 = iV(2) | n in Z. In addition, 1 + v ^ | y
in i?, and
6 = 2 • 3 = (1 + V^){1 - V^) (1.1)
so 1 + \ / ^ \ x in R, hence 6 = N{1 + \ / ^ ) | n in Z. Thus, 12 | n in
Z, so n == 12. Writing z = a + 6 ^ / ^ for some a, 6 G Z, this implies that
N{z) = a? -\- 56^ — 12, hence that a^ = 2 (mod 5). But the squares in Z5
are 0,1 and 4, so this equation has no solution, implying that x and y have
no gcd in R.
4 1 Algebraic Preliminaries
Although gcd's do not always exist, whenever they exist, they are unique
up to multiplication by units.
Proof. Let x^y G R^ and suppose first that x = 0. Then y \ y, y \ 0^ and any
t e R that divides x and y must divide y, so y is a gcd of x and y. Similarly,
a: is a gcd of x and y if y = 0, so suppose now that x ^ 0 and y 7^ 0, and
let X = uflpE^P^^ ^^^ y ~ ^YlpeyP^^ ^^ ^^^ irreducible factorizations of
X and y, where /¥ and 3^ are finite sets of irreducibles. We choose the units u
and V so that any irreducible dividing both x and y is in X oy. Let then
^^ n p™^""^'"^^^ e R. (1.2)
We have
pexny peP(:\y
so 2; I X. A similar formula shows that z \ y. Suppose that t \ x and t \ y for
some t E R^ and let t = it; H O G T ^ ^ ^ ^^ ^^^ irreducible factorization where T is
a finite set of irreducibles. For p G T, we have x = tb = p^^ab for some a, 6 E ß ,
so sp e ^ for some 5 G i?*. Replacing t(; by t(;5~^p, we can assume that p G Af,
and Cp < Up by the unicity of the irreducible factorization. Similarly, we get
p G y and e^ < nip since t | y. Hence, T C ^ n 3^ and e^ < min(np, rup) for
any p E T. Thus,
Z — tw~^ T T pmm(np,mp)-ep TT mm(np,mp)
pGT pG{xny)\T
In fact, the ideal generated by { x i , . . . , x „ } is just the set of all the linear
combinations of the x^'s with coefficients in R.
Example l.Lll. Let R = Q[X] be the set of all the univariate polynomials
in X with rational number coefficients. (A, + , •) is then a principal ideal do-
main ([54] Chap. V §4, [92] §3.7) where + and • denote polynomial addition
and multiplication respectively.
The last, and most useful, type of ring t h a t we use in this book, is an
integral domain in which Euclidean division can be carried out.
Example LL12. T h e ring (Z, + , •) of the integers with the usual addition and
multiphcation is a Euclidean domain with z/(a) = |a|, a fact t h a t was known
to Euchd, and which is the origin of the name.
1.1 Groups, Rings and Fields 7
Even though the notions of principal ideal domains and EucHdean domains
are defined for an arbitrary integral domain, there is in fact a linear hierarchy
of integral domains.
T h e o r e m 1.1.6 ([92] §3.7). Every Euclidean domain is a PID.
Since every PID is a UFD, and gcd's always exist in UFD's by Theo-
rem 1.1.3, then gcd's always exist in PID's. We show that in PID's, the gcd
of two elements generates the same ideal than them.
T h e o r e m 1.1.8. If R is a PID, then (x^y) = (gcd(a:,y)) for any x^y G R.
Proof Let x^y e R and z £ R he a generator of the ideal (x,y), i.e. (z) =
(x^y). Then, x G (2), so x = zu for some u G R^ which means that z \ x.
Similarly, y G {z), so z \ y. In addition, z G {x,y)^ so z = ax -{- by for some
a^b G R. Let t G R he such that t \ x and t \ y. Then x = ct and y = dt for
some c^d G R. Hence, z = act + bdt = {ac + bd)t so t | z, which implies that
z — gcd(ii,'u). D
Example 1.1.13. Let F = Z5 (the integers modulo 5) with + and • being the
addition and multiplication of integers modulo 5. (F, +, •) is then a field.
Q Ä (5 T
0 3x^ + x^ + x + 5 1 gX
^x fx^ + fx + S 0 14
25
52^ 1 i n -1
5*^ ^ 25 25"^ ^ 25
Thus,
/52 111
--•1-M
This algorithm requires t h e coefficients to be from a field because it makes
the quotient in K of the two leading coefficients. If K is an integral domain,
the leading coefficient of B does not always divide exactly t h e leading coef-
ficient of A, so Euclidean division is not always possible. For example it is
not possible in the above example to do a Euclidean division of ^4 by ß in
IJ[X\. But it is possible to apply P o l y D i v i d e to 2bA and B in Z[x] since all
the divisions in Z will then be exact. In general, given an integral domain
D and A,B £ D[x], applying P o l y D i v i d e to h^^^A and B where h = 1C(JB)
and Ö — max(—l,deg(yl) — deg(jB)) only generates exact divisions in D , and
the Q and R it returns are respectively called the pseudo-quotient of A by
B and pseudo-remainder of A modulo B. They satisfy b^'^^A = BQ 4- R and
either i? = 0 or deg(fi) < deg(-B). We write pquo{A,B) and p r e m ( ^ , ß ) for
the pseudo-quotient and pseudo-remainder of A and B. It is more efficient
in practice to multiply A hy b iteratively, as is done in the algorithm below,
rather t h a n once by 6^+^.
Q R Ö T N
0 3x^ + x^ + X + 5 1 3x 1
3x 14x2 -f 2x + 25 0 14 0
15^ + 14 52X + 111 -1
so 25^1 = 5 ( 1 5 x + 14) + (52x + 111).
10 1 Algebraic Preliminaries
Let D be a Euclidean domain and u : D \ {0} —> N its size function. The
Euclidean division in D can be used to compute the greatest common divisor
of any two elements of D. The basic idea, which goes back to Euclid who used
it to compute the gcd of two integers, is that if a = 6g + r, then gcd(a, b) =
gcd(6,r). Since gcd(j:, 0) = x for any x G -D, the last nonzero element in the
sequence (a^)^>o defined by
is then a gcd of a and h. Since for a^ ^ 0 and i > 1, either a^+i = 0 or v[aij^\) <
z/(a^), that sequence can only have a finite number of nonzero elements. This
yields an algorithm for computing gcd(a, b) by repeated Euclidean divisions.
in D = Q[x] gives:
a b ^ r
x^ - 2x^ - 6x2 _^ 22x + 15 x^ -4- x^ - 4x - 4 X — 3 x^ -4- 4x + 3
x^ + x^ - 4x - 4 x^ + 4x + 3 X—3 5x + 5
x^ + 4x + 3 5x-h5 k +i 0
5x-f 5 0
The Euclidean algorithm can be easily extended to return, not only a gcd
of a and 6, but also elements s and HVLD such that sa^tb = gcd(a, 6). Such
elements always exist since gcd (a, 6) belongs to the ideal generated by a and
6 by Theorem 1.1.8.
1.3 The Euclidean Algorithm 11
ai 4— 1, a2 ^- 0, 5i ^- 0, 62 ^ 1
while 6 y^ 0 d o
(g,r)^— EuclideanDivision(a, 6) (* a = 5g + r *)
a <— 6, 6 ^— r
n ^ ai - qbi, r2 ^ a2 - qb2
ai ^— 61, a2 ^— 62, ^1 ^ r i , 62 ^~ r2
r e t u r n ( a i , a 2 , a)
a 6 Q r
ai a2 bi b2
1 0 0 1
0 1 1 -~-x + 3
1 -x + 3 -x + 3 x^ - 6x + 10
1^2 4
- x + 3 x2 - 6x + 10 5-^ 5 -|x"'^ + | x 2 + | x -- 3
Thus, 5x + 5 is a gcd of a and 6 in Q[x], and
This "half" variant of the algorithm is also used as a more efficient alter-
native to the extended Euclidean algorithm, since the second coefficient can
be obtained from the first via
a — sa
ExtendedEuclidean(a, h)
(* Extended Euclidean algorithm - "half/full" version *)
(* Given a Euclidean domain D and a, 6 G D, return s, t, p G D such that
g = gcd(a, h) and sa^th = g. *)
{s,g) <— HalfExtendedEucIidean(a,6) (^ sa = g (mod b) *)
(t, r) ^- EuclideanDivision(p — sa, b) (* r must be 0 *)
return{s, t, g)
Example 1.3.3. Recomputing the extended gcd of the a and b of example 1.3.1,
we get:
1. (5, g) •=• HalfExtendedEuclidean(a, 6) = (—x + 3,5a: + 5)
2. g-sa = x^ - 5x^ + 30^^ - 16x
3. (t, r) = PolyDivide(^ - sa, b) - (x^ - 6x -|-10,0)
so we recover (1.4).
The extended Euclidean algorithm can also be used to solve the diophan-
tine equation
sa-^tb = c (1.5)
where a^b^c E D are given and s^t E D are the unknowns. For (1.5) to have
a solution, it is necessary and sufficient that c be in the ideal generated by
a and 6, i.e. that c be a multiple of gcd(a, 6) in D. The extended Euclidean
algorithm first solves the equation sa-i-tb — gcd (a, 6), and there remains only
to multiply the solutions by c/gcd(a,6) to get a solution of (1.5). It should
be noted that when c is in the ideal generated by a and 5, then (1.5) has as
many solutions as the number of elements of D (when a and b are nonzero),
since sa + tb = (s -i- bd)a + {t — ad)b for any d E D. Since there can be no
confusion with the previous extended Euclidean algorithm, which has only two
parameters, we also call this algorithm the "extended Euclidean algorithm".
As before, a half-extended version exists when only one of the coefficients is
needed. We remark that the versions of the algorithm that we present here,
and use extensively in the sequel, all return a solution s or (s^t) such that
either 5 = 0 or ^{s) < z/(6). An important consequence of this in polynomial
rings (where u{p) = deg(p)) is that if deg(c) < deg(a) + deg(6), then we also
1.3 The Euclidean Algorithm 13
get either t = 0 or deg(t) < deg(a). Indeed, if we had (leg(s) < deg(6) and
deg(t) > deg(a), then we would have deg(c) = deg(5a + tb) = deg{tb) =
deg(t) + deg(6) > deg(a) + deg(6).
E x t e n d e d E u c l i d e a n ( a , 6, c)
(* Extended Euclidean algorithm - diophantine version *)
Example 1.3.4- Suppose that we want to solve sa -j- tb = x"^ — 1 in Q[x] with
the a and b of example 1.3.1. Applying E x t e n d e d E u c l i d e a n we get:
a + — — 6 = x^ - 1. (1.6)
H a l f E x t e n d e d E u c l i d e a n ( a , 6, c)
(* Half extended Euclidean algorithm - diophantine version *)
return s
14 1 Algebraic Preliminaries
c — sa
E x t e n d e d E i i c l i d e a n ( a , 6, c)
(* Extended Euclidean algorithm - "half/full" diophantine version *)
;r-V = ^° + E7-
d2--'dn ^ d i
a r ai h / T x 2 = 1 ^i
\~^
We note t •:7h a= aoH--:}=ao
t in the case +
of -T- + "1 J rings,
polynomial - = («0since
+ oo) deg(r)
+ > ^ -7-
< •deg((i) =
a a d i 0(2 • • • ttn ~ ^ ^2
deg((ii) + deg{d2 •' • dn) and deg(ai) < deg{di) in (1.7), then deg(6) <
deg(ii2 • --c^n), so 60 = 0.
di • • -dn
• ao +ES. 1 --
2= 1
„ a x^ + 3x
( a i , t) = E x t e n d e d E i i c l i d e a n ( x ^ — 2x + l , x + l,a:^ + 3x)
1 3x + r
2' 2
16 1 Algebraic Preliminaries
x^ + 3x __ - 1 / 2 (3x + l)/2
X+ 1 ^2 - 2x + 1
We can combine this with the Euclidean division to get a refinement of
the partial fraction decomposition: let ?7i > 1 and d £ D \ {0}. Then, for
any a E D \ {0}, there are a o , a i , . . . , am ^ D such that either aj = 0 or
i^{aj) < v{d) for j > 1, and
771
3=1
a _ dq^ um _ q o^,
^m ~ ßrn ~ ßrn-l ßrn "
Thus
a q , am . sr^ aj
Let now d G D \ {0} and let d = d^^ • - • d^- be any factorization of (i, not
necessarily into irreducibles, where gcd{di^dj) = 1 for i 7^ j , and the e^'s are
positive integers. Then, for any a E D\ {0}, we can first compute the partial
fraction decomposition of a/d with respect to d = bi •• - bn where bi = df'-:
n n
a IT—^ a^ Y A ai
a
--+Eti^
where ä £ D and either aij = 0 or ^{aij) < ^{di) for each i and j . This
decomposition is called the complete partial fraction decomposition of a/d
with respect to the factorization d = YTi=i ^T ^ or simply the complete partial
1.3 The Euclidean Algorithm 17
aij
d^^ • • • dn
ao ^— ao + ai
r e t o r n ( a o , a i , i , . .. ,ai,ei,. •. , a n , i , . . . ,ttn,e,^)
1 3x 4-1
( a o , a i , . . . ,an) = P a r t i a i P r a c t i o n ( x ^ + 3 x , x + l, ( x - 1 ) ^ ) = (0, —-, — - — )
and then:
i J ßi di q aij ao
11 -1/2 x + 1 0 -1/2 0
2 2 (3x + l)/2 x - 1 3/2 2 0
21 3/2 x-l 0 3/2 0
so the complete partial fraction decomposition of / is
x^ + Sx -1/2 3/2
4- x - l
• x^ — X + 1 x -\-l + [x — 1)
We show in Sect. 2.7 how to compute that decomposition for linear factors
without factoring d.
18 1 Algebraic Preliminaries
I On ai ao \
m rows
ai ao
6i bo
S{A,B)
} n rows
\ bo J)
where the A-rows are repeated m times and the B~rows are repeated n times.
The resultant of A and B is the determinant of S{A^B).
3t 0 -t^ - 4 0 \
0 3t 0
S{A,B)--
1 t^ -9 0
0 1 t^ -9 /
T h e o r e m 1.4.1 ([54] Chap. V §10, [92] §5.9). Let ai,... ,an, ßi,...,ßm, a
and b be in R with a j^ 0, b j^ 0, A = a{x — ai) - • • [x — an) and B ~
b{x~ßi)---{x-ßm)- Then,
n m n
resultant(^,ß) = a'"6" [ ] [ ] ( a i - / 3 , ) = a " ] j 5 ( a i )
m
= (-1)"^6^ ]J^(/?,-) = ( - l ) ^ ^ r e s u l t a n t ( ß , ^ ) .
j=i
It is clear from the definition that deg{Sj{A^ B)) < j for each j . Following the
standard terminology [60], we call Sj{A^B) defective if deg{Sj{A^ B)) < j ,
regular otherwise. In addition, QSQ = 5, so So{A^B) = resultant(^, ß ) .
5 o ( ^ , ß ) = resultant;^ ( A ß ) = det(o6'o) =
= -3t^^ - 12t'^ + 1 ^ - 54t^ + 8t^ + 729^2 - 216t + 16 ,
Si{A,B) = det{iSi)x + det(i5o) - 3t^x + t^ - 27t + 4.
Consider now the evaluation map t -^ 1, i.e. the homomorphism cr : Z[t] —> Z
given by a{t) = 1 and a{n) = n for n G Z. We have ^{A) = 3x^ — 5, and
ä{B) = x^ + X -- 9, so Theorem 1.4.3 implies that
So{ä{A),ä{B)) =resultant:,(3x2-5,x2+x-9) =ä(5o(A,ß)) =469,
Si{-ä{A),ä{B)) = ä(3t^x + t^ - 27t + 4) = 3x - 22 .
Definition 1.5.1. Let A,B e D[x] with B j^ 0 and deg{A) > deg{B). A
Polynomial Remainder Sequence (PRS) for A and B is a sequence {Ri)i>o in
D[x] satisfying
(i) Ro =A, Ri= B,
(a) For i > 1;
_rO zfR,=0
P^^^+l j pTem{Ri^uRi) ifRi^O
where {ßi)i>i is a sequence of nonzero elements of D.
It is clear from the definition that either Ri-j-i = 0 or deg{Ri^i) < deg{Ri)
for z > 1, hence,
(i) A PRS has finitely many non-zero elements.
(ii) If Ri / 0, Rj 7^ 0, deg{Ri) = deg(Äj) and i, j > 1, then i = j {i.e. only
Ro and Ri may have the same degree).
Definition 1.5.2. Let A,Be D[x]. A is similar to B if there are a^b e D\{0}
such that a A = bB.
From the definition of a PRS, we see that various choices for the ßi^s yield
different types of PRS. For example, the PRS obtained with ßi = 1 is just the
sequence of the successive pseudo-remainders of A and B, and is called the
Euclidean PRS of A and B. The PRS obtained with ßi set to the gcd in D
of the coefiicients of prem(i?i_i, i?i) is called the primitive PRS of A and B.
An important fact is that if D is a unique factorization domain, then the last
nonzero element of a PRS is similar to a gcd of A and B.
T h e o r e m 1.5.1. Suppose that D is a unique factorization domain, and let
A,B e D[x] with B ^ 0 and deg{A) > deg{B). Let (Äo,i?i, •. • ,fi/c,0,...)
be any PRS of A and B with Rk j^ 0. Then gcd{Ri, Ri^i) is similar to
gcd{Rj^ Rj^i) for 0 < i^j < k. In particular (i = 0, j = k), Rk is similar
to gcd{A,B).
Thus, any PRS of ^ and B contains gcd{A^ B). In addition, all the nonzero
subresultants of A and B are similar to some element in the PRS. The fol-
lowing fundamental theorem of PRS gives explicit formulas for the similarity
coefficients.
T h e o r e m 1.5.2 (Fundamental P R S Theorem,[39] Chap. 7,[60]). Let A
and B j^ 0 be in D[x] with deg(^) > deg(jB)^ and let (i?o, fii,..., Rk^ 0^ • • •)
be any PRS of A and B with Rk -=/=- 0. For i = 1^... ,k, let Ui — deg{Ri) and
ri be the leading coejficient of Ri. Then, for any j m { 0 , . . . , deg{B) — 1}^
nr = (-i)^vLT-+- n .l+nj-i-rij
nj_i-nj +i
-l)^'rf'-'-"'-i n A
.l+^i-i-^j
nj„i-nj4-i (1.9)
i-l i-l
^i == ^ ( n ^ - - n i _ - i + l ) ( n j _ i - n i _ _ i + l ) , ui = ^{nj-i~ni){nj-ni). (1.10)
3=1 j=l
Ro^A, Ri = B, 71 = - 1 , A = ( - l \<5i + l
and
for z > 1 where 6i = deg(i?i_i) — deg{Ri). Its key property is given by the
following theorem.
T h e o r e m 1.5.3 ([16] §7, [23, 60]). Let A and B be in D[x] with deg{A) >
deg{B), {RQ, i?i, i?27 • • •, ß/c, 0, • • •) be the subresultant PRS of A and B with
Rk 7^ 0; and ui = deg{Ri) for i = 1 , . . . , /c. Then,
Ri ifj = ni-i-l
Vj G {0,... ,deg(B) - 1}, Sj{A,B) = { nR^ if j = m
0 otherwise
where TI is given by formula (1.9).
24 1 Algebraic Preliminaries
k-l
T, = {-ly-RT- -'n Ä
^1+^'i
-Uj + i
Ro ^ A.Ri^B
i ^ 1, 71 ^ 1
^1 <- deg(A) - deg{B)
while Ri ^Q do
n <~ lc{Ri)
{Q,R)^ PolyPseudoDivide(Ä-i,ÄO
Ri-^i <— R/ßi (* this division is always exact *)
i <-i+ 1
5, ^ d e g ( i ? , _ i ) - d e g ( ß O
/C ^ 2 -~ 1
return(scfif''*'^'-'\(Äo,ßi,
1.6 Primitive Polynomials 25
j deg(Ä^_i) deg(Ä^-) 5 C
1 2 2 11
2 2 0 11
SO R = scRl = 4 = resultant(a::^ + l,a:^ — 1).
Example 1.5.2. Here is the subresultant algorithm for A = 3tx^ — t^ — A and
5 = ^2 + t^x - 9 in D[x] where D = Z[t]:
i ,1+..
Ri 7i Si A r^
0 A 3t
1 B -1 0 -1 1 1
2 3t^x -h t^ - 27t + 4 - 1 1 1 3^4 9t8
3 R -St"^ 1 9t« Ä Ä 2
4 0
where i? = -3t^O-12t^+t^--54t4 + 8t3 + 729t2-216t + 16 G D. We get A: = 3,
deg(i?3) = 0 and deg(fi2) = 1, so Ä = resultanta^(A, E), as in example 1.4.3.
Note that the content and primitive part are defined, like the gcd, up
to multiplication by a unit. We make the convention throughout this book
however that the choice of unit is made consistently in order that A =
content(A)pp(yl) for any A G D[x]. In addition, primitivity depends on the
ring D, and nonprimitive polynomials can become primitive when D is em-
bedded into a larger UFD: 4x + 6 is not primitive as an element of Z[x], but
becomes primitive as an element of Q[x]. In fact, if D is a field, then ev-
ery nonzero polynomial is primitive. Let P E D[x] \ D he irreducible. Since
P = content(P)pp(P) and pp(P) is not a unit, it follows that content(P)
must be a unit, hence that P is primitive.
The main property of contents is that they are multiplicative. This classical
result is due to Gauss and is known as Gauss' Lemma:
L e m m a 1.6.1 ([54], Chap. V, §6, [92], §5.4).
i=l
and for k G Z^ k >0, the A:-deflation of A to be
j^-k _ TTpmax(0,e,:~fc) ^ TT pe,
i\ei>k
A-=A-^ = l[pr
1.6 Primitive Polynomials 27
dx dx dx
We have m > n since P^ | A. Suppose that m = n. Then,
dx dx dx
We have P ^ | dyl/dx, so P^ | nP''-^B{dP/dx), hence P | nB{dP/dx). But P
is prime and P J/P, so P | n{dP/dx). In characteristic 0, n{dP/dx) is nonzero
and has a smaller degree than P, so P)( n{dP/dx). Hence m j^ n, so m > n,
which imphes that P""^^ \ A. D
An immediate consequence of Theorem 1.6.1 is that when D has characteristic
0, then
A-=gcci(A,^) (1.14)
for any primitive A, and A* can then be computed by (1.11). The further
deflations of A can be computed recursively with (1.12). Squarefree parts and
deflations are thus easier to compute than prime factorizations. We use this
in the next section where we introduce the notion of squarefree factorization.
28 1 Algebraic Preliminaries
A = (content(^) Ai) J | A]
Ai
• ^m. -^
and Ak-^i and A~^+^ are obtained by (1.15) and (1.13) respectively. We con-
tinue this sequence until A~~^'+'^ G .D, which implies that A~^' is squarefree, in
which case /c = m —1, and Am = A~^'. This squarefree factorization algorithm
uses only rational operations plus gcd computations in D[x].
dS
5 - = gcd 5, c^ + 4x^ + 4x
dx
k 5* 5- y ^.
1 x^ + 2a: x^ + 4a:^ + 4x x^ + 2x 1
2 :c^ + 2x x2 + 2 x2-|-2 X
3 ^2 + 2 1 x2 + 2
Hence,
^ - x^ + 6x^ + 12x'* + 8x^ = x\x^ 4- 2)
dAi A - ^ - i ^
Yk = Y,{i-k + 1)
dx Ai
i=k
dAi
Y,{i ~k + l)Ak • • • A , _ i — ^ A , + i •••Am ioik>l (1.16)
i=k
gcd{A-^-^*,Yi) G D,
dA'-''^/dx = A~'Yi, (1.17)
dA->
Yi - AiVi+i (1.18)
dx
for 1 < i < m.
dAi
gcd{Aj,Ai---Aj-i^Aj+i •-•Am)£D
dAk
Aj \Ai--- Ak-i-j-Ak+i •••Am for j ^ fc,
1.7 Squarefree Factorization 31
= 2^ 0 - 0 dx Aj
Since A ^-^ = AiA '-* and gcd(A '•*^Yi^i) E D , we conclude from (1.18)
that
dA-"-''
gcd Ur-^ ,r, ^—j = Ai (1.19)
Once we have A~^-^* and Yk^ Ak is computed by (1.19), and Y^+i and ^4"^*
are obtained by (1.18) and (1.15) respectively. We continue this sequence
until Yk = dA"^-^ / d x , which implies t h a t A''^-^ is squarefree, in which case
k = m^ and A^ = A~^'~^ = A~^-^*. T h e difference between this squarefree
factorization algorithm and t h e previous one, is t h a t Yk —dA~^--^*/dx appears
in the main gcd computation instead of A~^.
32 1 Algebraic Preliminaries
A: 5* Y Z ^3
1 x^ + 2x 8 x ^ + 4 5x^ + 2 1
2 x'^ + 2x 5x^ + 2 2x2 X
3 x2 + 2 2x 0 x2 + 2
Hence,
A = x^ + 6x^ + 12x^ + Sx^ = x^{x^ + 2)^
The second arguments to the repeated gcd computations inside the loop are
in the Z-column, and their degrees are smaller than in the corresponding
AS"-column of example 1.7.1.
Exercises
Exercise 1.1. Use the Euclidean Algorithm to compute the gcd of 217 and
413 in Z.
Exercise 1.6. Compute the quotient and remainder (or pseudo-quotient and
pseudo-remainder) of 7x^ + 4x"^ -\-2x-\-l by 2x^ + 3 in Zs[x], Zii[x], Z[x] and
Q[x]. In each case determine over which kind of algebraic structure you are
computing.
Exercise 1.7. Compute the primitive PRS and the subresultant PRS of x"^ +
x^ - t and x^ + 2^^ + 3tx - t + 1 in Z[t][x].
Exercise 1.8. Compute the gcd of 4x^ + 13x^ + löx^ + 7x + 1 and 2x^ + x^ —
4x - 3 in a) q[x] and b) Z[x].
Exercise 1.13. Use the Extended Euclidean algorithm and Theorem 1.4.1 to
prove Theorem 1.4.2.
Exercise 1.14. Use a loop invariant to prove that the Extended Euchdean
algorithm is correct.
Introduction
The problem of integrating rational functions seems to be as old as differen-
tiation. According to Ostrogradsky [68], both Newton and Leibniz attempted
to compute antiderivatives of rational functions, neither of them obtaining a
complete algorithm. Leibniz' approach was to compute an irreducible factor-
ization of the denominator over the reals, then a partial fraction decomposition
where the denominators have degree 1 or 2 in x, and then to integrate each
summand separately. However, he could not completely handle the case of a
quadratic denominator. In the early 18*^ century, Johan Bernoulli perfected
the partial fraction decomposition method and completed Leibniz' method
The reader unfamiliar with algebra can think of K throughout this chapter as
either the set of rational, real or complex numbers.
36 2 Integration of Rational Functions
{Acta Eruditorum^ 1703), giving what seems to be the oldest integration al-
gorithm on record ([61] Chap. IX p. 353). Amazingly, it remains the method
found in today's calculus textbooks and taught to high-school and university
students in introductory analysis courses. The major computational prob-
lem with this method is of course computing the complete factorization of
a polynomial over the reals. This problem was already an active research
area in the 19*^ century, and as early as 1845, the Russian mathematician
M. W. Ostrogradsky [68] presented a new algorithm that computes the ratio-
nal part of the integral without factoring whatsoever. Although his method
was taught to Russian students, and appears in older Russian analysis text-
books ([36] Chap. VIII §2), it was not widely taught in the rest of the world,
where competing or similar methods were independently discovered^. Thus,
Hermite [43] published in 1872 a different algorithm that achieved the same
goal, namely computing the rational part of the integral without factoring.
And more recently, E. Horowitz independently discovered essentially Ostro-
gradsky's method and presented it with a detailed complexity analysis [45].
The problem of computing the transcendental part of the integral without
factoring remained open for over a century, and was finally solved in recent
papers [56, 83, 89].
be the irreducible factorization of D over E, where c, the a^'s, ö^'s and c^'s
are in M and the e^'s and /^'s are positive integers. Computing the partial
fraction decomposition of / , we get
/ = ^+EE7-£^+EE
' ^-^ (x — aA^ ^-^ ^^ [x^ + hnX + Co-) k
J^ J ht^J
i=\k=\'' (^~^^f
^ "^ ht^J
j=ik=i ^^'^h^^^j)k'
I would like to thank Prof. S.A. Abramov, Moscow State University, for bringing
this point to my attention.
2.1 The Bernoulli Algorithm 37
Computing J P poses no problem (it will for any other class of functions),
and for the other terms we have
and, noting that 6| — Acj < 0 since x'^ + bjX + Cj is irreducible in R[x]
4c,-&2 VV^'^.-^'l
and for /c > 1,
This last formula can be used recursively until /c = 1, thus producing the
complete integral.
We note that this approach is then equivalent to expanding / into its Laurent
series at all its finite poles, since at a: = a^, the Laurent series is
yi,>. -A79 A.ä-\
f = ^ \ \ 1 \—
(x — aiY' {x — ai)'^ {x — ai)
where the TI^J'S are the same as those in (2.3). Thus, this approach can be
seen as expanding the integrand into series around all its poles (including 00),
then integrating the series termwise, and then interpolating for the answer,
by summing all the polar terms, obtaining the integral of (2.3).
Example 2.1.3. Consider / = l/{x^ ^x) G Q(x). The denominator of/ factors
over Q ( A / ^ ) as X^ + X = x{x + \/'~\){x — A/—T), and the partial fraction
decomposition of / is
So an integral of / is
/
/ = ^ + E^^^^g(^^) (2.4)
i=l
k=l k
where P and the A^'s are in K[x] and either Ak — 0 oi deg{Ak) < deg(D^)
for each k. Then,
/-/-s/^
so the problem is now reduced to integrating a fraction of the form Q/V^
where deg(Q) < deg(y^) and V is squarefree, which implies that gcd(y, V) =
1. Thus, if A; > 1 we can use the extended Euclidean algorithm to find B^C G
K[x] such that
Q BV + CV
l~k
and deg(ß) < deg(F). This implies that deg(BF') < deg(l/2) < deg(y'=),
hence that deg(C) < Aeg{y'^~^). Multiplying both sides by (1 — k)/V'' we get
Q_ {k - l)BV' (l-fc)C
\/k ^ " yk 1/fc-i •
until Ä: = 1, we obtain y G K{x) and E e K[x] such t h a t deg(£^) < deg(V) and
Q/V^ = y^ + E/V. Doing this to each term Ai/D\, we get g,h e K{x) such
t h a t f = g' -\- P ^ h and h has a squarefree denominator and no polynomial
part, so J /i is a linear combination of logarithms with constant coefficients.
The V of (2.4) is t h e n merely g -i- J P. Hermite did not provide any new
technique for integrating /i, so question Q2 remained open at t h a t point.
(* Given a field K and A,D G K[x] with D nonzero and coprime with
A, return g^h G K(x) such that ^ = -^ + ^ and h has a squarefree
denominator. *)
( D i , . . . , Dn) ^ SquarePree(i:^)
(P, v4i, ^ 2 , • • •, ^ n ) ^ PartialFraction(A, Di, D i , . . . ;jjn
h<~P + Ai/Di
for k ^- 2 to n such that deg(Dfc) > 0 do
V^Dk
for j ^— /c — 1 t o 1 s t e p —1 do
(B,C) ^ E x t e n d e d E u c l i d e a n ( ^ , l / , - A / e / i )
g^g + B/V^
h^h + Ak/V
r e t u r n ( p , h)
x^ - 24x^ - 4x^ + 8x - 8
^ ~~ x^ + 6x6 + 12x4 + 8^2 ^ ^V^) •
1 -4-
X - 6x3 __ 18^2 __ i 2 x + 8
/ = X- (x2 + 2)3
i V 3 A. B C
2 X 1 x-1 1 -1
3 x2 + 2 2 x4 - 6x3 _ 28^2 _ i2x + 8 6x -4+3X-2
3 x2 + 2 1 x^ - 6x ~ 2 -x + 3 1
2.2 The Hermite Reduction 41
Thus,
^ = BUV + CV
1
and deg{B) < d e g ( y ) . Multiplying both sides by (1 — m)/{UV'^) gives
A __{l-m)BV' (l-m)C
l/ym ym ' [/F^-i
A B f {l~m)C-UB'
/ UV^ 1/m-i / ijy
Example 2.2.2. Given the same integrand as in example 2.2.1, the quadratic
Hermite reduction makes the following steps, where D3 = x'^ -\- 2:
i V u3 B c A
2 X Dl 1 1 -x'- - x^ + 18x^ - 8x - 8 x^ + :r^ - 18x^ + 8:r 4- 8
a;4
3 D3 X 2 %x 2
- ^ + x^ - 2a; - 2 x^ + x^ - 2^2 -2x + A
3 03 X 1 -x + S -a;^ + X - 2 x"^ + 2
Thus,
max(0,e-i—fc)
= \[p. and P-
D*D-^Y2 D^D-^Yo
.Y2 = D1Y2 e K[x]. (2.5)
D- D-^'D-^
Furthermore, gcd(Di,D ) = 1 as a consequence of Lemma 1.7.1, and
gcd.{y2-,D~ ) = 1 by Lemma 1.7.2, which implies that
.M^-^.u- gcA{DiY2,D-*) = l.
2.2 The Hermite Reduction 43
Therefore, we can use the extended Euclidean algorithm to find B^C G K[x]
such that
A BD-' C
D D-^ DiD-
so, adding and subtracting B'/D~ to the right hand side, we get
BD-'\ C - DiB'
C-~DiB' A
DiD- D
where
A = C-~DiB' = C~^B'
and
D= D^D~-=D^D2Dl...D^-\
We then have
D =DiD2...Dm = D''
which means that D* remains unchanged throughout the reduction. In addi-
tion,
D~ =DsDl...Dl^-^ = D-'
which means that D~ is replaced by its deflation at each step throughout
the reduction.
We remark that it is possible to perform all the variants of Hermite's
reduction over a UFD rather than a field, the result being expressed over
its quotient field. In that case, it is necessary for Mack's variant that the
denominator D be primitive (this is not necessary for the previous variants).
44 2 Integration of Rational Functions
(* Given a field K and A,D e K[x] with D nonzero and coprime with
A^ return g^h ^ K{x) such that ^ = -^ + /i and h has a squarefree
denominator. *)
g^Q
D-^Scd{D,^)
D* ^ D/D-
while deg(D") > 0 do
D - ^ g c d ( D - , ^
--)
D-* ^D-/D-^
{B, C) ^- E x t e n d e d E u c l i d e a n ( --D^'^/D- -,D- -\A)
A^C-^D-'/D-" (* new numerator *)
9^g + ßfD-
D- ^ D-^ {^W = D"2 *)
returii(p, A/D*)
Example 2.2.3. Consider the same integrand as in example 2.2.1. Mack's al-
gorithm proceeds as follows:
1.^-0
2. D- = gcd(D, dD/dx) - x^ + 4.x^ + 4x
3. D* = D/D- = x^ + 2x
4. First reduction step:
D-^ = gcd(2:^ + Ax^ + Ax, 5x^ + 12^2 + 4) = x^ + 2
5. D-* = D-/D-^ =x^ i-2x
6.
( ß , C) = ExtendedEuclidean(-5x^ - 2, x^ + 2x, A)
= (Sx^ + 4, x^ - 2x^ + 16x + 4)
15. D- =D-^ =1
Thus,
which is equivalent to the result obtained from the Hermite reduction, but
only 2 reduction steps were needed instead of 3.
A__R_ BD-' C
Since D~ \ D'^D~ by (2.5), the above is a linear equation for B and C with
polynomial coefficients. Furthermore, it must always have a solution in K[x],
since the Hermite reduction returns such a solution. Since we have bounds on
the degrees of B and C, we can replace B and C in this equation by
deg(D~)-l deg(jD*)-l
y ^ bix'^ and
j=0
where the 6^'s and Cj's are undetermined constants in K. Equating both sides
of (2.6) yields a system of linear algebraic equations for the 6^'s and Cj's, and
any solution of this system gives B and C, hence g and h.
46 2 Integration of Rational Functions
H o r o w i t z O s t r o g r a d s k y ( ^ , D) (* Horowitz-Ostrogradsky algorithm *)
Example 2.3.1. Given the same integrand as in example 2.2.1, the Horowitz-
Ostrogradsky algorithm proceeds as follow:
1. D- = gcd{D, dD/dx) = x^ + 4x^ + 4x
2. D* = D/D- = :r^ + 2x
3. n = deg(D-) - 1 = 4,m = deg(D*) - 1 = 2
4.
/= E 1
X •
Then,
(i) the zeros of R in K are exactly the residues of A/D at all the zeros of D
in K,
(a) let a e. K be a zero of R, and Ga — gcdi{D^A — aD') E K{a)[x]. Then,
deg{Ga) > 0, and the zeros of Ga in K are exactly the zeros of D at
which the residue of A/D is equal to a.
(Hi) Any field containing an integral of A/D in the form (2.4) also contains
all the zeros of R in K.
Since this theorem is a special case of results that will be proven in Chaps. 4
and 5, we delay its proof until then. A direct consequence of this theorem is
that
/ ^ = E alog{gcd{D, A-aD')) (2.8)
"^ a\R{a)=0
where the sum is taken over the distinct roots of R. The Rothstein-Trager
algorithm for integrating rational functions with a squarefree denominator
and no polynomial part is given by formulas (2.7) and (2.8). With appro-
priate modifications, the Rothstein-Trager algorithm can, like the Hermite
reduction, be applied to rational functions over a UFD rather than a field.
Part (in) of Theorem 2.4.1 shows that the splitting field of R is the mini-
mal algebraic extension of K necessary to express the integral of A/D using
logarithms, thereby essentially answering question Q2. Of course it may be
48 2 Integration of Rational Functions
possible to express an integral over a smaller constant field using other func-
tions t h a n logarithms, for example jdx/{x^ -f 1) = arctan(x), but since an
antiderivative of a function can be formally adjoined t o a field (Chap. 3),
question Q2 is meaningful only when related to specific forms of the integral.
If inverse trigonometric functions are allowed in the integral, then Rioboo's
algorithm (Sect. 2.8) shows t h a t the integral can be expressed in a field con-
taining the real and imaginary parts of all the roots of R. This result, together
with part (iii) of Theorem 2.4.1, provides a complete answer to question Q2 for
elementary integrals of rational functions (elementary integrals will be defined
formally in Chap. 5). Note t h a t this algorithm requires a gcd computation in
K{a)[x] where a, a zero of Ä, is an algebraic constant over K. A prime factor-
ization R = u Rl^ • • • R^' over K is thus required, and we must compute the
corresponding gcd for a zero of each Ri. Since the answer can be presented as
a formal sum over t h e zeros of each Ri, there is no need to actually compute
the splitting field of R.
x^ -3x^ + 6
Thus,
(a) n < deg{C), in which case there exists a unique m > 1 such that
deg^{Rm) = n, and
^Although he did not publish it, Trager programmed this algorithm in his
axiom implementation of rational function integration.
50 2 Integration of Rational Functions
R= d'\{{A{ßi)-tB{ßi))
I n t R a t i o n a l L o g P a r t ( A , D) (* Lazard-Rioboo-Trager algorithm *)
i Ri
0 x^ - Sx^ + 5 x ^ + 4
1 -6tx^ + x^ + 20tx^ - 3^2 - lOtx + 6
2 (-60^2 + 1) x^ 4- 2tx^ + (120t2 - 3) x^ + 26tx + 144^^ + 6
3 (800t^ - 14t) x^ - (400^2 - 7) ^2 - (2440t2 - 32t) x + 792^^ - 16
4 (-11200^4 - 2604^2 + 49) x^ + 25600t4 + 5952^2 - 112
5 (-119840t^ - 59920^3 - 7490t) x - 23968t^ - 11984t2 - 1498
6 2930944t^ + 2198208^4 + 549552^2 + 45796
Since
gcd(lc,(Ä3), Q3) = gcd(800t2 - 14t, 4t2 + 1) = 1,
so an integral is
x"^ - 3 x 2 + 6
= ^ a log(-214ax^ + 107x2 + 642ax - 214).
c^ - 5x4 _|_ 5^2 _|_ 4
a|4a2 + l=0
• dx —
x^ - 2x4 - 2x3 + 4x2 + X - 2
12x + 6 .^^ , / 1 3a
,~^ E «logf:^-^-^).
2~ ^
(2.9)
A simpler form for the logarithmic part will be obtained by the algorithm of
Sect. 2.7.
Thus, Qi = 4t2 + 1/1 = 4t^ + 1 and Si = P2, which yields the integral
x^ - 3 x ^ + 6
y^ a log(x^ + 2ax^ - 3x -- 4a)
/ x^ - 5x4 + 5:^2 _^ 4
a|4a2 + l=0
rational operations over K, we can compute Hij € K[x] for 1 < j < i < n
such that the partial fraction decomposition of A/D is
D z^ z^ \(x-aY X- a
i = l a\Diia)=0 ^^ '
where li is a differential variable over K{x) {i.e. u and all its derivatives
u'^u"^... are independent indeterminates over K{x)). Each Di is squarefree
and coprime with the other D/c's by the definition of squarefree factorization,
so gcd{Eij Di) = gcd(D^, Di) = 1. Thus, use the extended Euclidean algorithm
to compute Bi^Ci E K[x] such that
Qij{a) = Pijla,D',{a),-
2 ' 3 ' ' i-j+1 I
= Pi^ (^a,D,,^{a),D[Ja),D'l^ia),...,Dii-'\a)) .
2,a V /
Hij{a) = Qij{a)Bi{ay-^+'Ci{af'-^
i^-Jy•
Since x — a does not divide the denominator of /i^^«, hi^a has a Taylor series
at X = a, and by Taylor's formula,
fc>0
p+EE E
where all the summands are guaranteed to be nonzero.
2.7 Newton-Leibniz-Bernoulli Revisited 57
return a
1. a = 0, E = X - 2, /i = 36/(^2(^x - 2)),
2. (^2 - l ) / 3 - ( x / 3 + 2/3)(x - 2) = 1, so E = - ( x + 2 ) / 3 ,
3. (x/2)2x - (x2 - 1) - 1, so C = x / 2 ,
36 ^ V ~3^~^I 4
x^-2^4-2x3+4x2+x-2 I Z_^ (x-a)2| x+1
\Q;^ —1=0 '
FullPartialFraction(/)
(* Full partial fraction decomposition of / *)
Y^ —3a — 6
(x — a;)2 I x+1
36 / Y^ —3a — 6 I ^
c^ - 2x4 - 2x3 + 4x2 + X - 2 II Z—/
Z^ (x _- rv\2
fry. a)2 II O
x- +
4- 11 x- 2
(2.13)
2.8 Rioboo's Algorithm for Real Rational Functions 59
^ + X] Z l J2 (^'!}% ^ FulIPartialPractioii(/)
i = l j = l a\Di.j(cx)=0 ^ ^
return P + \^ \^ Hii{a)log(x — a)
Hij{a)
+EE E jT.
(1 - i)(x ~ ay-^
i=2 j=2 cx\Dij(cx)=0 ^ -^^^ '
dx =
x^ - 2x4 _ 2x3 + 4x2 + :z: - 2
41og(x-2)-41og(x + l ) + > .
^-—^ X—a
« 2 - 1= 0
Compare with the algorithm of the previous sections, which returns (2.9) for
the same integrand.
Since the resulting integral is returned in the form (2.4) with the fraction v
also expanded into partial fractions with linear denominators, this algorithm
is not a better alternative t h a n the other rational algorithms in this chapter,
but it makes the partial fraction algorithm factor-free nonetheless. Thus, all
the approaches to rational fraction integration can be implemented using only
rational operations.
The algorithms of this chapter give the integral of a rational function in the
form (2.4), i.e. using logarithms whose arguments may involve algebraic quan-
tities over the ground field. In the case where the ground field i^ is a subfield
of the reals, those algebraic numbers can be complex, so complex arithmetic
is necessary for computing a definite integral. This may cause branch prob-
lems in the numerical computation, since the arguments t o the logarithms
may have complex zeros, while the initial integrand has no pole in the path
of integration. As a result, a direct apphcation of the fundamental theorem of
60 2 Integration of Rational Functions
calculus can yield an incorrect value, since the antiderivative is not necessarily-
continuous on the interval of integration. For example, consider the definite
integral
x^-Sx^ + e , , ,
•dx. (2.14)
It is easily checked that the integrand is continuous and positive on the real
line, hence that the above integral must be a positive real number. The indef-
inite integral as computed by the algorithms of this chapter is
OTT /1\
— ^ arctan
- R^ —3.46 .
4 \2j
As explained above, this result cannot be the correct area. Thus, it is prefer-
able to return a real function given a real integrand. We describe in this section
an algorithm of Rioboo [72] that expands a result of the form (2.4) into a real
function without introducing new real poles, provided that the initial inte-
grand is real. We use the following properties of fields which do not contain
\ / ^ : if x^ + 1 is irreducible over if, then, for any P, Q £ if [x],
p2 + Q2 _ 0 = ^ P = Q = 0 . (2.16)
Indeed, if P^ + Q2 ^ Q and Q 7^ 0, then (P/Q)^ - ~ 1 , so Q | P, which
implies that P/Q G K is a, square root of —1, in contradiction with x^ +
1 irreducible over if. We first present the classical algorithm for rewriting
complex logarithms as real arc-tangents.
L e m m a 2.8.1. Let u e K{x) be such that v? ^ —\. Then,
D
Directly using (2.17) for rewriting complex logarithms with real arc-tangents
is possible, b u t does not eliminate the problem of obtaining discontinuous an-
tiderivatives, since the resulting integral always has singularities at the poles of
u^ while its derivative does not. For example, applying it to the integral (2.15)
gives (we write f ^ g for df/dx = dg/dx):
Using this to compute the definite integral (2.14) via the fundamental theorem
of calculus we get 7r/4 —arctan(2) ^ —0.32, which is also incorrect. The reason
is t h a t (2.17) introduced discontinuities at ± \ / 2 , as can be seen from the graph
of arctan((x^ - 3x)/{x'^ - 2)) (Fig. 2.1).
-n/2f
x^Sx^+G
Fig. 2 . 1 . A discontinuous formal integral of x^-5x'^-\-5x^-\-4
—^
d ^ fA^iB\ d ^ f-B + iA
dx log^\A-iBj
"1 ^ = 1dx- log ""y-B-iA
where i^ — —1.
Proof. We have
A + iB _ {-{) {-B + iA) _ -B-^iA
A-iB ~ i {--B - iA) ~ ~~B- iA
so, taking logarithmic derivatives on both sides,
d ^ fA-i-iB\ d , f-B + iA
l^g ~A ^ h = 1 - log
dx \A~iBj dx \-B-iA
Let now G = gcd{A, B) and C,D G K[x] be such that C ^ 0, C^ + I}^ / 0
and BD-AC = G. Write P = {AD + BC)/G. We note that P e K[x] since
G I ^ and G I 5 . We have
A + iB fD--iCA + iB\D + iC
A~iB \D + iCA-iBj D-iC
'AD-hBC-i-i{BD-AC)\ D + iC
AD + BC-i {BD ~AC)JD - iC
P + i\ [D + iC^
D-iC
Note that (2.16) implies that Theorem 2.8.1 is always applicable in fields
not containing \f-i. Furthermore, it provides an algorithm for rewriting
2.8 Rioboo's Algorithm for Real Rational Functions 63
df d ^ f-B-ViA
dx — i dx
-r- log \ —B — lA
by Theorem 2.8.1, so we can assume t h a t deg(yl) > deg{B) > deg(G). By the
extended Euclidean algorithm, we can find C^ D G K[x] such t h a t BD —AC =
G and deg{D) < d e g ( ^ ) . In addition, D / 0 since d e g ( ^ ) > deg(G'). This
implies t h a t C / 0, since deg{B) > deg(G), hence t h a t C^ + D^ / 0 as we
have seen earlier. Hence, by Theorem 2.8.1, the derivatives of / and of
fAD + BC\ ., fD + iC
2 a r c t a n ^ ^ ^ j + . l o g ^ ^ — ^
are equal. We can apply the algorithm recursively to the remaining logarithm,
and m a x ( d e g ( C ) , d e g ( D ) ) < m a x ( d e g ( A ) , d e g ( ß ) ) guarantees t h a t this pro-
cess terminates.
LogToAtan(A, B)
(* Rioboo's conversion of complex logarithms to real arc-tangents *)
\r^ 1 / ^ ^ 2 o . N ^1 / ( x ^ - 3 x ) + 2(x2-2)
A B C D G (yl£) + ß C ) / G
x^ — 'ix x^-2 xß ^2/2 - 1/2 1 a;V2 - 3x3/2 + a:/2
x2/2 - 1/2 x/2 2 2x 1 x3
2x 2
SO the integral is
x'^ - 3 x ^ + 6 x^ - 3x^ + X
(ix = arctan arctan(x^) + arctan(x)
(2.20)
which differ from (2.18) only by a step function (Fig. 2.2).
Using (2.20) to compute the integral (2.14), we get the correct answer:
arctan ( — - j -- a r c t a n ( l ) — arctan(l)
TT TT TT
arctan(5) + arctan(8) ,
arctan(5) + arctan(8) Pä 2 . 8 1 .
2.8 Rioboo's Algorithm for Real Rational Functions 65
Y^ alog{S{a,x)) (2.21)
a\R{a)=0
Example 2.8.2. R, Q, Q{^/p) for any prime number p > 2, and Q ( a ) where
a is an indeterminate over Q, are all real fields. Q ( - > / ^ ) is not a real field
2
since —1 = 1^ + y^—2 is a sum of squares. If K has characteristic p > 0, t h e n
— 1 = J2^Zi 1^, so any real field must have characteristic 0.
T h e o r e m 2 . 8 . 2 ([54], Chap. XI, §2). Any real field has a real closure.
This theorem is also proven in [92], §11.6 b u t for countable real fields only.
Note t h a t t h e real closure of K is not unique, even up to isomorphism, unless
K is already ordered.
T h e o r e m 2 . 8 . 3 ([54], Chap. XI, §2, [92], §11.5). Let L be a real closed field.
Then,
(i) L has a unique ordering, given by: x > 0 4 = ^ x = y^ for some y G L.
(a) L ( \ / ^ ) is the algebraic closure of L.
Let K be a real field for the rest of this section, and let IK be a real closure
of K, and K = K{i) where i^ = —1. W i t h a slight abuse of language, we say
t h a t a £ K is "real" if a G K. Let / be a sum of t h e form (2.21) where R =
Y^jTjX^ G K[x], S = Ylj^k^jk^'^^^ ^ i f [ t , x ] , and let u^v be indeterminates
over K{x). We first separate t h e sum (2.21) into one over the real roots of R
and one over t h e other roots:
f = g+ Y. c^log{S{a,x)). (2.22)
where
^The reader wishing to avoid this extra algebraic machinery can skip this def-
inition and the following theorems, and think of K in the rest of this section as a
given subfield of the real numbers, with real closure K = M.
66 2 Integration of Rational Functions
9= Yl a\og{S{a,x))
oceK,R{(x)=0
f = 9+ Yl {a + ib)log{S{a-i-ib,x)) (2.25)
a,beK,bj^O
P{a,b)=Q{a,b)=0
which implies that R{a + i 6) = 0 if and only if R{a — ib) = 0. Hence, for
any pair (a, b) appearing in the sum (2.25) with 6 / 0 , the pair (a, —b) must
appear also, and is a different pair, so we can rewrite (2.25) as
= 9+
22 {^ (log(A(a, 6,x) + 2ß(a, 6,x)) + log(A(a, b^x) — iB{a,6, x)))
a,6GK,6>0
P(a,6)=Q(a,6)=:0
/ == g + h + E -^l»g(1^^'1^'o!"'''1'l (2.26)
a,beK,b>0
P{a i,b)=Q{a,b) ==0
where
/z= ^ a log(A(a,6,x)^ + E(a,5,x)^)
a,6GK,6>0
P(a,6)=Q(a,6)=0
is a real function. Since the remaining nonreal summands in (2.26) are all
of the form (2.19), we can use Theorem 2.8.1 and its associated algorithm
to convert them to real functions. Note that, since converting (2.19) to real
functions requires computing the gcd of A and B^ we have, in theory, to
use algorithm LogToAtan over an algebraic extension K{a,h) of K where
P{a, b) = Q{a^b) = 0, which means that we have to solve this nonlinear
algebraic system. However, the following theorem of Rioboo shows that, when
the complex logarithms to expand arise from the integration of a real rational
function, it is not necessary to solve this system.
T h e o r e m 2.8.4 ([72]). Let K be a real field, K be a real closure of K, C,D e
K[x] with deg(J9) > 0^ deg(D) > deg(C); D squarefree and gcd(C, D) = 1.
Suppose that the R and S of (2.21) are produced by the Rothstein-Trag er
or Lazard-Rioboo-Trager algorithm applied to C/D, and let P^Q be given
by (2.23) and A,B by (2.24). If a,b £ K satisfy P{a,b) = Q{a,b) = 0 and
b^O, then gcd{A{a^b,x),B{a^b^x)) = 1 in K{a^b)[x].
and
D{x) = F{a + i6, x)S{a + ib, x).
Writing E = Ei-^ iE2 and F = Fi + iF2 where ^ 1 , ^ 2 , ^ 1 , ^ 2 e K{a, b)[x],
we get
Taking the imaginary part of (2.27) and the real part of (2.28) we get
and
D{x) = Fl (a, 6, x)A(a, 6, x) - F2(a, 6, a:)B(a, 6, x). (2.30)
Since D is squarefree, gcd(D,D^) = 1, so there exist Gi, G2 € K[x] such that
G1D + G2D' = 1. Multiplying (2.30) by bGi, (2.29) by -G'2 and adding both
yields
b = {GiD-hG2D')b
= bGiFi{a,b,x)A{a,b,x) — bGiF2{a,b,x)B{a,b,x)
—G2Ei{a, 6, x)B{a, 6, x) — (^2-E'2(a, 6, x)yl(a, 6,2:)
= (6GiFi(a,6,a:) - G'2^2(ß,^,^))^(a, &,^)
- ( ^ 2 ^ 1 (a, 5, x) + 6^1^2(0,6, x))ß(a, 6, x)
f = gi-h^ Y^ b(j){a,b,x)
a,5GK,6>0
P(a,6)=g(a,6)=0
where Theorem 2.8.4 guarantees that (j){u,v,x) specializes well, i.e. that no
division by 0 occurs when we replace u and v by the various solutions a and
6 > 0 in ]K of P{u,v) = Q{u,v) — 0. By presenting the answer in terms of
formal sums, we do not need to actually solve this system, or to introduce any
algebraic number. In practice, whenever the real roots of P{u, v) = Q{u,v) = 0
can be computed efficiently (for example if they are all rational numbers), then
it can be more efficient to first compute the roots, and then call LogToAtan,
rather than perform the reduction with generic parameters.
2.8 Rioboo's Algorithm for Real Rational Functions 69
LogToReal(Ä, S)
(* Rioboo's conversion of sums of complex logarithms to real functions *)
*)
write R{u -i-iv) as P(u, v) -\-i Q{u, v)
write S{u -\- iv^x) as A{u^ v^x) -\- iB(u, v, x)
return
+ ^ alog(S'(a,x)).
aeK,R(a)=0
and
1. R{u-i-iv) ==4(iA + iv)2 + l =Au'^-4v'^ + l-i-8iuv, so P = Au'^ - Av'^ ^ 1
and Q = 8uv^
2. S{u + iv,x) = x^ + 2{u + ^ 'y)^:^ — 3x — 4{u + iv) = x^ i- 2ux'^ — 3x — 4w +
i(2'ux^ ~ 4v), so A = x^ + 2ux'^ — 3x - 4u and ß = 2vx'^ - 4t;,
3. H = resultant^(p,g) = 2b6u'^ + 64w^ whose only real root is 0. P ( 0 , f ) =
1 — 4t'^, whose only real positive root is 1/2,
4. yl(0, l / 2 , x ) = x^ - 3x, B ( 0 , l / 2 , x ) = x^ - 2, and L o g T o A t a n ( j : ^ -
3x,x^ — 2) returns
fx^ -3x^ + x\ ^ / sx ^
2 arctan I 1 + 2 arctan(x ) + 2 arctan(x)
—7 z T; dx = >^ b(h(a,b,x)
a,beR,b>0
4a^-4b'^-\-l=8ab=0
(* Given a real field K and / G K{x)^ return a real function g such that
dg/dx = / . *)
m
Y^ a log{Si{a,x)) <r~ I n t e g r a t e R a t i o n a l F u n c t i o n ( / )
i=l a Ri{a)=0
return('ü + X ] ^ i L o g T o R e a l ( ß i , 5'i))
Those problems are important because they arise from the integration of more
general functions. Furthermore, deciding whether a rational function is a loga-
rithmic derivative is useful when solving linear ordinary differential equations
with rational function coefficients^.
Recognizing Derivatives
The first problem is, given / G K{x)^ to determine whether there exists u E
K{x) such that du/dx = f. To compute such an u^ we simply apply either the
Horowitz-Ostrogradsky algorithm, or any variant of the Hermite reduction,
to / , obtaining g G K{x) and A, D G K[x] such that D is squarefree and
/ = dg/dx + A/D. At that point, / = du/dx for u G K{x) if and only if
D \ A/in which case u = g -\- J{A/D)dx.
There are also a couple of criterions that can determine whether / is the
derivative of a rational function without computing an integral of / :
® Compute the squarefree factorization D1D2 ... D^ of the denominator of
/ , and for each i the polynomial Hn G K[x] of Theorem 2.7.1, using the
LaurentSeries algorithm. Write Di = GiEi where Gi — gcd{Hii^ Di) and
gcd(jE^, Hii) = 1. Since the residues of / at the roots of Gi are all 0, and
the residue of / at a root a of Ei is Hii{a) ^ 0, / is the derivative of a
rational function if and only if E^^ = 1 for each i, which is equivalent to
Di I Hii for each i.
® Compute the squarefree factorization D1D2 .. • D^ of the denominator of
/ , and write / as a sum
J\ A-
2=1 *
D I Wronskian ( -
\dx ^ dx ^ ' dx
While those criterions are not practical alternatives to either the Hermite
reduction or the Horowitz-Ostrogradsky algorithm, they are of theoretical
interest. No generalization of those criterions is known for more general func-
tions, which makes the problem of recognizing derivatives more difficult in
general (see Sect. 5.12).
^The differential Galois group of y*^^^ + an-i{x)y^^ -^-^ + ... is unimodular if and
only if ön-i is the logarithmic derivative of a rational function.
72 2 Integration of Rational Functions
The second problem is, given / G K{x), to determine whether there exists
u G K{xY such that du/dx = uf. It will be proven later (see Exercise 4.2)
that / is the logarithmic derivative of a rational function if and only if / can be
written as / = A/D where D is squarefree, deg(A) < deg(Z}), gcd(^, D) = 1,
and all the roots of the Rothstein-Trager resultant are integers. In that case,
any of the Rothstein-Trager, Lazard-Rioboo-Trager or Czichowski algorithm
produces u G K{x) such that du/dx — uf.
Exercises
Exercise 2 . 1 . Compute
c^ - x"^ + 4x^ + x^ - a: + 5 ,
dx
Exercise 2.3.
a) Compute
Exercise 2.4.
a) Compute
dx
l + x4 '
b) Find a closed form for J dx/{l + x^) for n G N.
2.9 In-Field Integration 73
x'^ H- x^ + x^ + X + 1
+ x4 + 2x3 4- 2^2 - 2 + 4 \ / - l + \ / 3 ax
E x e r c i s e 2.8 ([47]).
a) Compute
?tdx
5 — 4cos(x)
using the change of variable u = t a n ( x / 2 ) followed by rational function
integration and the Rioboo algorithm.
b) Find the real singularities of your integral (note t h a t the integrand is con-
tinuous in R).
c) Apply to your integral the transformation t h a t sends arctan(a t a n ( x / 2 ) + 6)
to
We develop in this chapter the algebraic machinery in which the integration al-
gorithms can be presented and proved correct. The main idea, which originates
from J. F. Ritt [78], is to define the notion of derivation in a pure algebraic
setting {i.e. without using the notions of "function", "limit", and "tangent
line" from analysis) and to study the properties of such formal derivations
on arbitrary objects. This way, we can later translate an integration problem
to solving an equation in some algebraic structure, which can be done using
algebraic algorithms. Since an arbitrary transcendental function can be seen
as a univariate rational function over a field with an arbitrary derivation, we
first need to study the general properties of derivations over rings and fields.
This will allow us to generalize the rational function integration algorithms
to large classes of transcendental functions (Chap. 5).
3.1 Derivations
Although the integration algorithm we present in later chapters works only
over diff"erential fields of characteristic 0, the rings and fields in the first two
sections of this chapter are of arbitrary characteristic. Given a map in any
ring, we call it a derivation if it satisfies the usual rules for differentiating
sums and products.
When there is no ambiguity about the derivation in use, we often say that
i? is a differential ring (field) rather than the pair {R, D). We first show that
the usual algebraic properties of the derivations of analysis are consequences
of the above definition.
D{u\K..ul-) __ Du^ j_ ^
L^... Un Ui
Proof, (i) Let a E R and c G Consti)(i?). Then, D{ca) = cDa + aDc = cDa
since Do = 0.
(ii) Suppose that i? is a field, and let a^b E R with 6 7^ 0, and c = a/b. Then,
a = be, so by property (ii) of Definition 3.1.1,
Hence,
a _,\ bDa — aDb
D-b = -b VDa--Db]
b J = 62 •
(iii) Let C = Constj9(i?). From property (i) of Definition 3.1.1, D(0) = D{0-h
0) - D{0) + D{0), soO E C. From property (ii) of Definition 3.1.1, D{1) =
D{1 X1) = D ( 1 ) + I } ( 1 ) , so 1 € C. Since DC = {0}, this implies t h a t DC c C.
Let ÜER. Then, Da + D{-a) = D{a + {--a)) = D{0) = 0, so D{-~a) = ~Da.
Let c,d E C. Then, D{c ~ d) = Dc + D{-d) = Dc - Dd = 0 - 0 = 0, so
c- d E C. Also, D{cd) = cDd + dDc = 0 ^ 0 = 0, so cd E C, hence C is
3.1 Derivations 77
so (iv) holds for any integer n > 1. Suppose that i? is a field. Then, DoP =
D{1) = 0 = Oa^^Da^ so (iv) holds for n = 0. For n < 0 we have
where a^e) € C = Const/:)(i?). Using property (ii) of Definition 3.1.1 and the
fact that D is C-hnear, we get
\ ( e ) = (ei,...,e,.) i-1
n n
IZ -(e) 1 ] eiuf-^Dui J l li^'^'
(e)=:(ei,...,e,,,) i=l .^^
^^Tr-(^i,--.,'^n)i^'^i.
ax.
D
In general, a ring can have more than one derivation defined on it. For
example, Q[X, Y] has at least the derivations 0, d/dX and d/dY. But it has
a lot more derivations, for instance D = d/dX + d/dY. In fact, any linear
combination of derivations with coefficients in R is again a derivation on R.
and
D{ab) •=• cDi{ab) + D2{ab) = caDib + cbDia + aD2b + 6D20
= a{cDib + D2Ö) + b{cDia + D2a)
= aDb + 61}a
so D E [2{R). Since the zero-map on R (which maps every element of R to 0)
is a derivation on J?, this implies that Ü{R) is a left-module over R. D
Definition 3.1.2. Let {R,D) be a differential ring. An ideal I of R is a dif-
ferential ideal if DI C I.
L e m m a 3.1.2. Let (i?, D) be a differential ring, I be a differential ideal of R,
and TT : R -^ R/I be the canonical projection. Then, D induces a derivation
D* on R/I such that D* OTT = IT o D.
Proof. Define D* as follows: for x G R/I, let a G R be such that 7r(a) = x, and
set D*x = 7r(Da). Suppose that 7r(a) = 7r(6) = x for a, 6 G R. Then, a — be.1^
so D{a — b) E I since J is a differential ideal. This implies that Da — Db E / ,
hence that 7r{Da) = 7r(D6), so D* is well-defined. We have D* o TT = TT o L) by
the definition of D*. Let x^y E R/I and let a^b E R he such that 7r(a) = x
and 7r(6) = y. Then, 7r(a + 6) = x + y and 7r(a6) = xy, so
I}*(x + y) = 7r(i:>(a + b)) = 7r{Da + Db) = 7T{Da) + 7r(i:)6) = D'^a + 1:^*5
and
D*{xy) = Ti{D{ab)) = Ti{aDb + bDa)
= 7r(a)7r(D6) + 7r(6)7r(Da) == xß*y + yD*x
so D* is a derivation on R/I. D
Example 3.1.L Let Ä be any ring and D be the zero-map on R. Then any ideal
of jR is a differential ideal, and the induced derivation J9* is the zero-map on
R/L
Example 3.1.2. Let X be an indeterminate and D be d/dX on R = Q[X]. The
only differential ideals of R are (0) and (1), and the induced derivations are
D and the zero-map respectively.
Example 3.1.3, Let {Rj D) be a diflFerential ring, X be an indeterminate and
Ä : Il[X] -> i?[X] be the map defined by
n n
It can be checked that Z\ is a derivation on R[X] and that for any integer
m > 0, the ideal J ^ = {X^) is a differential ideal. For m = 1, the map
TT : i?[X] -^ R\X]/{X) ::± jR is the substitution X -^ 0, and the induced
derivation A* on R satisfies
Zl*7r(p) = n{Ap) = D{p{{))) for any p G R[X]
so A* = D on i^.
3.2 Differential Extensions 79
bPa~aPb dPc-cPd
and
3 Differential Fields
^ac hdDiac) — acD(hd)
KniY^^iX') = Y.^Da,)X\
i=0 i=0
The map KD simply applies the derivation D to every coefficient of a polyno-
mial over R. Note that the degree is not necessarily preserved under KD.
L e m m a 3.2.1. KO is a derivation on R[X].
Proof. Let p, g E R[X] and write p = YA=O ^i^'^ ^^^ Q = SlLo ^i^^- Then,
n n n
and
2n 2n
= E E «'^^^•^' + E E ^^-^«^^
\i=0
dP
= no{P){a)^{Aa) — {a)
D
We can now prove the main result about differential extensions: given a
simple extension F{t) of a differential field (F, D), if t is algebraic over F , then
D can be extended in a unique way to F(t), otherwise D can be extended in
several ways to F{t) but choosing a value for Dt makes the extension unique.
We prove this in two theorems, one for the transcendental and one for the
algebraic case.
Theoremi 3.2.2. Let (F^D) be a differential field, and t be transcendental
over F. Then, for any w G F{t), there exists a unique derivation A on F{t)
such that At = w and {F(t)^ A) is a differential extension of (F, D).
Proof By Lemma 3.2.1, KD is a derivation on F[t], and by Theorem 3.2.1, it
has a unique extension to a derivation on F(t). Since d/dt is also a derivation
on F(t), the map A = njj -\- w d/dt is a derivation on F{t) by Lemma 3.1.1.
We have, At = K^t + w dt/dt = D{l)t -^ w - 1 — w^ and for a G F^ we get
Aa = Koct + u) da/dt = Da + w-0 = Da, so (F(t), A) is a differential extension
oiiF,D).
Suppose that there are two derivations Ai and A2 on F{t) such that
(F(t),Z\i) and {F{t),A2) are both differential extensions of {F^D), and that
Alt = A2t = w. Let x G F(t) and write x = a/b where a^b E F[t] and b ^ 0.
Using part (ii) of Theorem 3.1.1 and Lemma 3.2.2 applied to both a and b
with a == t, we get
a bAia — aAib b{KDCi + w da/dt) — a{KDb + w db/dt)
^ 1 ^ = ^' 6 = — p — = p
bA2a — aA2b .a .
= p = Ä,-=Ä,x
82 3 Differential Fields
Example 3.2.1. Let F be any field, Oj? be the map that sends every element of
F to 0, and x be transcendental over F. Let D be an extension of Op to F{x)
satisfying Dx = 1. Since {F{x)^ d/dx) is a differential extension of (F, Oj?) and
dx/dx = 1, Theorem 3.2.2 implies that D = d/dx^ i.e. the only derivation on
F{x) that is 0 on F and maps x to 1 is d/dx.
nn{P){a)
dP/dX{a) •
Since F c:^ F[a]^ there exists Q G F[X] such that w = Q{a). By Lemma 3.2.1,
K]j is a derivation on F[X]. Since d/dX is also a derivation on F[X], the map
A = K£) +Q • d/dX is a derivation on F[X] by Lemma 3.LL Let n : F[X] -->
F[X]/{P) c:^ E he the canonical projection. We have
dP dP
7r{AP) = 7r{KDP + Qjx)- ^D{P){a) + w —{a)
= KD{P){a)-KD{P){a) =0
Since this holds for any x € F , zli == Zi2 5 so there exists a unique derivation
Zl on F such that (F, Z\) is a differential extension of (F, D\ D
Example 3.2.3. Let {F, D) be a differential field of characteristic 0 and C =
Consti:>(F). Let a be algebraic over C and P G C[X] be its minimal irreducible
polynomial over C Then D has a unique extension to F{a) and we must have
dP dP
0 = D{P{a)) = Kn{P){a) + {Da)^{a) = {Do.) —{a)
SO Da = 0, which means that any algebraic element over the constants is itself
a constant w.r.t D.
Example 3.24. Let F = Q(x) and a be a root oi V^ - x G F\Y], i.e. a
represents the function iby^. Then, d/dx has a unique extension to Q(x,a)
and we must have
84 3 Differential Fields
d , r, ^ ^^^r, ^^ ^ da d(Y'^ — x) , , da
SO
da 1
dx 2a
which is the usual derivative w.r.t. rr for a = ±y^.
As a consequence of Theorem 3.2.3, we can always replace any field in a
tower of differential extensions by a separable algebraic extension, and we still
have a valid tower of differential extensions.
EF
(F^A)
dP
0 = D{P{x)) = KD{P){X) + j^{x) Dx
so
{dP/dX){x) •
We get similarly Ax = —K,/^{P){x)/{dP/dX){x) by considering P as an ele-
ment of F[X]. This impUes that Dx = Ax since n£f{P) = K ^ ( P ) . Therefore,
{EF, A) is a differential extension of (E, D). D
so D oTr = Tr o D. Furthermore,
ai n
In the next few lemmas, we consider the new algebraic constants that can
appear in a differential extension. We first show that an algebraic constant
must in fact be algebraic over the initial constant field, and conversely that
any separable algebraic element over the initial constant field must also be a
constant.
Proof, (i) Suppose that c G Consta (£") is algebraic over F , and let
dP
0 = A{P{c)) = nD{P){c) + {Ac) — {c)
= KD{P){C) = {Dbn-i)c^~^ + ...^Dbo
dP dP
0 = DiP{c)) = Kn{P){c) + {Dc)~{c) = {Dc) — {c).
• E
c^
{F,D)
c
D can be extended uniquely to E by Theorem 3.2.3. Let c E ConstD(^).
Since E is algebraic over F , c is algebraic over F , so c € C by Lemma 3.3.2.
Hence, ConstD(E) C C n E. Conversely, let c e C 0 E. Then, since E is
separable over F^ c E Consti:)(F) by Lemma 3.3.2, so Const£)(F) = C f) E.
Suppose that E is algebraically closed. Then, C C E since C C F C. E. Hence,
Consta {E) = CnE = C. D
Suppose first that t is algebraic over F and let m = [F{t) : F]. Then, any
u G F{t) can be written as ti = Yl^i^ ^^^* with a^ E F , so Au = KJJU =
X^i^^ {Dai)t'^. Since l , t , . . . ,t"^~-^ are linearly independent over F , Zlii = 0 if
and only if a^ G C for each z, so ConstA{F{t)) = C{t).
Suppose now that t is transcendental over F , and let u = J2^=o^^^^ ^ -^W-
Then, Au = tvjju = ^^^^{Daijf'^ so Ziii = 0 if and only ii ai E C for each i.
This implies that Const^(F[t]) = C[t]. Let now c E Const^(F(t)) and write
c = u/v where u^v E F[t], gcd(u, v) = 1 and f 7^ 0. Dividing ix and v by the
leading coefficient of v if necessary, we can assume that the leading coefficient
of ^' is 1, which implies that either Av = 0 or deg(Ziv) < deg('ü). Suppose that
Av 7^ 0. Since u/v is a constant, we have
^u vAu — uAv
0 = A- =
V V^
and lcm(i^, v) \ z, we have deg(lcm(ii, v)) < deg{uv). But lcm('u, v) gcd{u^ v) =
uv, so deg(gcd('u, f)) > 0 in contradiction with gcd{u^v) = 1, Hence Av =
0, which implies that vAu = 0, hence that Au = 0. Therefore u^v G
Const^(F[t]). But Constz^(F[t]) = C[t], so c = u/v G C{t). U
for any m > 0. This implies that ( c i , . . . , c„) G ker(A^), hence that ker(A^) ^
{0}andW^(yi,...,2/„) = 0.
We proceed by induction on n for the converse. For n = 1, we have
W{yi) = yi so if W{yi) = 0, then yi = 0 is Hnearly dependent over C.
Suppose now that n > 1, that the lemma holds for any n — 1 elements in F ,
and that W ( y i , . . . ,yn) = 0. Then, ker(A^) / {0}, so let ( x i , . . . ,x^) be in
kei{J\4) where Xi j^ 0 for some i. Renumbering the y^'s if necessary, we can
assume that xi 7^ 0, hence that xi = 1 since ker(A^) is a vector space over
F. Since ( x i , . . . ,Xn) G ker(A^), we have Yl^=i ^i^^Vi = 0 for 0 < j < n.
Differentiating those equations for 0 < j < n — 1 and using them together
with Dxi = Dl = 0, we get
n \ n n n
y]/i/,b(ci,...,c^)6 = 0
which implies that /i/^5(ci,... ,Cm) = 0 for each b E B, since >B is linearly
independent over Const^(E) by Corollary 3.3.2. Suppose that 1 G / . Then,
there are polynomials a/^5 G C [ X i , . . . ^Xm]^ all but finitely many of which
identically 0, such that
6Gi3
Dp = nD{p) + {Dt)^^ek[t]
(ii) Suppose that t is nonlinear and n > 0. Then, (5(t) > 1 and
( m
i=l
\
J i=l
m
Proof, (i) Let p i , . . . ,Pm G k[t] be normal and such t h a t gcd(pi,pj) = 1 for
i ^ j , and let p = Oliil^*- ^Y L e m m a 3.4.4 we have
i=\ ) i=\
Hence p is normal if and only if gcd(t — ai,Ht{t) — Dai) = 1 for each i. This is
equivalent tot — ai does not divide Ht{t) — Dai in k[t]^ hence t o Dai ^ Ht{oii)
for all i. D
n n
= c]J{t- aiY'-^ IIgcd{t - ai,nt{t) - Dai) •
3.4 Monomial Extensions 95
Proof, (i) Let p E k[t] be monic and irreducible, and suppose first t h a t p G
S^^^. Let a G khe any root of _p. Then, Da = Ht{a) by Theorem 3.4.3. But a
is algebraic over k^ so Da = 0 by Lemma 3.3.2, hence Ht{a) — 0. Since this
holds for any root of p and p is irreducible, p \lrii. Conversely, let p G k\t\
be a monic irreducible factor of H t , and \<^t a G k be any root of p. Then,
yitipL) = 0. B u t a is algebraic over k so Da = 0 as before, hence Da — Ht{a)
so pG 5^"" by Theorem 3.4.3.
(ii) Let p G k[t] be squarefree. Suppose first t h a t p is normal and let a G k be
any root of p. Then, Da ^ T~it{oi) by Theorem 3.4.2. B u t Da = 0 as before
since a is algebraic over k^ so 7it{a) ^ 0. Since this holds for any root of p,
gcd(p, TYt) = L Conversely, suppose t h a t gcd(p, Ti^) = 1 and \et a Gk be any
root of p. Then 1-Lt(a) ^ 0. But Da = 0, so p is normal by Theorem 3.4.2. D
Proof. Let c £ Const£)(Ä:(t)) and write c = a/b where a^b E k[t], b ^ 0 and
gcd(a, b) = 1. Then,
bDa - aDb
SO bDa = aD6, which implies that a \ Da and b \ Db, hence that a^b £ S.
Suppose now that c / 0, t is nonlinear, and that deg(a) ^ deg(6). Since 1/c G
ConstD(Ä;(t)), we can assume that deg(a) > deg(6). Write then c = p + e/h
where p,e E k\t], deg(p) = deg(a) — deg(6) > 0, and e = 0 or deg(e) < deg(6).
Then,
^ ^ ^ bDe — eDb ^ r . ^,
0 = Dc = Dp+ =Dp^q+- (3.2)
where g, r G k[t]^ {bDe — eDb) = qb'^ + r and either r == 0 or deg(r) < 2deg(6).
Since t is nonlinear, we have 8{t) > 1 and deg(jDp) = deg(p) + 5{t) — 1
by Lemma 3.4.2, so deg(Dp) > ö{t) — 1, which means in particular that
Dp ^ 0. Hence, e ^^^ 0, so deg(6) > 0, which implies that deg(eD6) = deg(e) +
deg(6) + b(t) - 1 by Lemma 3.4.2, so deg(eD6) < 2deg(6) + b(t) - L Either
e G A:, in which case deg(6De) < deg(6), or e ^ A:, in which case deg(6jDe) =
deg(6) + deg(e) + 8(t) - 1 by Lemma 3.4.2, so deg(6De) < 2deg(6) + 8(t) - 1
in both cases. Hence deg(6De — eDb) < 2 deg(6) + 6(t) — 1, which implies that
[ P
p^S ^=> D
\HP)
Proof. Let p G k[t] be nonzero, and write q = p/lc{p). If Dq = 0, then q \ Dq^
so g G vS, which implies that p e Shy Theorem 3.4. L Conversely, suppose that
p E S. Then, q £ S hj Theorem 3.4.1, and write q = YYi=ii^ ~^^T'' where the
3.4 Monomial Extensions 97
a-i's are in the algebraic closure of k and the e^'s are positive integers. Then,
Dai = T~it{o^i) = Dt for each i by Theorem 3.4.3, so
n
D
L e m m a 3.4.7. Suppose that Dt/t E k, and let p G k[t] he nonzero. Then,
^Y^e, — (t-a,r^(t^a,r^
T h e o r e m 3.4.4.
(i) Pi,.^-,Pn^'Si=>JXI;^^PieSi.
(a) p E Si ==4> q G Si for any q £ k[t] which divides p.
(Hi) If E is algebraic over k, then Si^j^^tyj^ C Si^ß^ty^
Definition 3.5.1. Let p E k[t]. We say that p — PsPn ^-^ CL splitting factoriza-
tion of p if PniPs E k\t], Ps E S, and every squarefree factor of pn is normal
A consequence of Theorems 3.4.2 and 3.4.3 is that a splitting factorization
of p over k is also a splitting factorization of p over any algebraic extension
of k, since Da = Ht{a) for all the roots of ps and Da ^ Ht{a) for all
the roots of pn in k. For the same reason, we always have gcd(pn,Ps) = 1
in a splitting factorization of p, and such a factorization is unique up to
multiplication by units in fc, like a prime factorization. It is clear that a prime
factorization of p yields a splitting factorization of p, but it turns out that a
splitting factorization can always be computed by gcd's only, like a squarefree
factorization.
ß)
gcd(p. Dp)
gcd(p, dp/dt)
is the product of all the coprime special irreducible factors of p.
(ii) If p is squarefree, then p = PsPn ^^ CL splitting factorization of p, where
Ps = gcd(p. Dp) and pn = p/ps-
100 3 Differential Fields
Proof, (i) Let p G k[t]^ A^i,... ,7V^ be all its coprime normal irreducible fac-
tors, and ^ i , . . . , 5^ be all its coprime special irreducible factors in k[t]. The
prime factorization of p has then the form p = '^n?=i ^j'^ YllLi ^i\ ^^ by
Lemma 3.4.4 applied to both D and d/dt^ we have
^ _ gcd(p, Dp)
;cd(p, dp/dt)
nu sf nT=i Nr' uu g^d(^j, J^,) nr=i gcd(iv,, pm
uu <'•"' uti ^r' uu gcd{s„ds,/dt) uZi gcd(iv„ dm/dt)
n;=i gcd{s,,dSj/dt) iiT=i gcd{Ni,dNi/dt) •
Each Ni and Sj is irreducible, so gcd(A^i, dNi/dt) = gcd{Sj^dSj/dt) = 1. Each
A^^ is normal with respect to D, so gcd{Ni^DNi) = L Each 6'j is special, so
gcd{Sj^DSj) = Sj. Therefore, S = n ? = i '^j^ which is the product of all the
coprime special irreducible factors of p.
(ii) Suppose that p £ k[t] is squarefree. Then gcd{p^dp/dt) = 1, so, by (i),
Ps = gcd(p, Dp) is the product of all the coprime special irreducible factors of
p. But p is squarefree, so pn = p/Ps has no special irreducible factor, which
impHes by Theorem 3.4.1 that Pn is normal. D
This theorem gives us two algorithms for computing splitting factoriza-
tions: the first is to compute S = gcd{p, Dp)/ gcd{p^ dp/dt) and q = p/S. If
S £ k^ then p has no special irreducible factor, so return pn = p^Ps = 1-
Otherwise deg{q) < deg(p), so recursively compute a splitting factorization
q = qnqs of q and return p^ = q^^p^ = Sqs.
(* Given a derivation D on k[t] and P ^ k[t], return (Pn ,Ps) e k[t]^ such
that p = p-,^Ps, Ps is special, and each squarefree factor of pn is normal. *)
S 4- gcd(p, Dp)/ gcd(p, dp/dt) (* exact division *)
if deg{S) --= 0 t h e n return(p, 1)
iQn,qs) ^ SplitFactor(p/5', D) (* exact division *)
return{qn ,Sqs)
Example 3.5.1. Let k = Q(x) with D = d/dx^ and let t be a monomial over k
satisfying
Dt = - t ^ - — t + — (3.3)
i.e. t represents a transcendental function solution of the above differential
equation. Applying SplitFactor to
3.5 The Canonical Representation 101
we get:
1.
P = PnPs
2x 2V X
which are indeed algebraic functions solutions of (3.3), as expected from The-
orem 3.4.3.
C a n o i i i c a l R e p r e s e n t a t i o n ( / , D) (* Canonical Representation *)
We need to define a few more terms t h a t are often used later. A rational
function over C is called simple if it has only simple affine poles, i.e. poles of
order one only. This is equivalent to having a squarefree denominator. Since
normal polynomials are t h e analogue of squarefree polynomials in monomial
extensions, it is n a t u r a l to call an element of k{t) simple if it has a normal
denominator. Similarly, a usual polynomial can be seen as a rational function
with no affine poles, or a rational function with no denominator. The useful
analogue in monomial extensions is a function with no normal affine poles,
i.e. with poles at most at infinity and at special polynomials. This means a
function whose denominator is special.
D e f i n i t i o n 3 . 5 . 2 . Let f G k{t). We say that f is simple with respect to D
if the denominator of f is normal w.r.t. D. We say that f is reduced with
respect to D if the denominator of f is special w.r.t. D. In addition we write
k{t) for the set of all the reduced elements of k{t).
Obviously, k[t] C k{t). It will be shown in the next chapter t h a t , like k[t], k{t)
is a differential subring of k{t).
There is an application of splitting factorization t h a t will be useful in the
sequel: its use in separating the constant from the nonconstant roots of a poly-
nomial over a differential field. Let K he 8. differential field of characteristic 0,
X an indeterminate over K^ p £ K[X] and suppose t h a t we want to separate
the constant roots ofp from the others. It turns out t h a t this is just a splitting
factorization with respect to the coefficient lifting KD of D on i f [X].
T h e o r e m 3 . 5 . 2 . Let (K^D) be a differential field of characteristic 0, K the
algebraic closure of K and X an indeterminate over K. For any p G K[X] \
{0}^ letp — PsPn be a splitting factorization ofp w.r.t. KJJ. Then, for any root
a of p in K,
( Da = 0 4=> ps{a) = 0 ,
[Da^O 4=4> pn{a)=0.
Exercises
Exercise 3.1 (Logarithmic derivative i d e n t i t y ) . Let R be an integral
domain, D a derivation on Ä, t i i , . . . , u^ G i?* and e i , . . . , e^ € Z be integers.
Show that
~ — = ei 1 h en .
^1 • • • Un Ui Un
^ Dv , u + \J—\ ^ -Du
Dt\ = where t» = -== , jüt2 =
4=1
on jFf(ti,...,tn).
3.5 The Canonical Representation 105
Exercise 3.7. Prove that if At = a/b for a^b £ k[t]^ then bAp £ k[t] for any
p£ k[t].
Exercise 3.8. Prove that all the parts of Theorem 3.4.1 remain true with the
above definition.
Exercise 3.9. Prove the following analogue of Theorem 3.4.2: let k be the
algebraic closure of fc, and p £ k[t] be squarefree. Then,
Exercise 3.10. Prove the following analogue of Theorem 3.4.3: let k be the
algebraic closure of A:, and p £ k[t]\ {0}. Then,
Definition 4.1.1, The order at a is the map z/^ : D --> Z U {+00} given by:
(i) Ua{0) = + 0 0 ,
(a) for X £ D\ {0}, v'aix) = max{n G N such that d^ | x}.
Even though the map Va takes only nonnegative values, we define it as a map
into Z U {+00} in order to extend it eventually to the quotient field of D.
We first show that the set Sa{x) = {n G N such that a'^ | x} is finite and
nonempty for x G i^ \ {0}. Since a ^ 0 and a is not a unit in D, let p G D
be an irreducible factor of a. Then there is an irreducible factorization of x
in which p appears with some exponent e > 0. Let n > e and suppose that
108 4 The Order Function
SO it holds for m + 1. Thus (ii) holds for all m > 0. For m < 0 we have
0 = Ua{l) = Z / a ( x ^ X ~ ^ ) = Uaix"^) - mUa{x), SO Z/a(x^) = miya{x). T h u S (ii)
holds for all m G Z.
110 4 The Order Function
4.2 Localizations
Definition 4.2.1. We define the localization at a to be
Oa = f^ {x e F such that Up{x) > 0}
p\a
L e m m a 4.2.1.
(i) Oa is a subring of F containing D.
(ii) xeOa=^ iya{x) > 0.
(Hi) X € aOa <=^ ^a(^) ^ 1; where aOa is the ideal generated by a in Oa-
(iv) If a is irreducible, then x ^ Oa <==r- z^a(^) ^ 0.
(v) If a is irreducible, then xa~^"'^^^ G Oa for any x E F*.
(vi) If A is any derivation on D, then AOa ^ ^a-
factor of a. Then, z/p(x) = i^p{b) — Jyp{c) > 0 since x G Oa^ so i^p{c) = 0, which
imphes that
Since this holds for any irreducible factor of a, we get Ax G Oa, hence AOa C
a. •
Example 4.2.1. In D = Z,
so 1/3 ^ Oß although 1/^(1/3) = 0, which shows that parts (iv) and (v) of the
above lemma do not always hold if a is not irreducible. This makes it worth
noticing that both directions of part (iii) of the lemma hold for non-irreducible
a's.
In order to show that TT^ is well-defined, we need to show that such d and e
always exist, and that the value of na{x) is independent of the choice of 6, c, d
and e. First, a 7^ 0 since I ^ (0), and a ^ D* since I y^ D^ so Oa is defined. Let
X G Oa and write x = b/c where b^c G D have no common factor. Let p be any
irreducible factor of a. Since x G (9a we have Vp{x) — i^p{b)—iyp{c) > 0. But at
least one of Up{b) and ^'p(c) must be 0 since b and c have no common factor, so
z/p(c) = 0, which implies that p / c . Since this holds for any irreducible factor
p of a, we have gcd(a,c) = 1, so there are d^e G D such that cd -\- ae = 1.
Suppose now that cd ^ ae = cf + ag = 1 for some ^, e, / , ^r G D. Then,
a{g — e) = c{d ~ / ) . Let p be any irreducible factor of a. We then have
z/p(c) -h Up{d - f) = i^pic {d- f)) = Up{a {g - e)) = Up{a) + yp{g - e) > Vp{a).
But i^pic) = 0 as previously, so Vp{d~ f) > Vp{a)., which implies that any irre-
ducible p G D that appears in the factorization of a with a positive exponent n
must appear with an exponent ?n > n in the factorization of (i — / , hence that
a I d — / , i.e. d — f G I, so 7ri{d — f) = 0. Since TT/ is a ring-homomorphism,
4.2 Localizations 113
we get 7rj{bd) = nj{bf) so the value of 7Ta{x) does not depend on the choice
of d and e. Suppose finally t h a t x = b/c = yjd where b^c^b'^d G D and
gcd(6, c) — gcd(6', d) = 1. As previously, this implies t h a t V = ub and d = uc
for some u £ D"". Let (i, e G D be such t h a t C(i + ae = 1. Then, c'(i^ -\- ae = 1
for d' = ti~-^(i E D , and we have b'd' = ubu~^d = bd, so the value of 7ra(x)
does not depend on the choice of b and c, so rca is well-defined on Oa-
We next show t h a t TTa is an extension of TTJ to Oa which induces an iso-
morphism between Oa/aOa and D / I , z.e. t h a t we have the following diagram:
Oa/aOa
Proof, (i) Let b E D and write b = b/c with c = 1. Then C(i + ae = 1 for d = 1
and e = 0, so 7Ta{b) = TTi{bd) = TTj{b).
(ii) Let X G Oa and write x = b/c where b^c e D have no common factor.
Let d,e E D he such t h a t cd ^ ae = 1. Suppose first t h a t x G aOa- Then,
^a{x) = z^a(^) — ^a(c) > 0 by L e m m a 4.2.1, so z^a(^) > ^a(c) > 0, so a | 6,
hence b e i , which implies t h a t bd G / , therefore t h a t 7ra{x) = ixi{bd) = 0.
Conversely, suppose t h a t TTa{x) = 0. Then iTi{bd) = 0, so bd G / , which
implies t h a t a \ bd. But gcd(a, c?) = 1 since cd + ae = 1, hence a | 6, so
Uai^) > 0. Also, gcd(a,c) = 1 since cd -{- ae = 1, so a / c , so Ua{c) — 0, hence
Va{x) ~ Va{b) — ^a[d) > 0, SO X G aOa by Lemma 4.2.1.
(iii) Since TT/ is surjective and TTQ is an extension of TTJ by (i), it follows t h a t TT^
is surjective. Another consequence of (i) is 7ra(l) = '7^/(1) = 1- Let x , x ' G Oa
and write x = b/c,x' = V/d where b^c^b'^d G D, b and c have no common
factor, and V and d have no common factor. Write also xx' = b"/d' where
V,d' G D have no common factor. Then, bb' = gb" and cd = gd' for some
g e D. Let d,e,d\e^ £ D he such t h a t cd + ae = 1 and dd' + ad = 1.
Multiplying those two equalities together, we get cddd' -\- ah = 1 where h =
114 4 The Order Function
c'd'e + cde' + aee' G D. Hence, c"{gdd') + a/i = 1, so, using the fact that TTJ
is a ring-homomorphism:
From 6 = ex also follows Zl6 = eZlx + xZic, and applying TTa, we get
Definition 4.3.1. The order at 00 is the map Z/QO • D{x) —> Z U {+CXD} given
hy z^oo(O) = +00, and Uoo{h/c) = deg(c) - deg(6) for h,ce D[x] \ {0}.
Since Z/QO satisfies properties similar to Ua, it is natural to define the notions
of the localization and value m a p at infinity in a manner similar to what was
done in the previous section at a point.
D e f i n i t i o n 4 . 3 . 2 . We define the localization at oo to be
Intuitively, Ooo, which is a local ring, is the set of all the rational functions in
D{x) for which the degree of the denominator is at least t h a t of the numerator,
i.e. which have no pole at infinity. As expected, Ooo satisfies properties similar
to Oa for an irreducible a G D[x].
L e m m a 4.3.1.
(i) Ooo ^5 a subring of D{x).
(n)
fex-^Ooo ^=^ z^oo(/)>l
where X~^OOQ is the ideal generated by x~^ in Ooo-
(iii) fx""^^^^ e Ooo for any f G D{xy.
Proof (i) Let f^g G Ooo, and write g = b/c for 6,c G D[x]. Then i^ooif) ^ 0
and TJooig) > 0, so deg(6) < deg(c). But d e g ( - 6 ) = deg(6), so Uoo{-~g) =
^oo[--b/c) > 0, so z^cx)(/ — Ö') > 0 and i^ooUd) ^ 0 by Theorem 4.3.1. Hence,
f — g G Ooo and fg G Ooo- In addition, 0 G Ooo since z/oo(0) = + o o , and
1 G Ooo since z/oo(l) = 0, so Ooo is a subring of D{x).
(ii) Let / G x"^Ooo, then / = g/x for some g G Ooo, so z^oo(/) = ^oo{g) -
i^oo(^) = ^oo{g) 4- 1 > 1. Conversely, let / G D{x) be such t h a t i^oo(/) ^ 1,
and let g = fx. If / = 0, then x / = 0 G Ooo, so / G x~-^Ooo. Otherwise,
/ / 0 so ö' ^ 0 and we have Vooi^g) = i^oo{f) + ^^00(2:) = i^ooU) - 1 ^ 0^ which
implies t h a t g G Ooo, hence t h a t / = g/x G x^-^Ooo-
(iii) Let / G D{xY. Then, v^o {fx^-^f^) = z/oo(/) - ^oo(/) = 0, so fx^-^f^ G
Ooo. •
D e f i n i t i o n 4 . 3 . 3 . Let F be the quotient field of D. We define the value at 00
to be the map TTOO ' Ooo —^ F given by:
ric(6)/lc(c), i/z/oo(/)-0,
TTooif)
1 0, i/z/oo(/)>0.
where b^c E D[x] and f == b/c.
T h e o r e m 4.3.2.
,. , Icibd) lcib)lc{d)
"-(^^) = H ^ ) = W ) W ) ^ -oo(/)7roo(5) .
Suppose t h a t Voo{f) > 0 and I'ooig) > 0- Then, i^ooif + fi') > 0 by Theo-
rem 4.3.1, so 7roo(/ + fi^) = 0 == TTooif) + ^00(0^) since 7roo(/) = TToo{g) = 0.
We can now assume without loss of generality t h a t Uooif) — 0, i.e. t h a t
deg(6) = deg(c). Suppose first t h a t Voo{g) > 0- Then, deg{d) < deg(e), so
deg{cd) < deg(6e), so deg(6e + cd) = deg(6e) = deg(ce) and lc(6e + cd) =
lc{be) = lc(6)lc(e). We also have i^ooif -^ g) = z/oo((^e + cd)/ce) = 0, so
._ , IcjbMe) lc{b)
We define the residue at p to be the map residue^ : IZp —> K[t]/{p) given by
p
residuep(/) =^'Kp{f — ) .
residuep(/)=7r,(/-^) = ^ ^ = c .
l-2t
residuet2_i(/) = 7rt2__i
2t / 2
while
residue,_i(/) = 7r,_i ( ^ j = - 1 = 7r,_, ( 1 ^
and
residuet+i(/) = TTt+i f ^ — j ] = 2 "" ^*+i
n,{p'-^^^f^Df) = Mf)n,{p-^'^^f^f)ix,{Dp).
(ii) peS^iyp{Df)>iyp{f).
(Hi) p£Si and Up{f) / 0 = ^ T^p{Df) = Vpif).
Proof. Let p E K\t] be irreducible, / G K{t) \ {0} and n = ^p{f)- Let 5' =
fp""^. By Lemma 4.2.1, ^ e Op. Also,
Write ^ = b/c where b.,c £ K\t] and gcd(6,c) = 1. We have i'p{g) = ^pif) +
i^p{p~^) = n — n = 0, so i/p(6) — z/p(c) = 0. But at most one of iyp{b) and iyp{c)
can be nonzero since gcd(6, c) = 1, so iyp{b) = z^p(c) = 0. We have
cDb - bDc
Dg = 2
so yp{Dg) = Up{bDc — cDb) — 2z/p(c) = i/p{bDc — cDb) > 0 since bDc — cDb £
K[t]. By Lemma 4.2.1, this implies that Dg G Op. Suppose that n = 0.
Then f = g^ so Df = Dg e Op, so VpiDf) = yp{Dg) > 0. This implies
that Vp{pDf) > 0, hence that TTp{pDf) = 0 by Theorem 4.2.1. This is valid
regardless of whether p is normal or special, so (i) and (ii) hold when n = 0.
Suppose now that n ^ 0.
(i) p is normal, so gcd(p, Dp) = 1, so Up{Dp) — 0. This implies that Dp G Op
and
iyp{ngp^~^ Dp) = yp{g) + n - l = n ~ l < n < Up{p'^Dg)
so from (4.4) and Theorem 4.1.1 we get i/p{Df) = n ~ 1. We then have
pi-njjf ^ Q^ |3y Lemma 4.2.1, and from (4.4) we get iXp{p^~'^Df) =
7Tp{ngDp -\- pDg). Since g^Dp^p and Dg are all in Op and Tip is a ring-
homomorphism, we have
4.4 Residues and the Rothstein-Trager Resultant 121
since TTp{p) = 0.
(ii) p ^ S so p\ Dp^ which means t h a t Up{Dp) > 1. Hence, Up{ngp^~^Dp) > n.
Since Vp{p'^Dg) = n + Vp{Dg) > n, from (4.4) and Theorem 4.1.1 we get
Up{Df) > n.
(iii) Let p E Si, and suppose t h a t n ^ 0. Assume first t h a t p = t — a for
a £ K. Then, Pa{(^) is not a logarithmic derivative of a i<"-radical, where
Pa = {Dt — Da)/{t — a ) = Dp/p. Let h = Dg + npo,g. Since p\Dp, Pa G K[t],
hence pa G Op. In addition, g G Op and D ^ G Op as seen above, so /i G Op.
Since TTp is a ring-homomorphism, we have
C o r o l l a r y 4 . 4 . 1 . Let f G K{t).
(i) f simple w.r.t D =4> i^p{f) > —1 for any normal irreducible p G i f [t].
(ii) f G K{t) <==^ ^p{f) ^ 0 foT' any normal irreducible p G i f [t].
(iii) Kit) is a differential subring of K{t).
122 4 The Order Function
Proof. Let / G K{t) and write / = a/b with a^b ^ K[t]^ gcd(a,6) = 1, and
b ^ 0. Let p ^ K[t] be normal irreducible.
(i) If / is simple, then b is normal hence squarefree. If p | 6, then p / a, so
^p(/) =^ ~^p{^) — ~~1 since b is squarefree.
(ii) If / G K{t)^ then 6 G tS, so p | 6, which implies that i^pif) = J^p{a) > 0.
Conversely, suppose that i^qif) > 0 for any normal irreducible q G K[t]^ and let
p G ür[t] be a normal irreducible factor of b. Then, p Ya^ so i^pif) = —Vp{b) < 0
in contradiction with our hypothesis. Hence, all the irreducible factors of b are
special, so ö G tS by Theorem 3.4.1, which implies that / G K{t).
(iii) K{t) is not empty since K[t] C K{t). Let f,g£ K{t) and p G iir[t] be
normal irreducible. Then, i/p(/) > 0 and iyp{g) > 0 by part (ii). We have
^p{-9) = J^pid) by Lemma 4.1.2, so Up{f - g) > mm{up{f),Up{-g)) > 0.
Hence, f — g E K{t) by part (ii). In addition, i'p{fg) — ^p{f) + ^p(ö') ^ 0, so
fg G K{t), hence K(t) is a subring of K(t). If z/p(/) = 0, then jyp{Df) > 0
by Theorem 4.4.2. Otherwise, z/p(/) > 0, so i^piDf) = i/p(/) - 1 > 0 by
Theorem 4.4.2. Thus Df G K{t) in any case, so K{t) is a differential subring
ofK{t). D
Corollary 4.4.2. Let / G K(t) \ {0} and p G Ä'[t] 5e irreducible. Then,
(i) yp{Df/f)>-l.
(ii) Up{Df/f) = —1 4=4> z^p(/) 7^ 0 and p is normal.
(iii) If p is normal, then yp{Df) ^ —1 and residuep(D///) = i'p{f)-
residuep(^) = % ( ^ ^ ) = ^ p ( f r ^ )
_ 7rp(pi-"Z?/) _ n7rp(p-"/)7rp(I?p) __
TTpip-^f)Trp{Dp) Trp{p-^f)TTpiDp)
4.4 Residues and the Rothstein-Trager Resultant 123
residue,(|)=7r,^|^j=.r,(/.+ ^ )
Lemmia 4.4.3. Let q G K\t\ be normal irreducible and f G K{t) be such that
z/g(/) = —1. Write f = p + a/d where p^a^d G K[t], d ^^ 0, deg(a) < deg{d)
and gcd(a, d) = 1. Then, for any a G K,
so
(Hi) If t is nonlinear and Uooif) = 0; then the strict inequality holds in (i),
i.e. VoQ^Df) > 1 — S{t), and
Suppose finally that deg(a) ^ 0 and deg(d) ^ 0. Then, by Lemma 3.4.2, the
leading term of dDa — aDd is
lc(cf)deg(a)lc(a)A(t)t'*'=s(a)+deg(d)+m
-lc(a)deg(d)lc(c^)A(t)t^^s(o)+deg(d)+m
= -J/oo(/)lc(a)lc(d)A(i)t^''s(a)+deg(d)+m _ ^4 g^
Exercises
where p,a,d G k\t\^ deg(p) < max(l, (5(t)), d / 0, deg(a) < deg((i),
gcd(a,d) = 1, and d is normal. Furthermore, all the roots in fc of r =
resultantt(a — zDd, d) are integers.
b) Show that if / is the logarithmic derivative of a fc(t)-radical, then / is
simple and can be written as
where p^a^d G fc[t], deg(p) < max(l, (5(t)), d y>^ 0^ deg(a) < deg{d),
gcd{a,d) = 1, and d is normal. Furthermore, all the roots in Ä: of r =
resultantt(a — zDd^ d) are rational numbers.
n-l
i=0
for any n G N.
c) Let n G N and ao, a i , . . . , a^ G Ä:(t) be such that n > 0 and a^ ^ 0. Let
/i = maxo<i<n(^ - ^p(ö^z)),
i-l
P{z)= Yl ^p{p-'''^'''\Dpyai)l[{z-j) ek[t]/{p)[z]
0<i<n ^""^
i-Vp{ai)=fj,
or Pii^pif)) = R[Mf)) = 0.
Exercise 4.4. As in Exercises 3.7-3.11, let (k^D) be a differential field of
characteristic 0 and {k{t)^Ä) be a differential extension of (k^D) where t is
transcendental over k and At = a/h with a^b G k[t] such that 5 7^ 0 and
gcd(a,6) == 1. Let p e k[t] be irreducible and normal {i.e. gcd{p^bAp) = 1).
Show that for any / £ k{t) \ {0},
and
Dq = maf^-^ + Ds
so deg{Dq) < m since deg(Ds) < m by Lemma 3.4.2.
Suppose first that Db ^ 0. Then, deg(Dp) = n since deg(Dr) < n by
Lemma 3.4.2, so deg(gDp) = m -]- n and deg{pDq) < m + n, which implies
that deg{qDp — pDq) = m -\- n^ hence that
e^Ei(x) , Ei(x)2 ^
/ —™-A^ dx = — V^ e k
so e^Ei{x)/x has an elementary integral over k even though its integral is not
an elementary function. The two notions coincide only when k itself is a field
of elementary functions.
134 5 Integration of Transcendental Functions
Remark that the elementary functions of Definition 5.1.4 include all the
usual elementary functions of analysis, since the trigonometric functions
and their inverses can be rewritten in terms of complex exponential and
logarithms by the usual formulas derived from Euler's formula e-^^^^ =
cos(/) + s i n ( / ) \ / ^ . Those transformations have the computational incon-
venience that they introduce \/--T, and it turns out that they can be avoided
when integrating real trigonometric functions (Sections 5.8 and 5.10).
/ -T—-dx = ti+t2eQ{x,ti,t2)
J X"^ -\- X
so ^3 is not a Liouvillian monomial over Q(x,ti,t2), and K is isomorphic
as a differential field to Q(c)(a:, ti,^2) where c = ^3 — ti — t2 G Const(ür).
^ A simpler version of the integration algorithm can be used for those verifications,
see Sect. 5.12
5.2 Outline and Scope of the Integration Algorithm 135
which has the rational solution ri = r2 = \. This implies that Dt^, is the
derivative of an element of K and that c = t^ — ti — t2 £ Const (if).
1 / 1
Dx = l, Dti = 2ti, Dt2 = - and Dts = { 1 +—
X \ 2x
/0+i)''"=^°s^"*^)
so 1 + 1/(2J:) is the logarithmic derivative of a Q(a:,ti,t2)~radical, so t^
is not a Liouvillian monomial over Q(x,ti,t2), and K is isomorphic as a
differential field to Q (x, ti, ^2, y/xti).
® Alternatively, applying the Risch structure Theorem (Corollary 9.3.1), we
find that the linear equation (9.9) for 6 = x + ^2/2 becomes
X 2x
which has the rational solution ri = r2 = 1/2. This implies that Dts/ts
is the logarithmic derivative of a if-radical, and that c = t1l{xti) G
Const(K).
/em
No elementary
integral
No elementary
integral
fek
= buUv -f cf.
a (1 — m)bDv (1 — m)c
y^yrn ym y^ym—1
SO, adding and subtracting Db/v^~^ to the right hand side, we get
/ Db (m-l)bDv\ (l-m)c~uDb ^
5.3 The Hermite Reduction 139
f = fp + fs -^ fn = fp -i- fs + Dgo + w
= fp + fs + Dgo + Wp + Dgi -^h^ri = Dg + h^r
Example 5.3.1. Let k = Q{x) with D = d/dx^ and let t be a monomial over k
satisfying Dt = 1 +t^ ^ i.e. t = tan (a:), and consider
X — tan(x) X—t
Since / has no polynomial part and t is normal in /c[t], the canonical repre-
sentation of / is (/p, /s, /n) = (0,0, / ) so we get a = x — t and d = t'^ = d2
where ^2 = t. We then have:
i V uj h c a
2 t 1 1 —x xt + 1 —xt
and a/uv = —xt/t = —x, so the Hermite reduction returns (—x/t,0,—x),
which means that
X — taii(x) X f
aa: = -—• — x ax
tan(x)^ tan(a:) j
and the remaining integrand is in k{t).
The Hermite reduction can also be iterated, yielding a decomposition of /
into a sum of higher-order derivatives of reduced and simple elements of k{t)
(Exercise 5.3).
(n - 6{t) + l)A(t)
go = ct^""^^*^"^"-^, and ro = p — Dqo. Since t is nonlinear and deg(go) > 0,
Lemma 3.4.2 implies that deg(jDgo) = deg(go) + <^(0 — 1 = n, and that the
leading coefficient of Dqo is {n~6{t)-\-l) cX{t) = lc{p). Hence, deg(ro) < n, so
by induction we can find gi, r G k[t] such that ro = Dgi + r and deg(r) < 5{t).
Therefore,
p = Dqo + ro = Dqo + Dqi + r = Dq + r
where q = qo + qi G k[t]. D
5.4 The Polynomial Reduction 141
Example 5.4-1- Let k = Q(x) with D = d/dx^ and let t be a monomial over k
satisfying D t = 1 + 1 ^ , i e . t = t a n ( x ) , and consider
f = Dv + f]c,^. (5.3)
where the g^'s are in K[t], monic, irreducible and coprime. Write
3- Ti *•
and suppose that one of the g^-'s, say g/^, is normal. We have i^qj^iqk) = 1
and z/q;,(gj) = 0 for j / /c, so i^q^idkDqk/qk) = - 1 and Uq^{djDqj/qj) = 0
by Corollary 4.4.2. This implies that T^qk(^j^k^3-^^31^3) — ^' hence that
Vq^ (h) = —1. But qk is normal and Dv G K{t)^ hence z/g^ {Dv) > 0, so z/^^ (/) =
— 1, in contradiction with f G K. Hence all the gj's in equation (5.5) are
special.
Case la: t is a logarithm over K. Then, Dt = Da/a for some a G K* ^ and every
irreducible p e K[t] is normal by Theorem 5.1.1, so N = 0 in equation (5.5)
and v^ Dv G K[t]. From (5.5) we get Dv = f — g G K. By Lemma 5.1.2, this
implies that 01 v = ct-^b where b^c G K and Dc — 0 (otherwise deg(Z}f) > 1).
Hence,
144 5 Integration of Transcendental Functions
^, Da v^ Dwi
a ^-^ w
i=l
which is of the form (5.3).
Case lb: t is an exponential over K. Then, Dt/t = Da for some a G K, and
the only special monic irreducible p £ K[t] is p = t hj Theorem 5.1.2, so
iV = 1 in equation (5.5) and qi = t (with di possibly 0). Hence, diDqi/qi =
diDt/t = diDa^ so f = Dw + g where w = v -\- dia E K{t). Suppose that
Vt{w) < 0, then Vt{Dw) — Ut{w) < 0 by Theorem 4.4.2 since t G S^^^, so
^t(/) < 0 in contradiction with f £ K. Hence, i^ti^) > 0 so w £ K[t]. By
Lemma 5.1.2, Voo{Dw) = Uoo{w)^ so deg{Dw) = deg(tL'), which implies that
deg{w) = 0 since / = Dw -{- g £ K. Hence w e K and
^-^ Wi
Trif)=Tr{Dv + yci^)=Tr{Dv)+yciTr{ — )
Uj
=1
5.5 Liouville's Theorem 145
1=1
where
p(6i,...,6^) ri(öi,...,ö^) pi(6i,...,5^)
g(6i,..., 6^) 5^(61, ...,bm) qi{oi, ..•,bm)
Since p,q,pi,qi G K [ X i , . . . , X ^ ] and ri,5i G C [ X i , . . . , X ^ ] , we get w e K,
wi^... ,Wn E K* and d i , . . . , d^ ^ C', which proves the theorem. D
We can finally remove all the constant restrictions in Liouville's Theorem,
showing that for arbitrary constant subfields, v in (5.3) can be taken in K\
and the Ui^s can be taken in K{ci^..., Cn).
T h e o r e m 5.5.3 (Liouville's T h e o r e m — Strong version). Let K be a
differential field, C = Const(K), and f e K. If there exist an elementary
extension E of K and g £ E such that Dg = f, then there are v £ K,
C i , . . . , Cyi G C^ and U i , . . . , w^ £ i ^ ( c i , . . . , c„)* such that
f = Dvi-} Ci .
1=1
146 5 Integration of Transcendental Functions
j=l j = l i=l ^
so
j = l 1=1 -*
• 1 • 1 ^ Ü
^ ^ - ATK
hence
m n T j-^
3 = li=l ^ ^'^
then
n
residuep(/) = ^Cijyp{ui)
i=l
for any normal irreducible p G Ek[t].
Proof Let / G k{t) be simple, and suppose that there are h G k{t), an alge-
braic extension E of Const(/c), v G k{t)^ c i , . . . , c„ G £ , and ui^.,. ,Un G Ek{t)
such that
^-^ Ui
i=\ *
Note that / + /i is simple since h G ^(t). Let p G Ek^ be normal and
irreducible. Then, for each i, Vpi^Dui/ui) > —1 and Tesid\iep{Dui/ui) = Pp{ui)
by Corollary 4.4.2. Suppose that iyp{v) < 0. Then Vp{Dv) = Vp{v) — 1 < — 1
by Theorem 4.4.2, which implies that I'pif + h) < —1 in contradiction with
f -{- h being simple. Hence i'p{v) > 0, so Vp{Dv) > 0, which implies that
residuep(D'L') = 0. Furthermore, Vp{h) > 0, so residuep(/i) = 0. Since residucp
is E'^-linear, we get
D
148 5 Integration of Transcendental Functions
Proof. Let C = Const (A:), and suppose C is algebraically closed and that f-\-h
has an elementary integral over k{t) where / G k{t) is simple and h G k{t).
By Theorem 5.5.1, there are v^ui^... ^Un G k and c i , . . . , c ^ G C such that
/2t — 2\
residuet2+i(/) = 7rt2+i f —^ j = t+1
which is not a constant. This shows that the hypothesis that the constant
field of k be algebraically closed is required in Lemma 5.6.2. If we replace Q
by C, then t^ + 1 = (t - ^^.){t + \ / ^ ) ,
and
( 2t ~ 2 \
which are constants. This shows that the hypothesis that p be irreducible is
also required in Lemmas 5.6.1 and 5.6.2.
5.6 The Residue Criterion 149
where go, = gcd(a —aDd, d) E k{a)[t] and the sum is taken over all the distinct
roots ofrg. Then,
(i) g G k{t), the denominator of g divides d, and f — g is simple.
(a) If there exists h G k{t) such that f + h has an elementary integral over
k{t), then r^ E k and f — g £ k[t].
(Hi) If there are h G k{t), an algebraic extension E of Coiist{k), v G k{t),
ci,...,Cn E E, and ui^... ,Un G Ek{t) such that
n j^
\-^ Dga
E
i=lri{a)=0 ^"^
For each i, let ki be k{t) extended by all the roots of r^, and a^ be a given
root of ri. Since ki is a finitely generated algebraic extension of A:(t), the field
automorphisms of ki over k{t) commute with D by Theorem 3.2.4, so we get
Dga,
j:Tr. ai
9ai
by Theorem 3.2.4 where Tri is the trace map from k{t){ai) to k{t). Hence,
g G k{t). Furthermore, since g^ \ d for each root a of rg, lcmj.^(^ct)=o{9a) \ d^ so
the denominator of g also divides d. Hence the denominator oi f — g divides
(i, which implies that f ~ g is simple since d is normal.
(ii) Suppose that f + h has an elementary integral over k{t) for some h G k{t),
and let k be the algebraic closure of k. By Corollary 3.4.1, t is a monomial over
/c, and simple (resp. reduced) elements of k{t) remain simple (resp. reduced)
when viewed as elements of k{t). Furthermore f + h has an elementary integral
over k{t), so we work with k{t) in the rest of this proof. Let a G A: be any
150 5 Integration of Transcendental Functions
/ + /i = i)t; + y c , i l ^ . (5.9)
i=l *
Note that since the roots of r^ are all constants by Theorem 3.5.2, g as
given by (5.8) always has an elementary integral, namely
g= y^ alog{gcd{d^ a — aDd))
rs{a)=0
r 21og(x)^ — log(x) — x^
log(x)^ — x'^\og{x)
dx.
d = t^ -- xH, p = 0, a = 2t^ - t - x ^
and
and
Tn = — = - 4 x ( x ^ - 1)(2; - x) ^ k.
where a^ — 1/4 = 0, so
a\a^-l/4=0
Computing / — Dg we find
r log(a:)"^ — x^ log(x) 2
log(x)+
-X
l o g ( x ) —xy
log(x) + X
X
21og(x)^ — log(x) — x^dx = •- 1log / l o g ( x ) + x \ + f
\ log(x)
dx
J log(x)
= ^°Hg§F^J+^'^"^
where Li(x) is the logarithmic integral, which has been proven to be nonele-
mentary since r^ ^ k.
into several summands, each indexed by the roots of qi. We can also avoid com-
puting pp^(jR^), ensuring instead t h a t its leading coefficient is coprime with
the corresponding qi. And since multiplying any ga in (5.8) by an arbitrary
nonzero element of k{a) does not change the conclusion of Theorem 5.6.1,
we can make p p ^ ( Ä ^ ) ( a , t ) monic in order to simplify the answer. This last
step requires inverting an element of k[a] and is optional. As in t h e rational
function case, it turns out t h a t the leading coefficients of t h e pp^(jR^)(a, t)'s
are always invertible in k[a] (Exercise 2.7).
R e s i d u e R e d u c e ( / , D)
(* Lazard-Rioboo-Rothstein-Trager resultant reduction *)
i Ri
0 t^ - xH
1 (2 - 3z/x)t'^ + {2xz - l)t + x{z - x)
2 (4x2- - 6)z2 4- 3xz - 2^2 + l)t + x{z - x)(2xz --1)
3 4x^(1 — x^) {z? - xz^ - lz + jx)
Since
21og(x)2-log(x)-x2 ^ 1 f(2x^-3x-\-l)(log(x)+x)
ax = - lor
/ log(x)"^ — x'^ log(2^) 2 \ (2x^ + 3x + l)(log(a:) — x)
1 __ 6x^-3 \
"^ ' ,log(x) 4x4-5x2 + ly
where the remaining integral has been proven to be nonelementary. In fact, it
is the integral of a rational function plus the logarithmic integral Li(x).
If we had decided to make Si{a^t) monic, we would have obtained
5 i ( a , x ) = - - ( 2 x 2 - 6 a x + l)(t + 2ax)
Prom the results of the previous sections, we are left with the problem of
integrating reduced elements of a monomial extension. We use a specialized
version of Liouville's Theorem for such elements.
5.7 Integration of Reduced Functions 155
where the g^'s are in /c(ci,... ,Cn)[t], monic, irreducible and coprime. Each Wi
is special since it is in A:(ci,... ,Cn). Suppose that qs is normal for some s,
Then, Lemma 5.6.1 applied to (5.10) implies that
n n
residucg^ (/) = ^ CiVq,, {wi) + ^ djVq^ (qj).
i=i j=i
"" Till-
f = Dv + V c , ^ , (5.11)
has degree at most S{t) — 2 for any q e S \k, so in the case of nonlinear
monomials, we are left with reduced integrands with polynomial p a r t s of de-
gree at most 6{t) — 2, provided t h a t we know at least one nontrivial special
polynomial. If we know t h a t there are no nontrivial special polynomials, then
integrating reduced elements of such nonlinear extensions is in fact easier, and
an algorithm for t h a t purpose will be presented in Sect. 5.11.
We have now all the necessary tools to complete the integration algorithm.
In the following sections, we give algorithms t h a t , given an integrand / in k{t)
for a monomial t, either prove t h a t / has no elementary integral over ^ ( t ) , or
compute an elementary extension E of k{t) and an element g e E such t h a t
/ — Dg G k. This process eliminates t from the integrand, t h u s reducing the
problem to integrating an element of k, which can be done recursively, i.e. the
algorithms of this chapter can be applied to elements of k until we are left
5.8 The Primitive Case 157
with constants to integrate. Note that when t itself is not elementary over
fc, then the problems of deciding whether an element of k has an elementary
integral over k or over k{t) are fundamentally different, so our algorithms will
produce proofs of nonintegrability only if the integrand is itself an elementary
function. They can be applied however to much larger classes of functions.
It turns out that it will also be necessary to assume that some related
problems are solvable for elements of k. Those problems depend on the kind
of monomial we are dealing with, so we need to handle the various cases
separately at this point. Algorithms for all those related problems will be
presented in later chapters.
a = Dh-\-{m^l)cDt. (5.13)
Since we can solve the problem of limited integration w.r.t. Dt for elements of k
and a £ k^we can either prove t h a t (5.13) has no solution b e k^cE Const(Ä:),
or find such a solution. If it has no solution, t h e n (5.12) has no solution
so p has no elementary integral over k{t). If we have a solution 6, c, letting
go = ct^+^ +6t"^, we get
hence deg(p — Dqo) < m. By induction we can either prove t h a t p — Dqo has
no elementary integral over k{t)^ in which case p has no elementary integral
over k{t)^ or we get qi G k\t] such t h a t p — Dqo — Dqi Gfc,which implies t h a t
p — Dq E k where g = go + ^i • D
IntegratePriniitivePolynoiiiial(p, D)
(* Integration of polynomials in a primitive extension *)
(^) ß) ^~ I n t e g r a t e P r i n i i t i v e P o l y n o m i a l ( p — Dqo, D)
return(g4-go,/ö)
/ iog(x)y log(x)/
where Li(x) = J d x / l o g ( x ) is the logarithmic integral. Let k = Q(x,to) with
D = d/dx^ where to is a monomial over Q(x) satisfying DIQ = 1/x^ i.e. to =
5.8 The Primitive Case 159
We get
1. a = lc(p) = t o + l/to
2.
to + 7- ) - — = to = log(x) = —- (xlog(x) -x) = D{xto - x)
^ iQ J ZQ ax
so (6, c) = LimitedIntegrate(to 4- 1/to, 1/to, D) = {xto — x, 1)
3. qo = ct'^/2 + bt = t^/2 + (xto - x)t
4. p — Dqo = —X E k so the call IntegratePFiinitivePoIynoniial(—x, D)
returns (g,/3) = (0,1).
Hence,
Lifx) X
- - ^ + (Xlog(x) - x)Li(x) - y .
Putting all the pieces together, we get an algorithm for integrating ele-
ments of k{t).
T h e o r e m 5.8.2. Let k be a differential field and t a primitive over k. If the
problem, of limited integration w.r.t. Dt is decidable for elements ofk, and Dt
is not the derivative of an element of k, then for any f G k{t) we can either
prove that f has no elementary integral over k(t), or compute an elementary
extension E of k{t) and g E. E such that f — Dg G k.
Proof Suppose that Dt is not the derivative of an element of /c, then t is a
monomial over k and Const{k{t)) = Const(/c) by Theorem 5.1.1. Let / € k{t).
By Theorem 5.3.1, we can compute gi^h^r G k{t) such that / = Dgi-{-h~\-r^ h
is simple and r is reduced. From /i, which is simple, we compute ^2 ^ k{t) given
by (5.8) in Theorem 5.6.1. Note that go =^ gi -i- J g2 lies in some elementary
extension of k{t). Let p = h — g2 and q = p + r, then / = Dgo -\- q so f has an
elementary integral over k{t) if and only if q has one. If p ^ k[t]^ then p -\- r
does not have an elementary integral over k{t) by Theorem 5.6.1, so / does
not have an elementary integral over k{t). Suppose now that p G k[t]. We
have k{t) = k[t] by (5.1), so r G k[t]^ hence q G k[t]. By Theorem 5.8.1 we can
either prove that q has no elementary integral over A:(t), in which case / has
no elementary integral over k{t)^ or compute s G k[t] such that q — Ds G fc,
in which case / — Dg G k where g = go -{- s. D
160 5 Integration of Transcendental Functions
Dy + fy = g (5.14)
so a = Du/u. D
M O M . Dt \ . ^ .
p-Dqo = Y1^'^' '^Yl^^'^' ~Y1 {Dvi + i—Vijt' = Y2aif = pi.
i=l i=m i=l ^ "^ i=m
Since we can solve Risch differential equations over k and ai^Dt/t G A:, we
can either prove that (5.17) has no solution Vi G k, or find such a solution. If
it has no solution for some i, then (5.15) has no solution, so pi and p have no
elementary integrals over k{t). If we have solutions Vi foi m < i < ~1^ letting
qi = v_it~^ + ... v^rnt""^ and g = go + gi ^ k{t), we get
~^ ~^ ( Dt \
p - Dq = p^ - Dq^ = ^ a^f + ao - ^ f Dvi + i-—Vi j f = ao e k .
Although this fact is not needed by the algorithm, we remark that Lemma 5.9.1
implies that (5.16) has at most one solution in k.
162 5 Integration of Transcendental Functions
I n t e g r a t e H y p e r e x p o n e n t i a l P o I y n o m i a l ( p , D)
(* Integration of hyperexponential polynomials *)
p = (t^ + (x + l)tg + to + X 4- 2) t +
We get
1. g z = 0 , /?=: 1
2. z/t(p) = -Uooip) = 1
3. i = 1
4. a = lc(p) - tg 4- (x + l)tg + to 4- X + 2
5. D{tQ + x) + (1 + tg)(to + x) = a, so 1; = R i s c h D E ( l 4- tg, a) ^ to + x
6. q = vt = (to 4- x)t
7.p-Dq = l / ( x 2 4- 1 ) .
Hence,
= (tan(x)+x)e*-(-)+ / - ^
J x^ 4-1
= (tan(x) 4- x)e*^"^^^ 4- a r c t a n ( x ) .
I n t e g r a t e H y p e r e x p o n e n t i a l ( / , D)
(* Integration of hyperexponential functions *)
b - ^ a2 + r
Proof, b y^ 0 since a^ + 1 ^ 0 , and we have
Db f^f^~a\ ^f^
h K^fÄ^aJ /=4 a
( v ^ + a)2/:iT-a l + a=
D
Dt-Dß t^ + l
Pß = -j^^ = a^--j=a{t-^ß)
which implies that Pß{ß) = 2aß = ±2^/^a^ which is not a logarithmic deriva-
tive of a fc(\/^)-radical, hence not a logarithmic derivative of a Ä;(/3)-radical.
Thus, p e <Sf^ which imphes that S'f' = 5^^^
Conversely, let t be a transcendental hypertangent over k and suppose that
Const(Ä:(t)) = Const(A:). Then, Const(I(t)) = Const(I) by Lemma 3.3.3. If
there exist b G k{^/^y and an integer n > 0 such that
r— Dt Db
then, taking
4- nn
and c= jj ek{V^){t)
T+ t 62
we get
Dc DO Db ^ r— Dt ^Db ^
As a consequence, we have
k{t) = {f e k{t) such that (t^ -f-1)""/ G k[t] for some integer n > 0}
p-Dq-c-j^-^ek.
Suppose now t h a t Dc / 0, and t h a t r has an elementary integral over k{t).
Then, by Theorem 5.7.1, there are v G k{t)^ c i , . . . , C n G C, 6 i , . . . , 5 n G
^ ( c i , . . . , Cn), and m i , . . . , m^ G Z such t h a t
n
c= -— = 7 rriiCi G Const(Ä:)
2a ^-^
i=l
in contradiction with Dc 7^ 0. Hence (5.18) has no solution if Dc ^ 0, which
implies t h a t r, and hence p, have no elementary integral over kit). D
5.10 The Hypertangent Case 167
I n t e g r a t e H y p e r t a n g e n t P o l y n o i i i i a I ( p , D)
(* Integration of hypertangent polynomials *)
(* Given a differential field k such that •\/—1 ^ /c, a hypert angent mono-
mial t over k and p G k[t], return q G k[t] and c G k such that
p-Dq~ cD{t^ + l)/{t^ + 1) G /c and p -- Dg does not have <in elementary
integral over k{t) if Dc 7^ 0. *)
{q,r) <— PolynomialReduce(p, D) (* deg(r) < 1 *)
a i- Dt/{t^ + 1)
c ^- coefficient(r,t)/(2a)
r e t u r n ( g , c)
/(tan(.)^+.tan(.) + l)d.
Let k = Q{x) with D — d/dx^ and and let t be a monomial over k satisfying
Dt = 1 -{-t"^, i.e. t = tan(x). Our integrand is then
We get
1. (g,r) = PolynoniialReduce(t^ + j^t + 1) = {t,xt)
2.a = Dt/{t^ + 1) = 1
3. c = x/2.
/ ( t a n ( . f + . t a n ( x ) + l)<i. = tan(x) + / x t a n ( x M .
[DyA.ffi -f2\(yA^(gi
\Dy2)^\h h ) W) {92
and to compute yi and ^2 if they exist.
T h e o r e m 5.10.3. Let k be a differential field not containing AZ—T; and t an
hypertangent over k. If we can solve coupled differential systems over k, and
\/~^Dt/{t'^ -f 1) is not a logarithmic derivative of a k{\/^-i)-radical, then for
any p G k{t) we can either prove that p has no elementary integral over k{t),
or compute q £ k{t) such that p — Dq G k[t].
168 5 Integration of Transcendental Functions
p = Dv+ y ^Cj
biit^ + iy
at + b ro f ct-j-d SQ .
(t2 + i ) ^ (t2 4-1)^-1 yit^ + i)"^ (t2 + 1 ) ^ - 1
tDc 4- ca(t2 + 1) + D d 2mat{t^ + l)(ct + d)
+ DlOo + W
(t2 + 1 ) ^ (t2 + 1) m+1
tDc 4- I)<i ct2 + dt 1
= , ^ 2ma—^r — h ca-r^^ -r T + i^'^o + ^
(t2 + l ) ^ (t2 + l ) ^ (t2 + 1 ) ^ - 1
tDc^Dd ^ dt-c 1 - 2m
~ — — 2ma—7: 7-— + ca—7:—— r + DWQ + it;
(t2 + l ) ^ (t2 + l ) ^ (t2 + 1 ) ^ - 1
where IOQ = so/(t^ + 1)'^""'". Since 1/^2+1 ('w^o) > —'^, ^t'^-\-i{Dwo) > —m by
Theorem 4.4.2, so, equating t h e coefficients of (t2 + 1)~"^ we get
which implies t h a t
for some u E k[t], so z/t2_j_i(p — Dqo) > —m. By induction we can either prove
t h a t p — Dqo has no elementary integral over k{t)^ in which case p has no
elementary integral over k{t)^ or we get qi E k{t) such t h a t p—Dqo—Dqi E k[t]^
which implies t h a t p — Dq E k[t] where g = go + ^i- D
I n t e g r a t e H y p e r t a n g e i i t R e d u c e d ( p , D)
(* Integration of hypertangent reduced elements *)
m < i^t2+i(p)
if m < 0 t h e n returii(0,1)
h^{t^ + 1)> (* /i G k[t] *)
(g, r) ^ PoIyDivide(/i, t^ + 1) (* /i = (t^ + l)g + r, deg(r) < 1 *)
a ^- coefficient(r, t), b ^- r — at (* r = at + & *)
(* CoupledDESystem will be given in Chap. 8 *)
(c, d) ^ C o u p l e d D E S y s t e m ( 0 , 2mDt/{t^ + 1), a, b)
(* Dc - 2mDt/{t^ + l)d = a,Dd + 2mDt/(f + l)c = 6 *)
if (c, d) = "no solution" t h e n return(0,0)
go <- (ct + 6^)7(^2 + 1)^
(g, /3) ^- I n t e g r a t e H y p e r t a n g e n t R e d u c e d ( p — Dgo, i^)
r e t u r n ( g + go,/3)
Let Ä: = Q{x) with I^ = (i/dx, and and let t be a monomial over k satisfying
D t = (1 + 1 ^ ) / 2 , i.e. t = t a n ( x / 2 ) . Using the classical half-angle formula, our
integrand is then
170 5 Integration of Transcendental Functions
siii(a:) 2tan(x/2) 2t/x
^ ^ ~ V ^ x(tan(x/2)2 + 1) ^ IßTl ^ ^^^'
t^^t^+xH +1 . . .
p= ^ G kit) .
Hence,
tan(x)^ + tan(a:)^ + x^ tan(x) + 1 . __
(tan(:r)2 + 1)^
(1 + x/3) tan(x) - {x^ ~ 1/18) 5(1 + x/3) tan(x) + 77/12
6 (tan(x)2 4-1)^ 24 (tan(x)2 + 1)^
5(l + a;/3)tan(:z:)-43/6 5 // XN
16(tan(x)2 + l) 16
/(i+i)..
and the remaining integral is of course x + x^/ö.
Putting all the pieces together, we get an algorithm for integrating ele-
ments of k{t).
T h e o r e m 5.10.4. Let k be a differential field not containing \/^, and t an
hypertangent over k. If we can solve coupled differential systems over k, and
\r~^Dtl(t^ + 1) 25 not a logarithmic derivative of a k{\/'^)-radical, then for
any f G k{t) we can either prove that f has no elementary integral over k{t),
or compute an elementary extension E ofk{t) and g G E such that f — Dg G k.
Proof. Suppose that y/^Dt/{t'^ + 1) is not a logarithmic derivative of a
Ä;(\/^)-radical, then t is a monomial over k and Const(Ä:(t)) = Const(fc)
by Theorem 5.10.1. Let / G k{t). By Theorem 5.3.1, we can compute
gi,h,r G k{t) such that / = Dgi + h-{-r^ h is simple and r is reduced. From /i,
which is simple, we compute g2 G k{t) given by (5.8) in Theorem 5.6.1. Note
that go = 9i ^ J 92 lies in some elementary extension of k{t). Let p ^ h — g2
and q = p + r, then / = Dgo -\- q so f has an elementary integral over k{t)
if and. only if q has one. If p ^ k[t]^ then p + r does not have an elementary
integral over k{t) by Theorem 5.6.1, so / does not have an elementary integral
over k{t). Suppose now that p G k[t]. Then p e k{t) so q £ k{t). By Theo-
rem 5.10.3 we can either prove that q has no elementary integral over A;(t), in
which case / has no elementary integral over k{t)^ or compute s G k{t) such
that u = q — Ds G k[t]^ in which case by Theorem 5.10.2, we compute v G k[t]
and c G Const(Ä:) such that u - Dv - cD{t^ + l)/(t^ + 1) G A;. If Dc ^ 0,
then ?i, and hence / , have no elementary integral over A:(t), otherwise Dc = 0
so / — Dg G k where g = goi-s + v-{-cJ D{t^ + l)/(^^ + 1) lies in some
elementary extension of k[t). D
172 5 Integration of Transcendental Functions
Proof. Let C = Const(A:(t)), p £ k[t] be such t h a t deg(p) < J(t), and suppose
t h a t p has an elementary integral over k{t). By Theorem 5.7.1 there are v £
k[t], C i , . . . , C n £ C and ui,...,Un £ <S/,(ci,...,c^)[t]:/c(ci,...,c,.) such t h a t p =
Dv + g where g = X^ILi ^^^('^O/'^i- Note t h a t g = p — Dv £ k[t]. Since
^t[t]:k = ^' it follows t h a t 4Tci,...,c„.)[t]:fc(ci,...,c„.) = ^ (Excrcise 3.5), hence
t h a t 5/c(ci,...,c,,,)[t]:/c(ci,...,c„,) = Kci,..., Cn). This implies t h a t g £ fc(ci,..., c^).
Since g £ k\t]^ we get t h a t g £ k. Suppose t h a t deg(t') > 1, then,
I n t e g r a t e N o n L m e a r N o S p e c i a l ( / , D)
(* Integration of nonlinear monomials with no specials *)
where Jy{x) is the Bessel function of the first kind of order v. From
- ^ — - ~ - J , + i ( x ) + -J,(x)
174 5 Integration of Transcendental Functions
we get
where (j)y{x) is the logarithmic derivative of Jjy{x)^ the Bessel function of the
first kind of order u. Let k = Q{x) with D = d/dx, and let t be a monomial
over k satisfying Dt = —t^ — t/x — (1 — v^jx^)^ i.e. t =• (^y(x). Our integrand
is then
_ xH^ + Xt^ - vH^ - X{X? + l)t2 - {x^ - Z/2)t - x^/4
•^ ~ ™ xH^ + X2(x2 + 2)^2 -f x2 + X4 + x 6 / 4 """"
and we get
1. Calling (^i,/i,r) = H e r m i t e R e d u c e ( / , D ) we get
^ The fact that (5.21) has no solutions in quadratures for z/ G Z (its Galois group
is SL2{C)) implies that (5.22) has no algebraic function solution, hence no solution
in k. Theorem 3.4.3 then implies that ^S^^"" = 0.
5.12 In-Field Integration 175
1^ f.2
l+xV4 1 log((;^,(x)2 + l + : r V 2 ) .
(/),(x)2 + 1 + ^ 7 2 2
Note that the above integral is valid regardless of whether S^^^ is empty.
The above examples used Bessel functions, but in fact the algorithm of
this section can be applied whenever the integrand can be expressed in terms
of the logarithmic derivative of a function defined by a second-order linear
ordinary differential equation. If the defining equation is known not to have
solutions in quadratures (for example for Airy functions), then *S^^^ = 0, as
explained in note 4 of this chapter.
Recognizing Derivatives
The first problem is, given / G fc(t), to determine whether there exists u £ k{t)
such that Du = / , and to compute such an u if it exists. We first perform the
Hermite reduction on / , obtaining g G fc(t), a simple h G fc(t), and r G k{t)
such that / = Dg -\-h-\-r. At that point, we can prove (see Exercise 4.1) that
176 5 Integration of Transcendental Functions
The second problem is, given / £ k{t)^ to determine whether there exists a
nonzero u £ k{t) such that Du/u = / , and to compute such an u if it exists.
We can prove (see Exercise 4.2) that if / = Du/u for some nonzero u £ k{t),
then / is simple and that all the roots of the Rothstein-Trager resultant are
integers. In that case, the residue reduction produces
DQO, _ ^{llrsia)=09a) __ Dv
where v £ k{t) since the a's are all integers. Furthermore, Theorem 5.6.1
implies that if / = Du/u for u £ k{t), then f — g £ k[t]^ so we are left
with deciding whether an element p of k\t] is the logarithmic derivative of an
element of k{t). li p = Du/u for u £ k{t)^ then it follows from Exercise 4.2
that deg(p) < max(l, S{t)) and from Corollary 4.4.2 that u = p^^ .. .p^"^ where
Pi £ S and e^ £ Z.
If t is a primitive over fc, then both p and u must be in k since S = k^ so
we are reduced to a similar problem in k.
If t is an hyperexponential over fc, then p £ k and u = vt^ foi v £ k* and
e G Z, since S^^^ ~ {t}. We are thus reduced to deciding whether p £ k can
be written as
Dv Dt
p= + e--
V t
foTv £ k* and e G Z. This is a special case of the parametric logarithmic
derivative problem, a variant of the Umited integration problem, which is
discussed in Chap. 7.
5.12 In-Field Integration 177
Dv D(t^ + 1) Dv ^ Dt
a^U= — +e ; / = — + 2e-^—-t
V t^ + 1 V t^ + 1
which is equivalent to
^ and ^ ^ . Z .
'u 2 Dt
The second condition can be immediately verified, while the first is the prob-
lem of deciding whether an element of k is the logarithmic derivative of an
element of k.
When f = Db for some b £ k{t), then Corollary 9.3.1, 9.3.2 or 9.4.1 provide
alternative algorithms: / is the logarithmic derivative of a ^(t)-radical if and
only if the linear equation (9.9), (9.13) or (9.22) has a solution in Q.
The solution u is not unique, but if / = Du/u = Dv/v for u^v G k{t)\{0},
then u/v G Const(fc(t)) (this is the case n = ?n = 1 of Lemma 5.12.1 below).
The third problem is, given / G fc(t), to determine whether there exist a
nonzero n G Z and a nonzero u £ k{t) such that Du/u = n / , and to compute
such an n and u if they exist. We can prove (see Exercise 4.2) that if nf =
Du/u for some nonzero n G Z and u G fc(t), then / is simple and that all the
roots of the Rothstein-Trager resultant are rational numbers. In that case, let
m be a common denominator for the roots of the Rothstein-Trager resultant.
Then, the residue reduction produces
V— DQO, 1 ^ ( n r . ( a ) = o C ) IDv
g= y a = ^- 7^^ =
1 Dv e Dt
p= +- —
n V n t
for V G k* and n, e G Z. This is the parametric logarithmic derivative problem,
a variant of the limited integration problem, which is discussed in Chap. 7.
If t is a hypertangent over k and ^/^ ^ k, then p = a + 6t for a, 6 G A:,
and u = v{t^ + 1)^ for i; G A;* and e G Z, since 5^^^ = {t^ + 1}. We are t h u s
reduced to deciding whether a -\-bt can be written as
1 Dv e Dlt^ + 1) IDv 2e Dt
n V n t ^ + 1 n V nt^ + l
which is equivalent to
Dv ^ bt^^l ^
na= and - —p^-— G Q .
V 2 Dt
T h e second condition can be immediately verified, while the first is the prob-
lem of deciding whether an element of k is the logarithmic derivative of a
Ä^-radical.
W h e n f = Db for some b G k{t), then Corollary 9.3.1, 9.3.2 or 9.4.1 provide
alternative algorithms: / is the logarithmic derivative of a A:(t)-radical if and
only if t h e linear equation (9.9), (9.13) or (9.22) has a solution in Q.
The solution (n, u) is not unique, b u t any two solutions are related by t h e
following lemma.
I Du __ 1 Dv
n u m V
for nonzero n, ?n G Z^ then
^.lcm(n,m)/n
G Const(ü:').
/i.lcni(n,7n)/m
Exercises
E x e r c i s e 5 . 1 . Let A: be a differential field of characteristic 0, t a monomial
over k^ and d ^ k\t]\ {0}. Let d =• did\ - • - d^ be a squarefree factorization of
d. Show t h a t fi{a/d) < n for any a G k[t]^ and t h a t ß{a/d) = n if and only if
gcd(a,<i) = 1.
5.12 In-Field Integration 179
Exercise 5.2. Rewrite the proof of Theorem 5.3.1 using Mack's Hnear version
of the Hermite reduction instead of the quadratic version.
b)
180 5 Integration of Transcendental Functions
c)
log(a; + a)
dx, a, 6 G C, a 7^ 6.
d)
{x + l)e^' + 1
dx
/ . (e-^)
-=.^ - 1
e)
/ ( l + ^ — + ^ ^ h"^^^' nGZ,n7^2.
2-n x^ ^
f)
2 + tan(x)2
dx
1 + (tan(x) + x)
The motivation behind that definition is the following lemma, which gives
a formula for the order of Dy + /?/ at a normal polynomial whenever / is
weakly normalized:
L e m m a 6.1.1. Let f G k{t) \ {0} be weakly normalized with respect to t,
y E k{t)\ {0}^ and p £ k\t\ he normal irreducible. Then,
Of course, the next step is, given / G fc(t), testing whether / is weakly
normalized with respect to t, and finding an adequate transformation other-
wise. The following theorem shows that adding an appropriate logarithmic
derivative to any / G k{t) makes it weakly normalized, and gives an explicit
change of variable that transforms equation (6.1) into a similar one with a
weakly normalized coefficient.
T h e o r e m 6.1.1, For any f £ k{t), we can compute q £k\t] such that f = f —
Dq/q is weakly normalized with respect to t. Furthermore, for any g^y G k(t),
Dy^fy = g <=^ Dz + fz = qg
where z = qy.
Proof Let d = dgdn he SL splitting factorization of the denominator of / , and
dn = did^ • • • d^ be a squarefree factorization of d^- Write / = a/di + b/c
where a^b^c G k[t] and gcd(di,c) = 1, and let z be a new indeterminate over
k and r = resultantt(a — zDdi^di) G k[z]. Let n i , . . . ,715 be all the distinct
positive integer roots of r, and
q = f | g c d ( a - UiDdi^di)"^'' G k[t] ,
i=l
Dq/q G Tip and residuep(Dg/g) = iyp{q). Since TZp is a vector space over k and
residue^ is a linear m a p by Theorem 4.4.1, we get / G Tip and residuep(/) =
residuep(/) — ^p{q). Let p = residuep(/). If p is not a positive integer, t h e n
residuep(/) = p — i^p{q) is not a positive integer. Thus, suppose t h a t p is a.
positive integer. Then p ^ 0, so f ^ Op hj Theorem 4.4.1, which implies t h a t
p I d. Since p is normal, this means t h a t p \ dn^ so i'p{f) = --i^p{dn) < 0. Since
/ G IZp, we have h>p{pf) > 0, so z^p(/) > —1, hence h'p{f) = —1, so Vp{dn) = 1.
This implies t h a t p \ di and gcd{p,d/di) = 1, hence t h a t b/c G Op and
a/di G 7?.p. Thus, residuep(6/c) = 0, so p = residuep(a/(ii). Since di is normal,
a/di is simple. In addition p E k since p is an integer, hence residuep(a/<ii) is a
root of r by Theorem 4.4.3. Thus, p = rij for some j , so p \ gcd{a~njDdi^ di)
by Lemma 4.4.3, which implies t h a t z/-p(gcd(a — rijDdi^di)) = 1. For i ^ j ,
we have residuep(a/(ii) 7^ n^, so _p J/gcd(a —n^Ddi, (ii) by Lemma 4.4.3, hence
z/p(gcd(a — TiiDdi^ di)) = 0. Therefore,
s
^p(g) = y^^niUp{gcd{a - riiDdi.di)) = Uj .
so Dy + fy = g <=^ Dz + fz = qg. D
R d e N o r i n a l D e n o m i n a t o r ( / , g, D)
(* Normal part of the denominator *)
Dy^y = ^ (6.3)
which arises from the integration of e*/t. We have / = 1 and g = 1/t so:
1. {dr,,ds) = SplitFactor(l,d/dt) = (1,1)
2. (en.es) = SplitFactor(t, d/dt) = (t, 1)
3.p = gcd(l,t) = l
4./i-gcd(t,l)/gcd(l,l) = l
Since t J/1, we conclude that (6.3) has no solution in Q(t), hence that J e*/t dt
is not an elementary function.
Example 6.1.2. Let k = Q{x) with D = d/dx^ and let t be a monomial over k
satisfying Dt = 1 +t'^, i.e. t = tan(x). Consider the equation
Dy + {t^^l)y = ^ (6.4)
yp{by) = Vp{b) + z^p(y) < i/p(a) + yp{y) < iyp{a) + Vp{Dy) = i'p{aDy)
so Vp{aDy + by) > i^piby) = i/p{ay). Suppose t h a t Up{aDy + by) > Up{ay).
Then, {aDy + by)/ay E pOp^ so
b\ (Dy\ f r .Dp Dz
-7r„ - = X,p -—]=^p x^phj)-—^-—
y / \ p
, ^Dp\ TTpiDz) , , /Dp\ D*7rp z
.p . z/p y — + - ^ V ^ = z/pü; TTp ^ + fY
Since a G k[t] and has no special factor in (6.6), this means that z/p(a) = 0
for any p G 5, so Lemma 6.2.1 provides a lower bound for iyp{q) where q e k{t)
is a solution of (6.6) in the following cases:
(i) If iyp{b) < 0, then z/p(g) G {0, z/p(c) - z/p(6)}.
(ii) If Uplb) > 0 and p G cSf ^ then Up{q) G {0, i^p(c)}.
For p G tS^^^, once we have a lower bound iyp{q) > n for some n < 0, replacing
g by hp'^ in (6.6) yields
hence
ai:^/i + ( 6 + n a ^ ) h = cp-"". (6.7)
Furthermore, h E k{t) since g G k{t)^ and h £ Op since i^p(g) > n. Thus we are
reduced to finding the solutions h E k{t) nOp of (6.7). Note that cp~" G A:(t)
since c G /c(t), and 6 + naDp/p G Ä;(t) since 6 G ^(t), a G /c[t] and p E S.
The eventual power of p in the denominators of 6 + naDp/p and cp""' can
be cleared by multiplying (6.7) by p^ where N = max(0, ~Up{h),n — z^p(c)),
ensuring that the coefficients of (6.7) are also in k{t) O Op.
Since all the special polynomials are of the first kind in the monomial
extensions we are considering in this section, we only have to find a lower
bound for yp{q) in the potential cancellation case, i.e. i^p{h) = 0. We consider
this case separately for various kinds of monomial extensions.
T h e P r i m i t i v e Case
T h e H y p e r e x p o n e n t i a l Case
Du Dv
f = mn H z=z nrj -\
u V
which implies t h a t
Dw
= im — n)ri
w
where w — vju. Since 77 is not the logarithmic derivative of a ilT-radical, t h e
above implies t h a t m = n and t h a t Dw — 0. D
L e m m a 6 . 2 . 3 . Suppose that t is an hyperexponential over k such that rj =
Dt/t is not the logarithmic derivative of a k-radical. Let a € Ä:[t],6, g G kit)
he such that g c d ( a , t ) = I, Ut{b) = 0, and i^tiq) / 0- Then, either
Ut{aDq^bq) = Vt{q)
or
-_- = vAq) Tj H for some u E k .
a(0) u
Proof Suppose t h a t Vt{aDq + hq) / 1^4(9). Then, Lemma 6.2T impUes t h a t
( h\ , , fDt\ D'u
aj \ ^/ ^
for some nonzero u e k[t]/{t)^ where D* is t h e induced derivation. B u t
k[t]/{t) i::^ k and D* is an extension of D by L e m m a 3.4.3, so u £ k* and
D*u = Du. Furthermore, 7rt{p) = p{0) for any p £ k[t]^ so
Since t G Sf^ by Theorem 5.L2, Lemmas 6.2.1 and 6.2.3 always provide a
lower bound for iyt{Q) where q e k{t) is di solution of (6.6): if Ut{b) ^ 0, then
Lemma 6.2.1 provides the bound as explained earlier. Otherwise, i^tib) = 0,
so either —6(0)/a(0) = mrj + Du/u for some m G Z and ix G fc*, in which
case z/t(g) G {0, m, Utic)}^ or i^tiq) ^ {0, ^'t(c)}. Note t h a t such an m is unique
by L e m m a 6.2.2 applied to k. Since S^^^ = { t } , k{t) n Ot = fc[t], so having
determined a lower bound for 2/^(^)5 we are left with finding solutions h e k[t]
of (6.7).
190 6 The Risch Differential Equation
RdeSpecialDeiioniExp(a, 6, c, D)
(* Special part of the denominator - hyperexponential case *)
Example 6.2.1. Let k = Q(a;) with D = d/dx, and let t be a monomial over fc
satisfying Dt = t, i.e. t = e^, and consider the equation
4-1 +- (6-9)
which arises from the integration of
ef
(e^ + x) x^
where
x'^ -1 1
X e^ + X
We have a = t^ + 2xt -f x^, 6 = (1 -f l/x^)^^ + (2x - 1 + 2/x)t + x^, and
c = t/x'^ — 1 + 2/x, hence
1. 715 = i^t(&) = 0, nc = z^t(c) =: 0
2. n = min(05 ric — min(0, njj)) = 0
3. n5 = 0, so a = --6(0)/a(0) = x^/x^ = - 1
4. —1 = —Dt/t^ so m = —1 and n = min(n, m) = —1
5. N = max(0, —n^, n — ric) = 0
Hence, any solution q G k{t) of (6.9) must be of the form q = p/t for p G k[t]
satisfying
{t'+2xt+x')Dp+(^^+(^l-iyy='^+(^l-iy. (6.10)
6.2 The Special Part of the Denominator 191
= (2ut2+i{q)r]V^^^j + ('_2z/,2+i(g)T/v^+^"^
_ Du Diu"") __ D{uu'') _ Dv
U U^ UU^ V
R d e S p e c i a l D e n o m T a n ( a , b, c, D)
(* Special part of the denominator - hypertangent case *)
aDq^hq = c (6.12)
(Hi) If 6{t) > 1 and deg{b) = deg(a) -f- ö{t) — 1, then either
or
lc{b) f Dq
lc(a) "" V^^^^*^-'
Proof.
(i) We have deg(Dq) < deg(g') + max(0, 5(t) — 1) by Lemma 3.4.2, hence
_ (aDq^bq\ __ ( b Dq \
^ " ""^yaqtm-l J-''^ \atm-l + qtm-l J
/ b \ lc(6) lc(6)
As a result, we only have t o consider the cases deg(6) < deg(a) for Louvillian
monomials, a n d deg(6) = deg(a) + S{t) — 1 for nonUnear monomials. We
consider those cases separately for various kinds of monomial extensions.
T h e Primitive Case
f = mr]^Du (6.13)
Proof. Suppose t h a t {m^u) and {n^v) are both solutions of (6.13). Then,
/ = mr] + Du = riT] + Dv
or
— -—-— = degfo) T] + Du for some u £ k .
lc(a)
or
lc(fe) Djlciq)) lc(aD(lc(g)) + 61c(g)) , , , ^ ^
-Ho) ^ ^ ^ ( ^ HÖM^) = ^''^'^' + ^ "
for some u £ k.
which implies t h a t
lc{Dq) = deg{q)r]lc{q) + Dv
which impHes that deg(aDg + bq) < deg(a) + deg(g) — 1. Suppose that
deg{aDq + bq) < deg(a) + deg(g) - 1. Then, {aDq + bq)t/{aq) G t-^Ooo,
which impHes that
ff{aDq-\-bq)t\
(aDq-{-bq)t\ ___ f ftb
tb tDq\ f tb\ ftDq
0 = TToo ( —
\ aq JI = TToo ( — H
~ Va I = TToo ( — I 4 - TToo (
since ITQQ is a ring-homomorphism, and both tb/a and tDq/q are in O^Q. Since
deg(6) = deg(a) — 1 and deg{Dq) = deg(g) — 1, we have
where u = v/lc{q) G k.
(iii) Suppose that deg(6) = deg(a). If deg(Dg) = deg(^) — 1, then
hence that deg(aDg + bq) < deg(a) 4- deg(g). Suppose that deg{aDq + bq) <
deg(a) + deg(g). Then, {aDq + bq)/{aq) £ t~^0^, which imphes that
since TTOO is a ring-homomorphism, and both b/a and Dq/q are in (9oo- Since
deg(6) = deg(a) and deg{Dq) = deg(g), we have
- 1 ^ =^ (6.14)
ic(a) u
where u = lc(g). Write p = u~^q G k[t]. Then, deg(p) = deg(g) and
where A = ua and B = aDu + bu. Note that deg(yl) = deg(a), and deg(B) <
deg(A), since (6.14) imphes that the coefficient of t^^^^^^ in B is 0. Suppose
first that deg(ß) < deg(^) — 1. Then, (i) imphes that
hence that
Suppose finally that deg{B) — deg(^) — 1. Then, (ii) implies that either
or
HB) ^ ,,
"kM) =^^gW^ + ^^
for some v E k. Noting that deg(p) = deg(g), deg(74) = deg(a), and lc{A) =
lc(a)lc(g) completes the proof. D
Lemmas 6.3.1 and 6.3.3 always provide an upper bound for deg(g) where
q G k[t] is a, solution of (6.12): if deg(6) > deg(a), then Lemma 6.3.1 implies
that deg(g) € {0,deg(c) — deg(6)}. If deg(6) < deg(a) — 1, then Lemma 6.3.3
implies that deg(g) G {0,deg(c) — deg(a),deg(c) — deg(a) + 1}. If deg(6) =
deg(a) — 1, then either —lc(6)/lc(a) = mr] + Du for some m G Z and u £ k/in
which case deg(g) € {0,m,deg(c) — deg(a), deg(c) — deg(a) + 1}, or deg(g) E
{0,deg(c) — deg(a),deg(c) — deg(a) + 1}. Note that such an m is unique by
Lemma 6.3.2.
Finally, if deg(6) = deg(a), then either —lc(6)/lc(a) = Du/u for some
u e k* and —lc{aDu + bu)/{ulc{a)) = mr] + Dv for some m G Z and v £ k, in
which case deg(g) G {0,m,deg(c) — deg(a),deg(c) — deg(a) + 1}, or deg(g) G
{0,deg(c) — deg(a),deg(c) — deg(a) + 1}. We can compute such an li by a
variant of the integration algorithm (Sect. 5.12). Although it is not unique, if
—lc(6)/lc(a) = Du/u = Dv/v for u,v £ k*^ then u = cv for some c G Const(fc)
by Lemma 5.12.1, which implies that
so the solution we use does not affect the bound m, which is unique by
Lemma 6.3.2.
198 6 The Risch Differential Equation
R d e B o u n d D e g r e e P r i m ( a , 6, c, D)
(* Bound on polynomial solutions - primitive case *)
. X 4 to 4- a:^ Q to + 4x^ 9
c = (2x - l)t^ + -iL__ t^ - -^^ 1^ + a:t
X 1x
hence
1. da = deg(a) = 2, 4 = deg(5) = 2, 4 = deg(c) = 4
2. n = max(0,4 — 4 + 1) = 3
3. 4 is equal to 4 , so
a) a = -lc(6)/lc(a) = l/rr^
b) a is equal to Dii^^^ji^., so
i. /5 = -lc(ai)to + 6to)/(tolc(a)) = - 1 / x
ii. /3 is equal to —Dt, so n = max(n, — 1) = 3
So any solution in fc[t] of (6.15) must have degree at most 3.
6.3 Degree Bounds 199
lc{b)
lc{a)
R d e B o u n d D e g r e e B a s e ( a , 6, c)
(* Bound on polynomial solutions - base case *)
(* Given a,b,c G k[t] with a 7^ 0, return n G Z such that deg(g) < n for
any solution q ^ k[t] of adq/dt + bq = c. *)
da ^ deg(a), db <— deg(6), dc ^ deg(c)
n ^- niax(0, dc — max((i6, da — 1))
if db = da — 1 t h e n (* possible cancellation *)
m < lc(5)/lc(a)
if m G Z t h e n n <— max(0, m, dc — db)
return n
Dy - 2ty = 1
which arises from t h e integration of e~* dt. Theorem 6.L2 gives h = 1, so any
solution in k{t) must be in k{t). Lemma 6.2.1 shows t h a t Ut{y) > 0 for any
solution, hence any solution in k{t) must be in k[t]. We have a = c = 1 and
b = -~2t, hence
1. da = deg(a) = 0, 4 = deg(5) = 1 , 4 = deg(c) = 0
2. n = m a x ( 0 , 4 — m a x ( 4 7 ^a — 1)) = 0-
So any solution in k{t) must be in k = Q. Since t is transcendental over Q,
—2ty 7^ 1 for any y € Q, which implies t h a t
e-*\
/
is not an elementary function.
200 6 The Risch Differential Equation
lc(6) fDq
lc(a) \ q
HDq) D{lc{q))+deg{q)r,\ciq) , J3(lc(g))
= 1 ^= H^) =^^^('^)^ + n ^ K ^ -
D
Lemmas 6.3.1 and 6.3.4 always provide an upper bound for deg(g) where
q £ k[t] is a solution of (6.12): if deg(6) > deg(a), t h e n Lemma 6.3.1 implies
t h a t deg(g) £ {0,deg(c) — deg(6)}. If deg(6) < deg(a), then Lemma 6.3.4
implies t h a t deg(g) G {0,deg(c) — deg(a)}. Finally, if deg(6) = deg(a), then
either —lc(fe)/lc(a) = mr] -{- Du/u for some m EIJ and ix € Ä:*, in which case
deg(g) G { 0 , m , d e g ( c ) — deg(6)}, or deg(g) G {0,deg(c) — deg(6)}. Note t h a t
such an m is unique by Lemma 6,2.2.
R d e B o u n d D e g r e e E x p ( a , 6, c, D)
(* Bound on polynomial solutions - hyperexponential case *)
(* Given a derivation D on k[t] and a^b^c G k[t] with Dt/t G k and
a 7^ 0, return n £ IL such that deg(g) < n for any solution q G k[t] of
aDq -\-bq = c. *)
-|^=deg(g)A(i).
ic(a)
Proof. Suppose t h a t deg{aDq + bq) 7^ deg(6) + deg(g). Then, Lemma 6.3.1
implies t h a t
Lemmas 6.3.1 and 6.3.5 always provide an upper bound for deg(g) where
q G k[t] is a solution of (6.12): if deg(6) 7^ deg(a) -{-6{t) — 1, then Lemma 6.3.1
provides t h e bound as explained earlier. Otherwise, either --lc(6)/lc(a) =
mX{t) for some m G Z, in which case deg(g) G {0,m,deg(c) — deg(6)}, or
deg(g) G {0,deg(c) - d e g ( 6 ) } .
R d e B o u n d D e g r e e N o n L i n e a r ( a , 6, c, D)
(* Bound on polynomial solutions - nonlinear case *)
(* Given a derivation D on k[t] and a,b,c G k[t] with de g{Dt) > 2 and
a 7^ 0, return n G Z such that deg(g) < n for any solution q G k\t] of
aDq -^bq = c. *)
da ^ deg(a), db ^ deg(6), dc ^ deg(c),(5 < - deg(Dt), A <-- lc{Dt)
n <— max(0, dc — max{da -{-6 —.db)) 1
if db = da + 6 — 1 t h e n (* possible cancellation *)
m^-lc(6)/(Alc(a))
if ??i G Z t h e n n <— niax(0, m, dc - db)
return n
202 6 The Risch Differential Equation
Example 6.3.4- Continuing examples 6.1.2 and 6.2.2, let k = Q(x) with D =
d/dx, t be a monomial over k satisfying D t = 1 + t"^, i-e. t = tan(a:), a n d
consider the the solutions q £ k[t] of (6.5). We have a = t, b = (t — l)(t^ + 1)
and c = 1, hence
1. da = deg(a) = 1 , 4 = deg(6) = 3, dc = deg(c) = 0
2.6 = 6{t) = 2, A = l c ( l + t 2 ) = l
3. n = max(0, dc — max((ia + (5 — 1, (if,)) = 0
4. 4 / ö^a + (^ - 1
Hence any solution q e k[t] of (6.5) must be of degree 0, i.e. in Q{x).
6.4 T h e S P D E Algorithm
We are now reduced to finding solutions q G k[t] of (6.12) and we have an
upper bound n on deg(g). We present here an algorithm of Rothstein [83]
t h a t either reduces equation (6.12) to one with a == 1, or proves t h a t it has no
solutions of degree at most n in k[t]. This algorithm is based on the following
theorem.
Proof. Let q Gk\t] be a solution of aDq -\-bq = c. Then, aDq -\- bq = az ^br,
so b{q — r) = a{z — Dq)^ so a \ b{q — r ) . Since gcd(a, 6) == 1, this implies t h a t
a I g — r, hence t h a t h = {q — r)/a £ k[t]. We then have:
= Dq-Dr^^^''
a
(az 4- br) — bq _ bq ~ br ^
= -i ^—i jj'p -I ^—„_ = 2 — Dr .
a a
Conversely, let h E k[t] be a solution of (6.16), and let q ~ ah-\-r. Then,
D
6.4 The SPDE Algorithm 203
Example 6.4-1. Continuing examples 6.1.2, 6.2.2 and 6.3.4, let k = Q{x) with
D = d/dx^ t be a monomial over k satisfying Dt = 1 + t^, i.e. t = t a n ( x ) , and
consider the the solutions in k[t] of (6.5). We have a = t, b = (t — l)(t^ + 1) =
t^— t ^ + t — l , c = : l and n = 0 from example 6.3.4, hence
1. ^ = gcd(a,6) = 1
2. (r,2) = E x t e n d e d E u c l i d e a n ( t ^ - t^ + 1 - l , t , 1) = {~l,t^ - t + 1)
3. b + Da = t^ - t'^ + t - 1 + Dt = t^ -^ t
4:. z- Dr = t^ - t ^ l
5. recursive call, SPDE(t, t^ + t, t^ - t + 1, D, - 1 ) :
a) —1 < 0 and t^ — t + 1 / 0, so return "no solution"
Thus (6.5) has no solution in k[t], hence it has no solution in k{t). This implies
that (6.4) has no solution in k{t), hence that
ptan(a:)
• dx
tan(x)^
is not an elementary function.
Example 6.4-2. Continuing examples 6.2.1 and 6.3.3, let k = Q{x) with D =
d/dx^ t be a monomial over k satisfying Dt = t, i.e. t = e^^ and consider the
solutions in k[t] of (6.10). We have a = t'^-\-2xt-\-x'^, b = c = t^/x'^ + [2/x-l)t
and n = 0 from example 6.3.3, hence
1. g = gcd[a,h) = 1
2. (r, z) = ExtendedEuclidean(6, a, c) = (1,0)
3. 6 + Da = {2x'^ + l)t^/x'^ + (2x2 _|_ ^ ^ 2)t/x + 2x
A. z~Dr = 0
5. recursive call, SPDE(t, b + Da, 0, D, - 2 ) :
a) - 2 < 0 so return (0,0,0,0,0)
ß,b = c — m = a = ß = 0
7. return (0,0,0,0,1)
Thus any solution in k[t] of degree at most 0 of (6.10) must be of the form
Oh -\-1 = 1 where Dh = 0. It follows that p = 1 is a solution of (6.10). Going
back to example 6.2.1, this implies that q = 1/t is a solution of (6.9), hence
that
X 2x
and n = 3 from example 6.3.1, hence
1. ö' = gcd(a,6) = 1
2.
(r, z) = ExtendedEuclideaii(6, a, c)
= f-x2i,(2:.-l)t2 + ^ ^ - ^ i ± i ^
V X 2x
6.4 The SPDE Algorithm 205
^2 2 1
b-{-Da = ^+ -t- -
X 2x
5. recursive call, SPDE(ai = t^, 6i = & + Da^ ci = z — Dr^ D, 1):
a) g = gcd(ai,6i) = 1
b)
c)
t^ 4 1
6i+Dai = ^ + - t - •-,zi -i:^ri = 0
d) recursive call, SPDE(t2, -t^/x'^ + 4t/x - 1/x, 0, D, - 1 ) :
_ i. - 1 < 0 so return (0,0,0,0,0)
e) hi = ci = mi = ai = ßi = ^
_ f) return (0,0,0,0, x^ + to/2)
6.fe= c = m = a = 0, /3 = x 2 + to/2
7. return (0,0,0,0, (x^ + tQ/2)i^ - x^t)
Thus any solution in k[t] of degree at most 3 of (6.15) must be of the form
O/i + (x^ + to/2)t2 ~ x^t where Dh = 0. It follows that
where
g-i/x_|_^ e"V^+4x^ X
0(x) = (2x - 1) log(x)^ + ^-^ log(x) -
2x ^oz{x)
Example 6.4-4- Let A: = Q and t be a monomial over k satisfying Dt = 1,
i.e. D = d/dt^ and consider the solutions in k[t] of arbitrary degree n of
Dh=-t-~. (6.18)
2 4 ^ ^
Dq-^bq==c (6.19)
lc(6)lc(g)t^^^-^^)+^"^(^) .
(a) If deg{q) > 0, deg(6) < 6(t) - I, and either 6{t) > 2 or D = d/dt, then
the leading monomial of Dq + bq is
deg(g)lc(g)A(t)t^^^"(^)+'^(*)-^
(Hi) If6{t) > 2, deg(6) = 3{t) - 1, deg(g) > 0 and deg(g) ^ -lc(5)/A(t), then
the leading monomial of Dq + bq is
(deg(g)A(t) +lc(ö))lc(g)t^^s-^^)+^(*)-i.
6.5 The Non-Cancellation Cases 207
W h e n d e g ( 5 ) is L a r g e E n o u g h
Example 6.5.1. Let k = Q{x) with D = d/dx, and let t be a monomial over k
satisfying Dt = 1 -^t^^ i.e. t = tan(a::), and consider the equation
Theorem 6.1.2 gives h = 1, so any solution in k{t) must be in k{t). Lemma 6.2.1
shows that I't^-^iiy) > 0 for any solution, hence any solution in k{t) must be
in k[t], so looking for solutions in k[t] of arbitrary degree we get: 6 = t^ + 1,
r ^{xi-l)r +t• •2, n = +00 and
t xr + x-\-l
W h e n deg(6) is Small E n o u g h
Suppose that deg(6) < 6{t) — 1 and either D = d/dt, which implies that 6 = 0,
or 6{t) > 2. Let q e k[t] be a solution of Dq + bq = c.
If deg(g) > 0, then deg(g) + ö{t) — 1 = deg(c), so deg(g) = deg(c) + 1 — 6{t)
and deg(g)lc(g)A(t) = lc(c). This yields the leading monomial ut^ of g, and
6.5 The Non-Cancellation Cases 209
while c ^7^ 0 d o
if n = 0 t h e n m -^r- Q else m ^- deg(c) — 6{t) + 1
if n < 0 or m < 0 or m > n t h e n r e t u r n "no solution"
if m > 0 t h e n p <- (lc(c)/(m A(t))) t""
else (* m = 0 *)
if deg(5) ^ deg(c) t h e n r e t u r n "no solution"
if deg(6) = 0 t h e n return(g, 6, c)
p ^ lc(c)/lc(6)
q ^q + p
n <— m — 1
c <— c — Dp — bp
return q
m P q n c
2 t'/A t'/A 1 -1/4
1 - t / 4 tV4 - 1 / 4 0 0
SO h = t^/A — t/A is a solution of (6.18). Going back to example 6.4.4, this im-
plies t h a t g = (t^ + t + 1) {\t^ - \t)-\-\t = \t^^t is a solution of (6.17). This
example illustrates t h a t in the case 6 = 0, t h e algorithm P o l y R i s c h D E N o -
C a n c e l 2 is computing exactly an integral of c, taking into account the degree
210 6 The Risch Differential Equation
q<-0
if -lc(6)/A(t) G N t h e n M <- -~-lc(6)/A(t) else M ^ - 1
while c / 0 do
m ^ max(M, deg(c) - 6{t) + 1)
if n < 0 or ? n < 0 or m > n t h e n r e t u r n "no solution"
u ^ mX{t) + lc(6)
if li = 0 t h e n r e t u r n ( g , m, c)
if m > 0 t h e n p ^— (lc(c)/u) f^
else (* m -: 0 *)
if deg(c) ^ 6{t) — 1 t h e n r e t o r n "no solution"
p ^ lc(c)/lc(6)
q^r-q-^-p
n <~ m — 1
c <— c — Dp — bp
return q
6.6 The Cancellation Cases 211
Example 6.5.3. Let k = Q{x) with D = d/dx^ and let t be a monomial over k
satisfying Dt = 1 + 1 ^ , i.e. t = tan(a;), and consider the equation
m u P q n c
2 1 t^ t^ 1 -2{x + l)t--2x
1 0
so any solution of (6.21) must be of the form y = t'^ -\- q where q £ k[t] is a.
solution of degree at most 1 of
T h e Primitive Case
If Dt G /c, then 6{t) = 0, so the only cases not handled by Lemma 6.5.1 are
b = 0 01 b e k*. If b = 0^ then (6.19) becomes Dq = c for c G k[t], which is
an integration problem in k[t]^ and deciding whether it has a solution in k[t]
can be done by the in-field integration algorithm (Sect. 5.12), so suppose now
that b e k*.
If 6 = Du/u for some u £ k* ^ which can also be checked by a variant of
the integration algorithm (Sect. 5.12), then (6.19) becomes Dq-\- qDu/u = c,
i.e. D{uq) — uc which is as earlier an integration problem in k[t].
212 6 The Risch Differential Equation
If h is not of the form Du/u for some u e k*^ then D(lc(g)) + blc{q) / 0,
so the leading monomial of Dq + bq is (D(lc(g)) + &lc(g))t^®^^^\ This implies
t h a t deg(g) = deg(c), and t h a t lc{q) is a solution in A;* of
Dy + by = lc(c) (6.23)
P o i y R i s c h D E C a n c e l P r i m ( 6 , c, D, n)
(* Poly Risch d.e., cancellation - primitive case *)
while c 7^ 0 d o
m <— deg(c)
if n < m t h e n r e t u r n "no solution"
5 ^ RischDE(6, lc(c)) {^ Ds + bs = lc(c) *)
if s = "no solution" t h e n r e t u r n "no solution"
q^q + sf^
n -^r— m — 1
c^ c~ bsf^ — D{sf^) (* deg(c) becomes smaller *)
return q
P o l y R i s c h D E C a n c e l E x p ( 5 , c, D, n)
(* Poly Risch d.e., cancellation - hyperexponential case *)
T h e Nonlinear Case
If 6{t) > 2, then we must have deg{b) = 6{t) — 1 and lc(6) = —n\{t) where
n > 0 is the bound on deg(g). There is no general algorithm for solving
equation (6.19) in this case. If however <S^^^ ^ 0, then the following can be
done: for p G ^S^^^, applying TTp to (6.19) and using the fact that D*o7Tp = iTpoD
where D* is the induced derivation on k[t]/{p) (Theorem 4.2.1), we get
Dh^(b+^)h='-^'-^' (6.26)
\ P J P
which is an equation of type (6.19), but with a lower bound on the degree of
its solution.
There are cases when (6.25) can be solved, for example if there exists
p £ S^^^ with deg(p) = 1. Then, k[t]/{p) :^ k^ so (6.25) is a Risch differential
equation in k. Another possibility is if S^^^ n Const(Ä:)[t] ^ 0, in which case
taking p = t — a where a is a constant root of an irreducible special, we get
k[t]/{p) c::L k{a)^ so (6.25) is a Risch differential equation in k{a). This is the
case when t is an hypertangent monomial with a = ±^/^. Taking p = t — a
can also be done with a not constant, but (6.25) is then a Risch differential
equation in a nonconstant algebraic extension of A:(t), and no algorithms are
known for such curves when t is a nonlinear monomial. Although the tech-
niques of [11, 73] are probably generalizable to such curves, they would not
yield a practical algorithm in their current form.
T h e H y p e r t a n g e n t Case
PolyRischDECancelTan(6o, c, D, n)
(* Poly Risch d.e., degenerate cancellation - tangent case *)
Exercises
Exercise 6.1. Prove the following analogue of Lemma 6.2.4 for fields con-
taining A / ^ : let A: be a diflFerential field of characteristic 0 containing \ / ^ ,
t be a hypertangent over k such that 7 / \ / ^ is not the logarithmic derivative
of a /c-radical, where 77 = Dt/{t^ + 1) G /c Let a € Ä:[t], 6, g G A:(t) be such that
gcd(a, t^ + 1) = 1, i/^_y3i(^) = z^t+v'^(^) ~ ^' ^^^ e = ±.1 and suppose that
^t-e^f^i^) 7^ 0- Then, either
or
6(eV^) ^ Du
a(ev—1) W
'
for some u G k*.
Parametric Problems
has a solution in ÜT, and of course to compute such solutions. This problem,
which does not arise when we integrate only transcendental elementary func-
tions, shows up in the integration of nonelementary functions, or in integration
in terms of nonelementary functions [6, 21, 22, 52, 53]. In addition, the prob-
lem of limited integration can be seen as a special case of this problem. Note
that the set of constants ( c i , . . . , c^) for which (7.1) has a solution in K forms
a linear subspace of Const(if)'^. This motivates the following formal defini-
tion of the parametric Risch differential equation problem: given a differential
field K of characteristic 0 and / , ^ i , . . . , gm G K^ to compute / i i , . . . , /i^ € if,
a matrix A with m ~{- r columns and entries in Const(Ü") such that (7.1) has
218 7 Parametric Problems
T h e N o r m a l P a r t of t h e D e n o m i n a t o r
Since ^p{YX=i^i9i) > ^^^i<i<m{T^p{9i)) for any irreducible p e k[t], part (i)
of Theorem 6.1.2 generalizes t o parametric equations. Of course, part (ii) does
not generalize since the above inequality can be strict.
^^gcd[e de /dt) ^
gcd(c, dc/dt) ^ ^
Then, yh E k{t).
P a r a i i i R d e N o r m a I D e n o m m a t o r ( / , 5 ^ 1 , . . . ^Qm^D)
(* Normal part of the denominator *)
T h e Special P a r t of t h e D e n o m i n a t o r
hence
aDh -f ( 6 + n a ^ J ^ = ^^i {diP"'') • ('^•4)
T h e P r i m i t i v e Case
T h e H y p e r e x p o n e n t i a l Case
Since t G Sf^ by Theorem 5.1.2, Lemmas 6.2.1 and 6.2.3 always provide a
lower bound for z^t(g): if z^t(6) ^ 0, then L e m m a 6.2.1 provides the bound as
explained earlier. Otherwise, Utib) = 0, so either —&(0)/a(0) = srj-\-Du/u for
some 5 G Z and u £ k"^, in which case
P a r a m R d e S p e c i a l D e n o m E x p ( a , b , g i ^ . . . ,gm,D)
(* Special part of the denominator - hyperexponential case *)
T h e Hypertangent Case
Otherwise,
P a r a m R d e S p e c i a l D e n o m T a n ( a , 6, ^ i , . . . , prn, -Ö)
(* Special part of the denominator - hypertangent case *)
y ^ Ciri = 0 (7.6)
Since deg (X^I^i ^*^*) < deg((i), it follows t h a t Yl^i ^i^i must be equal to 0,
hence t h a t aDq -\- bq = Yl^i ^i^i- ^
C2
M 0. (7.8)
L i n e a r C o n s t r a i n t s ( a , 6, ^ i , . . . , gm, i^)
(* Generate linear constraints on the constants *)
(* Given a derivation D on k(t), a^b G k[t] and gi,... ,gm G fc(t), return
9i,." •, ^m G fc[t] and a matrix M with entries in k{t) such that for any
solution G Const(fc) andp Gfc[t]of aDp-\-bp = cig\-\-.. .+c
mgm 5
( c i , . . . , Cm) is a solution of Mx = 0, and p and the Q satisfy aDp + bp =
Ciqi + .. . + Cmgm. *)
d 4- lcm(denominator(pi),..., denominator(ö'rn))
for i ^— 1 t o m d o
{qi^ri) <- PolyDivide(d^i,c^) (* dgi = qid-\-ri *)
if ri = ... ~ rm = ^ t h e n A^ = —1 else A'" <— max(deg(ri),.. ., deg(rm))
for i <-- 0 t o A/ d o
for j ^— 1 t o m d o Mij <— coefficient(rj,t*)
r e t u r n ( g i , . . . ,qm,M)
224 7 Parametric Problems
2t3 + 3t + l 1 , 1 ,^^.
i^F = c , - ^ , - - ^ + c . ^ 4 - C 3 ^ . (7.9)
C2 I = 0 (7.10)
which has the solution space (ci, C2, C3) = (A, —3A, —2A) for any A G Q.
4. Replacing ci, C2 and C3 by the above solution in (7.9) yields
Proof Let C = Const(iC), and write Ri for the i^^ row of A, and aij for the
j ^ ^ entry of Ri. By applying the usual Gaussian elimination, we can compute
an equivalent system in row-reduced echelon form, so suppose that A is in
that form. If all the entries of A are in C, let B = A and v = u. Otherwise,
let j be the smallest index such that the j * ^ column of A has a non-constant
entry, and let i be such that aij ^ C. Then, Doij / 0, so we add the row
C o n s t a i i t S y s t e m ( M , u, D)
(* Generate a system for the constant solutions *)
Us ^ Us Ö'Sj^m-l-l
A^ - A\jRm+l,VL <- UU Um+1 (* vertical concatenation *)
(* ve
retiirn(A, u)
226 7 Parametric Problems
1. RowEchelon(yl, u) yields
A: and
A: and
0 0
Vo 0
5. Finally, adding ~{x — 1)/{x -\~ 1)R4 to R2 yields
(I 0 O0^
X
0 1 0
A-- and
0 0 0
Vo 0 1/
which both have constant entries. The above constant system has the
unique solution
which is thus the unique constant solution of (7.12). Note that (7.12) has
a one-dimensional affine space of solutions over Q(x), namely
Degree B o u n d s
As a result, we only have to consider the cases deg(6) < deg(a) for Louvillian
monomials, and deg(5) = deg(a) + 5{t) — 1 for nonlinear monomials. We
consider those cases separately for various kinds of monomial extensions.
T h e Primitive Case
or
deg(g) > max(0, max (deg(gi)) - deg(a) + 1).
l<'i<m
Note that such an s is unique by Lemma 6.3.2.
Finally, if deg(6) = deg(a), then either
or
deg(g) > max(0, max (deg(g^)) — deg(a) + 1 ) .
l<i<m
We can compute such a u by a variant of the integration algorithm (Sect. 5.12).
As explained in t h e nonparametric case, although u is not unique, Lem-
mas 5.12.1 imply t h a t the choice of u does not affect lc{aDu + bu)/{ulc{a)),
so s is unique by Lemma 6.3.2.
P a r a m R d e B o u n d D e g r e e P r i i i i ( a , b , q i , . . . ,qm,D)
(* Bound on polynomial solutions - primitive case *)
In the specific case where D = d/dt^ Corollary 6.3.1 yields a simpler algo-
rithm, as in t h e nonparametric case.
P a r a m R d e B o u n d D e g r e e B a s e l a,b,qi,... ^Qm)
(* Bound on polynomial solutions - base case *)
(* Given a,b^qi,.. . ,qm G k[t] with a j^ 0, return n G Z such that deg(g) <
n for any solution c i , . . . , Cm Gk and q G k[t] of a^ + bq *)
da ^ deg(a), db ^ deg(6), dc <- - maxi<^< m(d€ m{q^))
n ^- max(0, dc — max(c?5, da — 1))
if c^b = da — 1 t h e n (* possible cancellation *)
s ^ -lc(6)/lc(a)
if s G Z t h e n n <— max(0,5,dc — db)
return n
T h e Hyperexponential Case
At last, if deg(a) = deg(5), then either —lc(6)/lc(a) = sr] + Du/u for some
5 G Z and w G fc*, in which case
P a r a m R d e B o u n d D e g r e e E x p ( a , b ^ q i , . . . ,qm,D)
(* Bound on polynomial solutions - hyperexponential case *)
T h e Nonlinear Case
If 6{t) > 2, then Lemmas 6.3.1 and 6.3.5 always provide an upper bound
for deg(g) as in the nonparametric case: if deg(6) ^ deg(a) + S{t) — 1,
230 7 Parametric Problems
then Lemma 6.3.1 provides the bound as explained earlier. Otherwise, either
—lc(5)/lc(a) = sX{t) for some 5 € Z, in which case
P a r a m R d e B o u n d D e g r e e N o i i L i n e a r ( a , b , q i , . . . ,qm,D)
(* Bound on polynomial solutions - nonlinear case *)
(* Given a derivation D on k[t] and a,b,qi,... ,qm ^ k[t] with deg{Dt) > 2
and a ^ 0, return n G Z such that deg(g) < n for any solution c i , . . . , Cm G
Const(Ä:) and q G k[t] of aDq + hq = f^i ciqi. *)
da ^ deg(a), 4 ^ deg(6), (ic ^ maxl<^<m(deg((?^))
6 <— deg(Dt), A ^- lc(I}t), n ^- max(0, (ic — max((ia + 5 — 1, <ib))
if (ib = c^a + 5 — 1 t h e n (* possible cancellation *)
s<--lc(6)/(Alc(a))
if s G Z t h e n n ^ max(0, s, dc — (ib)
return n
a V ] Q(zi — Dri) + a D r + br
i=l
i=l
m m m
a
0 0 \ /
0 0 c,
\C2
2 -1
which has t h e 1-dimensional solution space (ci, C2) = (A, 2A). Since Dp — 0 has
the 1-dimensional solution space p = c for any c G Q, we get the 2-dimensional
solution space
{q ~ ßt — Xx'^^ ci = A, C2 = 2A)
of (7.34). Given the formal definition of the parametric Risch differential equa-
tion problem, this solution space is represented by g = dihi -\- 0^2/12 where
hi = t^ h2 = x^ and
/Cl
2 -1 0 0 \ \c, = 0.
1 0 0 ij
\d2
7.1 The Parametric Risch Differential Equation 233
T h e Non-Cancellation Cases
i=l
Suppose that 6 7^ 0, and that either D = d/dt or deg(6) > max(0, (5(t) — 1).
Then, for any solution q = y^f^-j-.. .-\-yo G k[t] of (7.16), Lemma 6.5.1 implies
that deg{Dq + bq) < n + deg(5) and equating the coefficients of t^+^®s(fc) on
both sides yields
m
lc(6) y„ = ^ ci coefficient(gi, ^+'^''^(6)) _
we get
m m m
^ Cibsir^r + bh = ^ Ciqi
i=l i=l i=l
which is equivalent to
m
which is an equation of the same type as (7.16) with the same b as before.
Hence the hypotheses of part (i) of Lemma 6.5.1 are satisfied again, so we can
repeat this process, but with a bound of n — 1 on deg(/i). Note that although
b remains the same, the right side of (7.16) changes at every pass, so we must
recompute the g^'s that appear in (7.17). The bound on deg(g) will decrease
at every pass through this process, guaranteeing termination. After finishing
the case n = 0, we get that any solution q G k[t] of the initial equation with
deg(g) < n must be of the form q = Yl^i ^i^i where hi — Xl?=o ^^3^^ ^ ^W-
Replacing q by that form in (7.16) with the original g^'s yields
/I 0 -1 0 0 \
0 0 0 -1 0
(7.18)
Vo 0 1 0 ••• "•- 0 - 1 /
is concatenated to the b o t t o m of A, as well as a zero block to its right. T h e
final system of linear constraints is then A{ci^..., c ^ , < i i , . . . , dmY' = 0.
ParamPolyRischDENoCancell(6,
(* Parametric Poly Risch d.e. - no cancellation *)
A 0 -1 0
\o 1 0 ^1
So the algorithm returns the above matrix, /i2 = 1 and
N
W h e n d e g ( 6 ) is S m a l l E n o u g h
nX{t)yn = ^c,coefficient(g,,r+'^(*^-^).
n A(t)
we get
m
which is an equation of the same type as (7.16) with the same h as before.
Hence the hypotheses of part (ii) of Lemma 6.5.1 are satisfied again, so we can
repeat this process, but with a bound of n — 1 on deg(/i). Note t h a t although
h remains the same, the right-hand side changes at every pass, so we must
recompute t h e g^'s t h a t appear in (7.19). The bound on deg(g) will decrease
at every pass through this process, until we reach n = 0, i.e. we are looking
for solutions q = yo e k. At this point, the algorithm proceeds differently for
deg(6) > 0 and for b E k.
coefficient (g^,t^^s(^))
lc(6)
This imphes t h a t any solution q e k[t] of the initial equation with deg(g) < n
must be of the form q = J^^i ^i^i where
n
j=o
3=1
j=l i=l
ParamPolyRischDENoCancel2(6,gi,. ..,qm,D,n)
(* Parametric Poly Risch d.e. - no cancellation *)
for i ^— 1 t o m d o /ij ^— 0
while n > 0 do
for 2 ^- 1 t o m d o
Si^ coefficient(gi,r+'^-^)/(nA)
hi^hi + Sif, qi^qi- D{sir) - bsir
n -^— n — 1
if deg(6) > 0 t h e n
for i ^- 1 t o m do
Si^ coefficient(gi,t^"s(^))/lc(6)
hi ^~ hi -\- Si, qi ^ qi — Dsi — bsi
if q^ =z , _ = q^ = 0 t h e n dc < 1 else dc ^ mdiXi<i<m{deg{qi))
for i ^ 0 to dc do for j -^- 1 t o m d o Mi^ij 4— coefficient(gj,f)
{A,u) ^ C o n s t a n t S y s t e m ( M , 0 ) (* li = 0 *)
Ueq ^^ n u m b e r of rows (A)
for i ^ 1 t o m d o Ai-^n^gA ^ 1^ A^-^-neg,m+^ < 1
r e t u r n ( / i i , . . . ,hm,A)
else (* 6 G A; *)
(/i, ...Jr,B)^ P a r a m R i s c h D E ( 6 , g i ( 0 ) , . . . ,gm(0))
if gi = . . . = Qm = 0 t h e n
if Dfi + hfi = ... = Dfr + bfr = 0 t h e n 4 < 1 else <ic <- 0
else dc ^ maxi<i<m(deg(gi))
for i <— 0 t o c?c d o for j <— 1 t o m d o Mi-^ij ^- coefficient(gj,t*)
for j ^ 1 t o r d o Mij+rn < Dfj - bfj
{A,u) ^ C o n s t a n t S y s t e m ( M , 0 ) (* li = 0 *)
A ^— AU B (* vertical concatenation *)
(* Add the constraints Cj — e^ = 0 for 1 < i < ?n *)
Ueq ^- n u m b e r of r o w s ( ^ )
for i ^ 1 t o m d o Ai-^neq,i ^ 1, ^ i + n e g , m + r + i < 1
r e t u r n ( / i , . . . , /^, / i i , . . . , / i ^ , A)
1. (5 = 0, A - : 1, /ii = 0
2. 5i = 2/2 = l^hi= t2, gi = 0, n = 1
7.1 The Parametric Risch Differential Equation 239
3. si = 0, hi =t^, qi=0,n = 0
4. 5i = 0, /ii = t^, gi = 0, n = - 1
At this point, since b e k, we recursively find the solutions y G k of Dy = 0.
This returns fi = l and the linear constraint di = X^ i.e. B = {1 —1 )• We
then have
1. gi = Dfi — 0 so dc = —1^ hence M and A are 0 by 0 matrices
2.A = AUB = {1 -1)
3. Ueq = 1
4.
^~\1 0 -1
So the algorithm returns the above matrix, / i = 1 and hi — t^. T h e general
solution of (7.11) is p = di -i- eit^ where
0.
Going back to example 7.1.1, Since we had (ci, 02,03) = (A, —3A,--2A), the
general solution of (7.9) is p = di + eit^ where
3 1 0 0 0 \ / ^ ^ \
C2
I 2 0 1 0 0
= 0.
1 0 0 - 1 0 C3
\1 0 0 0 -1
\ej
Since the above constraints imply t h a t di = ei — ci, the general solution can
also be simplified t o p = c i ( l 4-1^) subject to the constraints (7.10).
coefficient(gi,t"+*(*)-i)
ek, (7.21)
nA(t)+lc(6)
240 7 Parametric Problems
we get
m
3=0
Replacing q by that form in (7.16) with the original g^'s yields
m
^ Ci{qi - Dhi - bhi) = 0 .
i=l
where
n
hi= Y^ Sijt^ Gk[t].
j = l-lc{b)/X{t)
Replacing q by that form in (7.16) with the original g^'s yields
m r
Y, cMi - Dhi - bhi) - J2 '^i^^fi +bfj)=0.
7.1 The Parametric Risch Differential Equation 241
j=i i=i
T h e Cancellation Cases
T h e Liouvillian Case
If D ^ d/dt and Dt G k or Dt/t G k^ then S{t) < 1, so the only case not
handled by Lemma 6.5.1 is b E k. Then, for any solution q = ynt^ + . • • +2/o ^
k[t] of (7.16), Lemma 5.1.2 implies that deg{Dq -\-bq) < n and equating the
coefficients of t^ on both sides yields
m
Dyn + byji = \ ^ Ci coef!icient(g4, t^) (7.22)
i=i
if Dt Gfc,and
if Dt/t G k. Both (7.22) and (7.23) are parametric Risch differential equations
of type (7.1) over k. Assuming that we can solve such problems over k^ we
obtain / i ^ , . . . , frn.n ^ ^ and a matrix An with coefficients in Const(A:) such
that yn is of the form
242 7 Parametric Problems
^ ^ ^^ / ^ ^jnjjn
3=1
which is an equation of the same type as (7.16) with the same b as before.
Hence, we can repeat this process, but with a bound of n — 1 on deg(/i). Note
t h a t although b remains the same, the right side of (7.16) changes at every
pass, so we must recompute t h e g^'s t h a t appear in (7.22) or (7.23). Note also
t h a t the number of undetermined constants in the right side increases at each
step. The bound on deg(g) will decrease at every pass through this process,
guaranteeing termination. After finishing the case n = 0, we get t h a t any
solution q ^ k[t] of the initial equation with deg(g) < n must be of t h e form
n Ti
g= ^ ^ djihji where hji = fjif . (7.24)
i=0 j = l
i=l i=0 j = l
T h e Nonlinear Case
If 6{t) > 2, then we must have deg(6) = 6{t) — 1 and lc(6) = —nX(t) where
n > 0 is the bound on deg(g). As in the nonparametric case, there is no general
algorithm for solving equation (7.16) in this case. If however S^^^ ^ 0, then
projecting (7.16) to ^[t]/(p) for p G S^^^ can be done as in the nonparametric
case. Since ^[t]/(p) is a finite algebraic extension of A:, Const(A:[t]/(p)) is a
finite algebraic extension of Const(/c) by Corollary 3.3.1, so let 5 i , . . . , bg be a
vector space basis for Const(/c[t]/(p)) over Const(A;). Now, with D* being the
induced derivation on A:[t]/(p), we get
m
D*g* + 7rp(6)g* = ^ Ci^p(g,) (7.25)
7.1 The Parametric Risch Differential Equation 243
where hji = bihj G k[t]/{p). For each j and /, let rji G k[t] be such that
deg(r^7) < deg(^) and 7Tp{rji) = hß, and let
r s
j=i 1=1
We have deg{u) < deg(p) and (7.26) implies that 7rp{q) = 7Tp{u), hence that
h = {q ~ u)/p e k[t]. Replacing q hj ph ^ u in (7.16) we get
Write now qi = pq~ + qi and DTJI + bvji = prj! + fj] where g^i,f7i G Ä:[t],
deg(g^) < deg(p) and deg(fj]) < deg(p). The right hand side of (7.27) becomes
so (7.27) becomes
FJ \ ^^ r s
Dh
^ ^ i=l 3 = 1 1=1
which is an equation of type (7.16), but with a lower bound on the degree of
its solution. Repeating this process until the lower bound becomes negative,
and grouping all the linear constraints obtained at each step yields a complete
solution of the initial parametric problem.
The remarks made in the nonparametric case about when (7.25) can be
solved, for example when we can find an element of degree one, or an element
with constant coefficients, in S^^^, remain valid in the parametric case.
T h e H y p e r t a n g e n t Case
has a solution v E K^ and to find one such solution if there are solutions. As
we have seen in Chap. 5, this problem arises from integrating polynomials in
primitive extensions. There are several possible approaches to this problem:
^In [75], Risch only has the following remark about the hypothesis that we
can integrate elements of k: ^ ' . . .we assume t h a t the simpler v a r i a n t s , which
occur when some of the Ci and Vi are given, have been e s t a b l i s h e d . ' \
246 7 Parametric Problems
Theorem 7.2A, Let v^ f^wi,... ,Wm G k(t) and ci^... ,Cm € Const(Ä:) be
such that f = Dv + ciwi -|- . . . -f Cm^m- Let d = dgdn he a splitting fac-
torization of the denominator of f, and e^ = es^iSn^i be splitting factor-
izations of the denominators of the wi^s. Let c = lcm((in, e^,i,. • •, en,m);
/is = lcm(4,es,i,...,es,m); and
K = gcd [c, I
Then,
(i) vhn ek{t),
(ii) IfS'f"^ = 5^^^ then vh^hs G k[t].
(Hi) If t is nonlinear or Liouvillian over k, then either i/ooi^) = 0 or
Proof, (i) Let q = vhn G k{t). In order to show that q G k{t)^ we need to
show that Typ{q) > 0 for any normal irreducible p G k[t]. We have z^p(g) =
h'p{v) + iyp{hn) by Theorem 4.1.1. If I'piv) > 0, then z^p(g) > i^p{hn) > 0 since
hn G k[t]. So suppose that n — Vp(y) < 0 and let w = ciWi-{-.. . + c^t(;^. Then
h'p{Dv) = n — 1 by Theorem 4.4.2, so Vp{f — w) = n — 1^ which implies that
^p{f) < n — 1 01 Up{wi) < n — 1 for some i. Hence p^~^ \ c, so i^p(c) > 1 — n,
which implies that i'p{hn) — Vp{c) — \ > —n, hence that z/p(g) = n-{-Up{hn) > 0.
(ii) Suppose that Sf^ = S^^^ and let q = vhnhg G k{t). Since hs E k[t] C kit).,
and we have from (i) that vhn G k{t), we get that q G k{t)^ so in order to
show that q G A:[t], we need to show that i'p{q) > 0 for any q G S^^^. We
have iyp{q) = I'piy) + Vp{hn) + i^p{hs) by Theorem 4.1.1. If i'p{v) > 0, then
I^P{Q) ^ ^p{hn)-^^p{hs) > 0 since h^ hs G k[t]. So suppose that n = i'p{v) < 0
and let w = ciWi + ... -\- CmW^i- Since Sf^ = S^^^^ p G Sf^, so i/p{Dv) = nhj
7.2 The Limited Integration Problem 247
Theorem 4.4.2, so z^p(/ — w) = n^ which implies that z/p(/) < n or Vp{wi) < n
for some i. Hence p~'^ \ hs^ so Vp{hs) > —n, which implies that
Proof, (i) Let v G k{t)^ c i , . . . ,Cm be a solution of (7.30), and let q — vhn-
q e k{t) by Theorem 7.2.1, and
248 7 Parametric Problems
. n , V^ ^<? Dhn . ^
f = Dv^ 2__^ CiWi = Q-j;2~ + 1^ ^^'^^ -
^ Dp Dhn Dhs , ^
J = Dv^y CiWi = — — - P T Ö I - - P-r-r2 + Z ^ ^^^^ •
L i m i t e d I n t e g r a t e R e d u c e ( / , w;i,..., WmyD)
(* Reduction to a polynomial problem *)
Example 7.2.1. Let k = Q(x) with D = d/dx and let t be a monomial over
k satisfying Dt = 1/x, i.e. t = log(a:), and consider the limited integration
problem
^=Dv + cr^ (7.33)
Example 7.2.2. Continuing example 7.2.1, let k = Q{x) with D = d/dx and
let t be a monomial over k satisfying Dt = 1/x, i.e. t = log(x), and consider
the solutions q G k[t] with degree at most 1 of (7.34). Solving t h a t equation is
equivalent to finding a solution with CQ = 1 of the parametric Risch differential
equation
tDq q = CQX •— cixt.
X
{q = jit — Xx , Co = A, ci = 2A).
xdx x^
+ 2Li(a:2).
/ log(x)2 log(a:;
/ Dv ^ DO
nf = -—+m-— (7.37)
V U
has a solution v E K^ and to find one such solution if there are solutions.
As we have seen in Chap. 5, this problem arises from determining whether
elements of K{9) are logarithmic derivatives of elements of K{0) or logarithmic
derivatives of K(ö)-radicals. We can thus assume t h a t we are able to determine
recursively whether elements of K are logarithmic derivatives of if-radicals.
Even though equation (7.37) is very similar to (7.30), the limited integration
algorithm of Sect. 7.2 is not directly applicable to this problem. However,
because the unknown constants are restricted to be integers, the structure
7.3 The Parametric Logarithmic Derivative Problem 251
Lemma 7.3.1. Let u^v^w E k{t) and c^c E Const(A:) be such that v j^ 0,
c yi^ 0, and
u=c \-cw . (7.38)
V
Write u — p -{- a/d and w = q + h/e where p^ g, a, 6, (i, e G k[t], d ^ {), e / 0^
gcd(a,(i) = gcd(5, e) = 1^ deg(a) < deg{d) and deg(6) < deg(e). Then,
f Dv\ fDv\ ^
Up[u — cw) = Vp I c—- \ = Up I I > 0
f-Dv\ fDv\
i/p{u — cw) = Vp f c — j = z/p I I > —1
252 7 Parametric Problems
since p \ In- Since this holds for every irreducible factor of ^~, l~ \ lu — clw.
Finally, lsl~ \ lu — clw since gcd(^5,^~) = 1. D
Given u^w E k{t)^ Lemma 7.3.1 either proves t h a t (7.38) has no solution
V e k{t) and c^c G Const(Ä:), or it yields a unique candidate c G Const(Ä:) for
the solution in the following cases:
® If deg(g) > max(0, S{t) — l): then equating all t h e terms ofp — cq of degree
higher t h a n max(0, S{t) — 1) to 0 yields an over deter mined linear algebraic
system for c. If this system has no solution in Const(/u), then (7.38) has
no solution, otherwise we get a unique candidate for c.
® If deg(p) > max(0,(5(t) — 1) > deg(g): t h e n (7.39) is never satisfied,
so (7.38) has no solution.
® If deg(^s/^) > 0, let then r G k[t] be the remainder of lu — clw modulo
Isln- If ^ is identically 0, then lu = Iw (mod /s^~), which implies t h a t
l^u G k[t] and l^w G k[t] where l^ is the squarefree part of Z^, hence t h a t d
and e are normal, in contradiction with deg(/5^~) > 0. Therefore r is not
identically 0, so equating all its coefficients to 0 yields an overdetermined
linear algebraic system for c. If this system has no solution in Const(fc),
then (7.38) has no solution, otherwise we get a unique candidate for c.
if D t Gfc,in which case we are reduced to solving a similar problem over fc,
or V must be of the form v = wt^ for w e k* and an integer q if Dt/t e k. In
t h a t latter case, we are reduced to solving an equation of the form
Dw DO Dt
nDg = + m - — + q-- 7.40)
w 9 t
where b o t h 0 and t are exponentials over k. Lemma 7.3.1 can be generalized t o
an arbitrary number of w^s (Exercise 7.1) and applied to (7.40). This process
stops when we reach the constant field, since Dw = 0 at t h a t point, and (7.40)
becomes a linear algebraic equation with integer unknowns. In practice how-
ever, it is preferable to use the structure theorems if Lemma 7.3.1 fails t o
produce c the first time around.
P a r a m e t r i c L o g a r i t h m i c D e r i v a t i v e ( / , 0, D)
(* Parametric Logarithmic Derivative Heuristic *)
5t2_|_t-6 Dv DO ,^^^,
^•^ ^ tx xH
so (7.41) has the solution n = 2iV = 2, m = 2M = 6 and K = xH. Note that
it has in fact no solution with n and m coprime.
for m G Z and v G k{t). Even though this problem is trivial, it arises from
bounding the degree in 0 of the solutions q G k{t)[0] of
,^ X r. / 9 X 234662231 1255151
(^ + 2t + 1)D, - (llt^ + 22. + 10), = - ^ ^ ^ ^ t + ^ ^ ^ (7.43)
Despite its triviality, (7.42) is not solved by Lemma 7.3.1 because both 11 and
DO/Q do not involve t. Since t is a primitive over k, (7.42) has a solution with
V G k{t) if and only if it has a solution with v G k. Kt this point, Dv = 0,
so (7.42) becomes 11 — TTI^ whose solution yields the degree bound 11 on the
solutions of (7.43). There happens to be a solution of degree 11, and the above
integral is an elementary function.
The structure theorems of Chap. 9 provide an efficient alternative to solv-
ing (7.37): suppose first that / has an elementary integral over K^ which turns
out always to be the case in the parametric logarithmic problems that arise
from the integration of elementary functions. Let then F be an elementary
extension of K{9) and g E F he such that / = Dg. Then, if (7.37) has a
solution with n 7^ 0, we get
, Dv De DivO"^)
nj = —V + m- U — VU'"
Exercises
Exercise 7.1. Prove the following generalization of Lemma 7.3.1: let ^ be a
differential field of characteristic 0, t be a monomial over k with Const(A;(t)) =
256 7 Parametric Problems
Const (/c), V^WQ^ ... ,Wn £ k{t) and c i , . . . , c^, c G Const (A:) be such t h a t v ^ 0^
c 7^ 0, and
Wo = C h > CiWi .
V ^-^
Write Wi — pi^ai/di for 0 < i < n where pi^ai^di G /c[t], <ii ^ 0, gcd(a^, d^) =
1 and deg(a^) < deg((i^). Then,
has a solution in K x K, and to find one if there are some. It turns out
that (8.1) is not really a second order equation, but the coupled system for
the real and imaginary parts of a Risch differential equation. Indeed, suppose
that {yi^y2) E K X K is Si solution of the slightly more general system
Conversely, if y/a ^ K and y = y-^ -\- y2y^ satisfies (8.3) for ^1,2/2 ^ K^ then
the above calculation shows that
hence that Dyi + fiyi 4-a/2?/2 = 9i and i^2/2 + /2?/i 4-/i?/2 = ^2, since {1, y^}
is a vector space basis for K{^/E) over K. Therefore, (2/1,^2) is a solution
258 8 The Coupled Differential System
ah qi
(8.4)
Dq2 + .12
ui au2 (8.5)
U2 Ui
so Dp = D{uq) = liDg + ^Dti = uDq + ii6g == u{Dq H- 6g) = i^c. This implies
that (8.4) becomes
f Dpi\ ^ fui au2\ / c i \
\Dp2J \U2 Ui J \C2j
which is, as earlier, a pair of integration problems in k[t]. The change of
variable (8.5) is invertible since
Ul CLU2
aun (Ui + U2y/ä){ui ~ U2\fa) ^ 0 .
U2 Ui
(DyA (h ab2\fyi\_fz,
\Dy2j^\b2 h ) \ y 2 ) \z2
which is a coupled differential system in k. If it has no solution in k^ then (8.4)
has no solution in k\t]. Otherwise, since it is equivalent to (6.23), Lemma 5.9.1
implies t h a t it has a unique solution y 1,2/2, which must be the coefficients of
f^ in qi and ^2- Replacing each qi by yif^ + hi in (8.4), we get
C o u p l e d D E C a n c e l E x p ( a , bi,b2,ci,C2, D,n)
(* Cancellation - hyp er exponential case *)
If S{t) > 2, then t h e only cancellation case for (8.4) is max(deg(öi), deg(62)) =
6{t) — 1 and lc(6) = —nX{t) where n > 0 is the bound on deg(g). Since
lc(6) = ßi -\- ß2\/ä where ßi and /?2 are the coefficients of t^^^'^~^ in bi and 62,
and A(t) E k^ we must have ß2 = 0 and ßi = —nX{t), i.e. deg(6i) = 6{t) — 1,
deg(62) < S{t) — 1 and lc{bi) = —nX{t). As in the Risch differential equation
case, there is no general algorithm for solving the system (8.4) in this case. If
however S^^^ / 0, then projecting (8.4) t o k[t]/{p) for p E S^^^ can be done:
with D* being the induced derivation on k[t]/{p), applying Tip to (8.4) we get
-pyiDhJ +i b, 6i + p
^JU2
which is a coupled system of type (8.4), but with a lower bound on the degree
of its solutions since deg(/ii) < deg(gi) — deg(p) and deg(/i2) < deg(g2) —
deg(p).
As was the case for Risch differential equations, there are cases when (8.7)
can be solved, for example when we can find an element of degree one, or an
element with constant coefficients, in S^^^. Although y ^ ^ k{t), it may happen
t h a t ^y7^p{a) G k[t]/{p), in which case two new difficulties arise:
264 8 The Coupled Differential System
(6.25) becomes
where the right hand side is an exact quotient in k{\/'^)[t]. Repeating this
process we either prove t h a t (8.4) has no solution in k[t], or obtain a solution
q e k{^/^)[t] of (6.19). Writing q = Qi + q2V^ with qi,q2 £ k[t], we get
t h a t gi,g2 is a solution of (8.4).
T] ^ Dt/{t^ + 1) (* t = t a n ( / 77) *)
c i ( v ^ ) + C 2 ( \ / ^ ) \ / ^ = ^1 + 2 ; 2 \ / ^ (* 2:1,2:2 G A; *)
(51,52) <— CoupledDESysteni(6o,62 — n?7, ^1,2:2)
if (si,S2) — "no solution" t h e n r e t u r n "no solution"
c ^ (ci - zi-{- nr}{sit + S2) + (c2 - 2:2 + nri{s2t - Sl))^/-i)/p
c = <ii+c?2V^ {^ di, d2 e k[t] ^)
(/ii,/i2) ^— CoupledDECancelTan(6o,62 + ?7, cii,c?2, D , n — 1)
if (/ii,/i2) = "no solution" t h e n r e t u r n "no solution"
r e t u r n ( / i i t + /12 + 5i, /12t — /ii + 52)
Example 8.4-1- Let A: = Q(x) with D = d/tix, and let t be a monomial over k
satisfying D t = 1 + 1 ^ , i.e. t = t a n ( x ) , and consider the coupled system
lc(6)
2 > deg(c) - deg(6)
lc(a)
2. T] = Dt/lt^ + 1) = 1
3.
c i ( v ^ ) + C 2 ( V ^ ) A / ^ = 2(1 - 4^2) + 4(1 - x ) v ^
so zi == 2(1 - 4x^) and Z2 = 4(1 ~ x)
4. Since
(DsA ( 0 2(l-2x)\ / 5 i \ /2(l-4x2)
VD.2;'^ V2(2x-i) 0 ; 1^2; V 4(1-x)
has the solution si = —1 and S2 = 2x + 1,
(si,52) = C o u p l e d D E S y s t e m ( 0 , 4 x - - 2 , 2 - 8 x 2 , 4 - 4 x ) = ( - l , 2 x + l)
5.
t2-2(2x + l ) t v ^ ~ 4 x - l ,^ ^, r-T
c= ^ ^-j=—— = - t + (4x + 1 ) \ / ^
so di = —t and d2 = 4x -\-l
8.4 The Hypertangent Case 267
and the latter integral does not involve tan(x2) anymore. Applying the algo-
rithm of Sect. 5.10 to it, which involves solving a coupled differential system
over Q(x), we find
We present in this chapter proofs of the various structure theorems that were
used in Chap. 7 for solving the parametric logarithmic derivative problem.
Although they are used in the integration algorithm, the main application of
structure theorems is to determine algebraic dependencies between functions.
Proof The proofs are similar t o the proofs of the corresponding statements
in Theorem 3.1.1 and are left as exercises. D
d{x -\- y) = dx -\- dy^ d{xy) = xdy + ydx for all x^y G R
Proof. Since ^R is a free Ä-module, let D : <^R —> M be the i?-linear map
given by D{6x) = Dx for all x G R. Since D is an 5'-derivation, D{6c) = Dc =
0 for all c E S. Furthermore, D{6{x -{-y) — 5x — 6y) = D{x + 2/) — Dx — Dy = 0
and D{S{xy) — x6y — yöx) = D{xy) — xDy — yDx = 0 for any x^y G -R,
which implies that ^R/S Q kerD, hence that D induces an i?-linear map
D : ÜR/S -^ M. For any x £ Rwe have Ddx = D5x = Dx, so D = Dd.
Suppose that Di and D2 are both i?-linear maps from QR/S into M such
that D = Did = D2d. Then, since any uj G f^R/s is a finite sum of the form
LÜ = J2i didxi with ai^^Xi G ß , we get by linearity of Di and D2 that
Q R/S-
aT/S'^
r^aiSxA =Y,a15{x1)
for all finite sums with ai^Xi E R. W is well-defined since $R is free over R.
Furthermore, W is an abelian group homomorphism by definition. Since a is
a homomorphism, 1^ = 1, so aS = Öa. In addition we have {6cY = S{c^) G
^T/S'^ for all c G /S. Furthermore,
and
for any x^y e R^ which implies that {^R/SY ^ ^T/s^i hence that ä induces
an abehan group homorphism a* : ÜR/S -^ ^T/S^ that satisfies
{Ta^dxA =^<d«).
Suppose that ai and (J2 are both maps from OR/S into ÜT/S^' that satisfy the
lemma. Then, since any a; G ^R/S is a finite sum of the form u = J2i ^idxi
with tti^Xi e R, we get
UJ '^=Y.a^d{ X, = UJ-
D*
Ü R/S' ^ ^R/S
R R
D
for all finite sums with ai^Xi £ R. D is well-defined since $R is free over R.
Furthermore, D is an abelian group homomorphism by definition. Since D is
a derivation, Dl = 0, so D5 = 6D. Since 5 is a differential subring, DS C ^S',
so D{5c) = 5{Dc) G ^R/s for all c G 5. Furthermore,
and
D{6{xy) — x6y — ySx) = 6D{xy) — {Dx)6y — x5Dy — {Dy)6x — yÖDx
= 6{xDy + yDx) — 6{xDy)
+ {6{xDy) - {Dx)6y - x5Dy)
-6{yDx) + {6{yDx) - {Dy)Sx - y5Dx)
= {6{xDy + yDx) - 6{xDy) - 6{yDx))
+ {S{xDy) - {Dy)6x - xöDy)
+ [S{yDx) - {Dx)6y - y5Dx) G ^R/S
for any x,y e R^ which implies that D^R/S ^ ^R/S^ hence that D induces
an abehan group homorphism D* : QR/S —^ ^R/S that satisfies
Suppose that Di and D2 are both maps from QR/S into i7ß/5 that satisfy the
lemma. Then, since any u G OR/S is a finite sum of the form uo = ^ ^ a^dx^
with ai^Xi G i?, we get
= ^ ( I ^ a i ) d x i 4- aiD2{dxi) = D2UJ
i
i=l *
R{d{S{B))) C R{d{B)).
We now determine the dimension of QR/S over R when R and S are fields.
L e m m a 9.1.5. Let k C K be fields of characteristic 0 and B C K be alge-
braically dependent over k. Then, {db}b^ß is linearly dependent over K.
Proof. Since B is algebraically dependent over A:, there a r e i C ] ^ , . . . , Xfi € B and
a polynomial P € k[Xi,..., Xn] \ {0} such that P ( x i , . . . , Xn) = 0. Let Q be
a nonzero polynomial with coefficients in k and of minimal total degree such
that Q ( x i , . . . ,Xn) = 0. Applying d and Theorem 9.1.1 we get
0 = dO = dQ{xi,...,Xn) = y^ ^^{xi,...,Xn)dxi.
( m \ 771
dx = — y —daj
a
j=0
is in t h e subspace of Ox/k generated by d a o , . . . , da^^ hence in t h e subspace
generated by d{k{B)). By Lemma 9.L4, this implies t h a t dx is in the sub-
space of Ox/k generated by {db}h£ß. Since this holds for any x G K , {db}beB
generate Ox/k-
Suppose t h a t X]?=i ^jdxj = 0 for some a i , . . . , a^ G K and xi^... ^Xn G B.
Since B is algebraically independent over /c, d/dxi^..., d/dx^ are derivations
on A:(B) by Theorem 3.2.2. Those derivations can be extended t o derivations
of K by Theorem 3.2.3. Since k C ConstDi{K), each d/dxi is a fc-derivation
of K into K , so let D i , . . . , Dn be the induced ÜT-linear maps from Ü^/k i^^o
i f given by L e m m a 9 . L I . Applying Di and Lemma 9 . L I we get
and
D{xy)dt = d{xy) = xdy + ydx = {xDy)dt + {yDx)dt
for any x^y G K^ which implies that D is a derivation on K. Since Dc = 0
for any c e k and Dt = 1, we have D = d/dt by unicity of the differential
extension. D
Let k C K C L he fields of characteristic 0. The restriction to K of
the /c-derivation di/}. : L -^ i^L//c is a A:-derivation of K into Oi/k^ so by
Lemma 9.LI, it induces a K-linear map d : Ox/k "^ ^L/k such that d^/k =
d dx/k' Let B be a transcendence basis of K over k. Then, {dK/k^}b£ß is a
basis of ÜK/k over K by Theorem 9.1.2. In addition, {dLikb}heB is linearly
independent over L by Corollary 9.1.1. Since d d^/k^ = ^L/fc^ foi" ^W b G B^
this implies that d is injective, hence that it is an embedding of Ox/k into
^L/k-
Proof. Let K be the algebraic closure of K and cJi,..., cr^ be the distinct
embeddings of E in K over K. Note that k^'^ = k for each i since ai is
the identity on A:, so let a* : Üß/k ~~^ ^'K/k ^^ ^^^ induced map given by
Lemma 9.L2. Define Tr* : Üß/k ~^ ^~K/k ^^ -^^* ~ Y^l=i ^i • ^i^^^e a^ is the
identity on K^ a* is a K-linear map by Lemma 9.L2, so Tr* is if-linear. We
have
n n / ^ \
Tr*{da) = Y^{da)< = ^ c ^ ( a ^ ' 0 = ^ 1 X^a^M = d{Tr{a))
i=i
for any a G E*. Let >B be a transcendence basis for K over k. Then, {db}beB
is a basis for Ox/k over if by Theorem 9.L2. But E is algebraic over if, so ;B
is a transcendence basis for E over k and {db}beB is a basis for üß/k over E
by Theorem 9.1.2. Write then u G i^^;//^ as a; == YlbeB^^db where the üb are
in E and only finitely many of them are nonzero. Then,
n n
which is in the image of O^/k under the natural embedding Oj^^k ~^ ^l</k^
so Tr*{ÜE/k) Q f^K/k- •
L e m m a 9.2.2. Let k C K be fields, v e K, 1^1,...,^^ ^ if*; c i , . . . , Cn E k
be linearly independent over Q^ and
\-^ dui
uj = dv + 2_^Ci— eÜK/k- (9-1)
Ui
Then,
Proof. Note that Corollary 9.1.1 implies that any x G if is algebraic over k
if and only if dx = 0. Suppose first that ui^... ^Un^v are all algebraic over
k. Then, dui = ... = du^ = dv = 0 so UJ = {). Conversely, suppose that
uj — Q and that one of the i^^, say ni, is transcendental over k. Let B be
a transcendence basis of if over k containing ui and E — k(B \ {i^i}). K
is then algebraic over E{ui), so F = E{ui){u2^. •. .u^v) C if is a finitely
generated algebraic extension of E{ui). Identifying Qp/k with its image under
278 9 Structure Theorems
the embedding Qp/k -^ ^K/k mentioned at the end of the previous section,
we can consider uj and the differentials appearing in (9.1) as being elements of
Qp/k- Let Tr : F -^ E{ui) and N \ F —^ E{ui) be the trace and norm maps
from F to E(ui) and Tr"" : Op/k —^ ^E{ui)/k be the induced £'(ni)-linear
map given by Lemma 9.2.1. Applying Tr* and Lemma 9.2.1 to (9.1) we get
n ,
0 = Tr'' (0) = Tr"" (oj) = Tr"^ (dv) + Y " Q Tr* —
1=1
n J , dE(ui)/EUi ^ dE(m)/EVi
0 = dE(ut)/E^ + ^ c i —^^-^ + Z_^^i — •
^^ i=2 ^*
^ ^ i=2 ^ ^
Since ui is transcendental over E, dE(ui)/E^i 7^ O5 so the above implies that
m '^-^ Ci dvi dw
ui ^ Vi dui dui '
Note that 2x1 is a monomial over E with respect to d/dui and that ?ii is
normal and irreducible as an element of ^[t^i]. Furthermore, the left hand side
of (9.2) is simple by Corollary 4.4.2, so dw/dui must be simple too, which
implies that Uu^{dw/dui) > —1. But Vui{dw/dui) ^ —1 by Corollary 4.4.2,
so lesidiMeu^iydw/dui) = 0 by Theorem 4.4.1. Applying Corollary 4.4.2 and
residue^^j to (9.2) we get
(
n rx \ n
m ^ - ^ Ci avi \ \-y . .
ci f- > ,—-K— =mci + } Uu^{vi)Ci
where i/u^ is the order function at ui. Since m is a positive integer, the
above is a contradiction with c i , . . . , c^ linearly independent over Q, There-
fore u i , . . . , 1^^ are all algebraic over k^ so dui = ... = dun = 0, which impHes
that 0 = CO =^ dv^ hence that v is also algebraic over k. D
L e m m a 9.2»3. Let (K^D) he a differential field, k C K be a differential
sub field and D* : O^/k ~^ ^K/k ^^ the induced skew-derivation given by
Lemma 9.1.3. For any u^v G K, if u and v are algebraically dependent over
Constp(A:)^ then D*{udv) = d{uDv) in Üx/k-
9.2 Rosenlicht's Theorem 279
dP \ f dP
- — {u,v)Dv\ (-^K^)^^
f dP dP \
''(o''+i:=.^)=''(^«)+|:«.<'(^)^
Since UiU~ — 1 = 0, it^ and u~ are algebraically dependent over Consti:)(Ä;),
so d{Duj/uj) = D'^{duj/uj) by Lemma 9.2.3. In addition, d{Dv) = D*{dv)
by Lemma 9.1.3, so
280 9 Structure Theorems
Proof. Suppose that c^i,..., cj^ are linearly dependent over K. Let a i , . . . , a^
in K be not all 0, and such that X^ILi ^*^^ ~ ^ with the number of nonzero
aiS minimal over all such linear combinations. We can assume without loss
of generality that ai ^ 0, and dividing by ai if needed, that ai = 1. Applying
D* we get
n \ n n
D ^0
Dvi + 7 Cij—-^
•^ n
Gk for 1 < i < n
X-^ dUj ^
Ui = dvi + 2^ Cij — G ÜK/k •
j=i ^^
<n:ii^r^O
\i=l / 3= 1 '^i
By Lemma 9.2.2, this imphes that Yll=i ^i^i i^ algebraic over fc, and that
n r = i ^i ^'^ ^^ algebraic over k for each j . Since at least one of the m^j's is
nonzero, this proves the corollary. D
we get in a similar way that Yfi=o ^i '^ ~ Yl7=i ^i '^ ^^ algebraic over C for
each j . Since C = Constp(A"), Lemma 3.3.2 implies that n f ^ i '^i ^''^ ^ ^ ^^^
each j . Since QO / 0, m^o^ ^ 0 for some j , which proves the corollary. D
and
n ^^n «^ e^
where ti = log(a^) for i G L^/k^ then e^ = 0 for all i in Ex/k U E^/k-
If j e Lx/ki t h e n a^-^a G C, so
which implies t h a t
Proof, (i) Suppose that Da/a = Dv for some v E K. By Theorem 9.3.1 there
are r^ E Q such that
where ti = log(a^) for i E Lx/c(x)- Putting the r^'s over a common denomi-
nator e 7^ 0, we get
^. \r^ Dai \-^ Dti Du
eDb = y a h y Si —— = —
where
"= n <' n *i' ex*-
D
9.3 The Risch Structure Theorems 285
The algorithms follow from Corollary 9.3.1 and Theorems 5.1.1 and 5.1.2:
let (K^D) be given explicitely as an elementary extension of {C{x)^d/dx)
where C = Const]j{K) and suppose t h a t the sets Ex/c{x) ^^d Lx/c{x) ^^^
known (those can be computed by applying the algorithm t o ^ 1 , ^ 2 , . . . , t ^ in
t h a t order).
Let a E ÜT* and let t in a differential extension of K be such t h a t t = log(a),
i.e. Dt = Da/a. If (9.8) has a solution r^ G Q, then it provides v E K such t h a t
Dv = Da/a^ hence c = t — v G Consti^(K(t)) and K{t) = ( 7 ( c ) ( t i , . . . , t n ) .
Otherwise, Da/a is not the derivative of an element of K by Corollary 9.3.1,
so t is a monomial over K and Consti:)(iir(t)) = Const/:)(if) by Theorem 5.1.1.
Let b £ K and let t in a differential extension of K be such t h a t t = exp(6),
i.e. Dt/t = Db. If (9.9) has a solution r^ G Q, then it provides a nonzero
integer e and u E K* such t h a t eDb = Du/u, hence c = t^/u G Const]j{K{t))
and K{t) is algebraic over C ( c ) ( t i , . . . , t„) since t^ = cu. Otherwise, Db is not
t h e logarithmic derivative of a ilT-radical by Corollary 9.3.1, so t is a monomial
over K and ComtD{K{t)) = ConstD{K) by Theorem 5.1.2.
To determine whether (9.8) and (9.9) have solutions in Q, we compute
a linear system with coefficients in C and t h e same constant solutions by
L e m m a 7.1.2. Assuming^ t h a t we have a vector space basis B containing 1 for
C over Q, projecting t h a t system on 1 yields a linear system with coefficients
in Q for the r^'s.
Risch also gave a real version of his structure theorem, which is applicable
t o towers of logarithms, exponentials, arc-tangents and tangents over a real
constant field. Recall (Definition 5.10.1) t h a t t is a tangent over k if Dt/{t^ 4-
1) = Da for some a G fc. In a similar fashion, we say t h a t t is an arc-tangent
over k if Dt = Da/{a^ + 1) for some a £ k such t h a t a^ + 1 ^ 0, and t h a t t
is real elementary over k if t is either algebraic, a logarithm, an exponential,
an arc-tangent or a tangent over k. We say t h a t (i^, D) is a real elementary
extension of {k^D) if K = ^ ( t i , . . . , ^ ^ ) with each ti real elementary over
k{tiy... ^ti-i). In t h a t case, in addition to the index sets Ex/]^ and Lj^/^
defined by (9.6) and (9.7), we introduce the following index sets:
and
K{a,ß)
K{a) K{ß)
But
and
and
a^ + 1 6
and
= —- —= = — -— = i J ( 2 a v - l )
e /=T-t /=T + t ^^ + 1
288 9 Structure Theorems
and
and
We can now prove a shght generalization of the real Risch structure The-
orem to arbitrary constant fields.
T h e o r e m 9.3.2 (Risch [77]). Let C he a field, x he transcendental over C,
and (K^D) he a real elementary extension of{C{x)^d/dx) with Consta) (if) =
C and \ / ^ ^ K. Write K = C ( x ) ( t i , . . . ,t^) with each ti real elementary
over C{x){ti,...,ti__i), and let EK/C{X), LK/C{X), TK/C{X) and AK/C{X) be
given by (9.6), (9.7), (9.10) and (9.11) respectively.
(i) If there are v G K and u E ilT* such that Dv = Du/u, then there are
ri £ Q such that
y^ X] ^^^^ ^ X] ^^^^ ^ ^
^^LK/C(X) ^^EK/C{X)
hence that
i£LK/c(x) *€£^K/c(x)
i^LE/F{x) i^EE/F{x)
I£EK/C{X) f'^TK/cix)
290 9 Structure Theorems
DU
Dv+ Yl ^iDU+ Y.
'tf + 1
hence t h a t
^ -c-^ Dti Db /^ . .X
E
nDu+ Y. . , - ^ = ^-_-. (9.14)
i€Ai^/C(x) *GTx/C(a;) *
(iv) \/~lDb is the logarithmic derivative of a K(y^^^)-radical if and only if
there are r^ G Q such that
ieAK/dx) i^Tx/dx) *
Proof. T h e proofs of parts (i) a n d (iii) are similar t o t h e proof of part (i)
of Corollary 9.3.1, using Theorem 9.3.2 instead of 9.3.1, while t h e proofs of
part (ii) is similar t o t h e proof of part (ii) of Corollary 9.3.1.
(iv) Suppose t h a t n\/^Db = Dw/w for some integer n 7^ 0 a n d w in
i i r ( \ / ^ ) * , and write w = y -{- z\PÄ. where y,2; G ÜT. If y = 0, t h e n z 7^ 0
and Dw/w = Dz/z = ny^^^Db^ which implies t h a t Dz = Db = 0, hence
9.3 The Risch Structure Theorems 291
that (9.15) is satisfied with r^ = 0 for each i, so suppose from now on that
y ^ 0. We then have,
^- Dw Dy-\-^f^Dz yDy + zDz yDz - zDy r--
nV-lDb = = • j=^- = + V^l
w y + zy —1 y^ + 2^ y^ + z^
so yDy + zDz = 0, which imphes that c = y'^ + z"^ G C*. Let then W = w'^/c
and
1 — W I—- c — w ^^-j^ c-y^^z^-2yz^ri r-i
u — -—iV—1
1+ W
1 + yz z2;\/^4-2/ z
y'^-^yzy^-l yy-^z^-1
-eK.
y
We have W = ( \ / ^ — u)/{y/^ + -u), so by Lemma 5.10.1,
Du DW Dw Dc ^ r—r..
u^ -\-l W w c
which imphes that nDh = Du/{v? + 1). By Theorem 9.3.2 appHed to t' = nh,
there are r^ G Q such that
n6 + ^ Titi + ^ r^a^ € C
K/C(x)
where
^= n ^' n ^r^ eif(v^r. (9.16)
G
292 9 Structure Theorems
v^=T + t
and
c=-GKw-mr.
w
Using L e m m a 5.10.1 we get
Dc D0 DW ^ r—- Dt ^ r-~^^ ^
— = e— = 2eV^- 2ey^Db =0
c 9 w t^ + 1
where
— ^ = c(5ij
cdi^ — h' y^
^ TTiij
- ^ = c5ijDv + 2 ^ rriijDvi = Dt/^ (9.18)
for each j , so
Applying the trace from E = k{w^ z i , . . . , z^) into k and Theorem 3.2.4, we
get
where Tr and N are the trace and norm maps respectively. Since Dt has no
elementary integral over k by hypothesis, the above implies t h a t CQ = 0, hence
t h a t w = ^ ^ ^ 1 bjyj is algebraic over k. Let F = E{y2^..., yr)- Since each yj is
either a logarithm or algebraic over E by (9„18), F is elementary over E, hence
9.4 The Rothstein-Caviness Structure Theorem 295
The proof and corresponding algorithms are exactly the same than for
Corollary 9.3.1 and the algorithms following it. In the cases arising from the
integration algorithm, we can always ensure that the differential field con-
taining the integrand is a log-explicit Liouvillian extension of its constants by
applying recursively the integration algorithm to primitives. For the general
case, Rothstein and Caviness also proved that any Liouvillian extension of a
differential field can be embedded in a log-explicit Liouvillian extension [84].
Exercises
Exercise 9.1. Prove Theorem 9.LL
Da Dh
a 62 _!_ 1 •
Show that \f-i G C. Conclude that if C is a real field, then the index sets
LK/C{X) and AK/C{X) are disjoint.
10
Parallel Integration
f = Dv + J2c,^^. (10.1)
guesses for the Ui^s and the denominator of ?;, as well as for the degree of its
numerator. This reduces the problem of solving equation (10.1) to finding the
Q'S and the constant coefficients of the numerator of t;, and this can be done
with elementary linear algebra. If the linear equations for the unknown con-
stants have a solution, then an integral of / is found. On the other hand, the
nonexistence of a solution does not always imply that / does not have an ele-
mentary integral over K^ as it could just mean that the guess was wrong. There
are several published variants of the parallel approach, differing in the details
of the guess or the approach used to solve for the unknown constants, but all
share the property that there are functions having elementary antiderivatives
that cannot be found with that variant. As a consequence, parallel integra-
tion is a convenient heuristic, that is significantly easier to implement than
a complete integration algorithm. To turn it into an algorithm for a class of
integrands requires proving that the given guess catches all the functions in
that class having elementary antiderivatives. This remains an open problem,
although partial results have appeared for logarithmic integrands in [35] and
are extended here to more general differential fields.
Proof. The proof is exactly the same than the one of Lemma 3.4.4.
There are also several newer and improved algorithms in the research literature.
10.1 Derivations of Polynomial Rings 299
T h e o r e m 10.1.1.
(i) Any finite product of normal and two by two relatively prime polynomials
is normal Any factor of a normal polynomial is normal.
(a) Any finite product of special polynomials is special. Any factor of a special
polynomial is special.
gcd(p. Dp)
gcd{p,dp/dtj)
is the product of all the coprime special irreducible factors of p.
(ii) If in addition p is squarefree, then p = PsPn ^s a splitting factorization of
p, where Ps = gcd(p. Dp) and pn = p/ps-
KD fX^aetr---t^H=X](^ae)tr...t^
Since p does not divide a, b and Dp^ p does not divide sabDp. As it divides
bpDa — apDb, it follows t h a t p does not divide the numerator of Df, hence
t h a t p^^-*- divides the denominator of Df. Since s > m, p^+i ^^jg^ divides it.
Since Df = denD{K)Df, the denominator of Df divides the denominator of
D / , whence p ^ + ^ also divides the denominator of Df. D
!-4j^^^*t^.^*tß.^^t-,.^^ (102
.)
Proof Suppose t h a t / has an elementary integral over K. By the strong
Liouville Theorem (5.5.3), there are ^' G JFC, C i , . . ., c^ G C, and i ^ i , . . . , w^ G
K{ci,..., Or)* such t h a t
f = Dv + J2^'^
^ Ui
j= l -^ ^=l
fDa Dp\
Dq = pDa + aDp = q \ -] .
\ a p J
Therefore, q G S^^^. D
It also explains the "anomalous" log(H-tan'^ 0) terms reported in [31] that can
arise when integrating expressions involving tan^, since 1 + tan^ 9 is special.
As a consequence of Theorem 10.2.2, the equation (10.2) can be refined
when K he a tower of nested monomial extensions of F. The Si can be taken
to be the irreducible factors (over CF) of deii]j{K) and of the elements of
'^W-.F^ while s is of the form
where ßp > 0, e^ > 0 and the first product is taken over all the monic irre-
ducible factors of deiiD{K) over F rather than CF. Those exponents can be
bounded in some differential fields, including nested logarithmic extensions,
as will be shown in Sect. 10.4.
J (e^
(e^ 4- x)
x) a:^
We have K = Q(x,ti,t.2) with Dx = 1, Dti = ti {i.e. ti = e^), and
^^ (x2 + l)tl + {2x^ - ^2 + 2x)ti + x^
x^(x + ti)^
i.e. t2 = e(^'-i)/^+V(e^'^+^). Therefore, denoiK) = x^{x + h)^ and the poly-
nomials X and x-j-ti are special with respect to deii]j{K)D. Our integrand is
then
306 10 Parallel Integration
(ti - X^ + 2x)t2
^~ X2(x + ti)2
whose denominator is d = x^{x -\- ti^^ which is special. It turns out however
(see example 6.4.2) that
h
where the special denominator s = ti does not divide d. Therefore, the integral
of / cannot be computed by the parallel method with the guess s = ds.
Next come the monic special irreducible 5^. When ÜT is a tower of nested
primitive, hyp er exponential and hypertangent monomials over F, then The-
orem 10.2.2 provides a finite exhaustive list of all of them, namely the factors
of deii]j{K)^ together with the hyperexponential t^, and the factors of 1 + 1 |
for the hypertangent tj. According to Theorem 10.2.1, one should really take
their irreducible factors in F[ti,... ,t^] (recall that F = Consti:)(K))) rather
than in F [ t i , . . . , t„], as illustrated by the following example.
Example 10.3.2. Let K = Q(x, t) with Dx = 1 and Dt = 2x/{x^ - 2) {i.e. t =
log(x2 — 2)). Then, deiiD{K) = x^ — 2 is special with respect to den£){K)D^
and irreducible in Q[x,t]. However,
which shows that the irreducible factors of deni:)(ii") in Q[x,t] must be con-
sidered.
Similarly, the pi should be the irreducible factors of d^ in F [ t i , . . . , t^^]
rather than in F [ t i , . . . ,t^] as illustrated by
dx 1 1
/ -2 2^/2: l0g(A/2
^' -X)
' 2A/2
p log(A/2 + X) .
There are however arguments for factoring d^ and denjj (K) only over F rather
than F when K is a tower of nested primitive, hyperexponential and hyper-
tangent monomials. Since the parallel approach can fail to find integrals no
matter what we choose, we must switch back to the complete integration algo-
rithm if it does not find an integral. So it is useful only when it is significantly
faster than the complete algorithm. While there are algorithms for comput-
ing irreducible factorizations in F [ t i , . . . ,^n] (called absolute factorizations)^
their cost can actually be higher than the full integration algorithm. In addi-
tion, this factorization could compute algebraic extensions of F that are not
necessary to compute the integral, as in the case of
^ dx = log(x2 - 2).
/
10.3 The Integration Method 307
For those reasons, both approaches appear in the Hterature: those that report
on actual implementations ([37, 38]) factor over F , while those that analyze
the method ([30, 35]) factor over F.
We finally need to bound the degree of the numerator b of v. When K
is a tower of nested monomial extensions, Lemma 3.4.2 suggest the following
natural guess, which is the one used in the literature:
61
E ...£u,,...,„4'...c
ii=0
(10.5)
where the Ui^...i^ are undetermined constants (in F not F). Substituting all
our guesses in the right hand side of (10.2), equating it with / and clearing
denominators yields an equation of the form
61 bn m t
<?= ^ ••• X^ Wii-i„,^n-i,,. +'^airi-^Y^ßiWi (10.6)
ii=0 in=0 i=l i=l
where q and the qi^...i.^ are in F [ t i , . . . ,tn], and the r^ and wi are either in
F [ t i , . . . , t^] or F [ t i , . . . , t^], depending upon the choice made earlier. Equat-
ing the coefficients of the same monomials on both sides of (10.6) yields an
inhomogeneous linear system for the unknown constants w^^...^^, a^ and ßi.
There are a couple of variants as to how to solve that linear system: while
the original approach [30, 37, 67] equates first the monomials of highest total
degrees and solve for the t/ii,...i,„ of lowest weight in the obtained equation,
[38] reports that directly solving the whole system appears to perform at least
as well in practice.
The parallel method can easily be adapted to differential fields that are
not nested monomial extensions, since Theorem 10.2.1 is valid in such fields.
In that case, since there is no complete integration algorithm in case of failure
of the parallel approach, one should use irreducible factors over F rather than
F for the candidate si and pi of (10.2). In addition, the degree bounds (10.4)
should be replaced by
that arises from assuming no cancellation of total degree (deg means total
degree). Finally, the form (10.5) for h should be replaced by
il + ...+i„<deg(b)
308 10 Parallel Integration
Another problem in such extensions is that the special polynomials with re-
spect to D are not known. One should start by taking all the irreducible
factors over F of the special part of denD{K) (which is not always special, see
example 10.3.4). It is possible in addition to look for special polynomials of
low total degree by taking p to be a polynomial of fixed degree with unknown
constant coefficients. The condition p \ Dp translates into a system of non-
linear algebraic equations for the coefficients of p, which can be solved using
algebraic techniques [39]. This computation depends only on the field X, so
specials can be precomputed and stored for some non-monomial extensions.
A finite, potentially empty, set S of monic irreducible specials can be found
in that way, and used as a replacement for S^^^.p in the non-monomial case.
Finally, the guess s = dg should be replaced by
s = ds Yl P
2 — log(a:)^
--t2
f 1 - lOg(x) , 1 1 / 1 / XN 1 1 / 1 / XX
J x2-log(x)2'^'^ " 2 ^^^"^ ^ ^^^""^^ ~ 2 ^^^"^ ~ ^^^""^^'
10.3 The Integration Method 309
P a r a l l e l l n t e g r a t e ( / , D) (* Parallel Integration *)
Solve the inhomogeneous linear system for the UiQ...i,^, as and ßi obtained
by clearing denominators and equating coefficients of equal monomials in
/ = Dv + ^^^gasDs/s + Yli=i ßi^Pi/Pi- ^^ ^^ ^^^ ^° solution t h e n
r e t u r n "failed" else r e t u r n v + J2ses^^ log("S) + Yll=i A log(pO-
Consider
/ x{l + W{x^)Y
310 10 Parallel Integration
^ ^ 2 ; = - - — — + l o g ( l + PF(x2)).
/ a;(l + iy(x2))2 2W{x-^)
The denominator W{x'^) appearing in the integral does not appear in the
integrand, but is one of specials predicted by Theorem 10.2.1.
10.4 Simple Differential Fields 311
Proof Since Dtn G £', the denominators of all the Dti are in F [ t i , . . . ,tn-i],
so denoiK) G F [ t i , . . . ,tn-i]- Let D = denD{K)D and p G F [ t i , . . . ,t„] be
irreducible and special with respect to D. Since deii]j{K) e E*^ p divides
Dp in E[tn]^ so p G F [ t i , . . . ,tn-i] by Theorem 5.1.1, which implies that
denD{E)Dpe F [ t i , . . . ,tn_i]. Let /i = deni)(K)/deni)(E) G F [ t i , . . . ,t^^i].
Since p \ Dp = h{deiiD{E)Dp) and p is irreducible, it must divide h or
deiiD{E)Dp. If p I /i, then p \ deiiD{K). Otherwise, p \ deiijj{E)Dp^ which
means that p is special with respect to dejiD{E)D^ hence that p \ denoiE)
312 10 Parallel Integration
_ — 'Dp — -Dp
6Da - aDb - sab—^ = bDä - äDb - säb—^ (mod p). (10.9)
P P
Let a = deg^^(d), ß = deg^^ (6) and A, ß G F [ t i , . . . ,tn-i] be the leading
coefRcients with respect to tn of d and 6 respectively. Since Dt^ G .E and
denD(iC) G F [ t i , . . . ,tn-i], Dt^ = deni^(il^)Dt„ G F [ t i , . . . ,tn_i], which
implies that
where q G F[ti,..., t^] and deg^^ (g) < a + /?• Let now
so
PKBDA-ÄDB-SAB-
P
It follows then from (10.9) and (10.10) that
— — 'Dp
p YbDa — aDb — sab—
p
We now have a large class of simple differential fields, namely nested prim-
itive extensions with denjj squarefree.
T h e o r e m 10.4.1. Let K = F ( t i , . . . , t n ) where DF C F, ConstD(ü:') C F
and each ti is a primitive monomial over F ( t i , . . . ,t^_i). / / deiiD{K) is
squarefree, then [K^ D) is simple and the denominator of Df/f is square-
free for any f G ÜT*.
Df ^ Dpi
f "^ Pi
We can finally refine Theorem 10.2.1 in the case of simple differential fields
with deiij:){K) squarefree. As earlier, we write C for the algebraic closure of
Const D{K).
Theorem 10,4.2, Suppose that Const£)(i<r) C F, (K^D) is simple and
den]j{K) is squarefree. Let f = a/d G K^ where a,d E -F[ti,..., t„] are co-
prime. Let d = dsdn be a splitting factorization of d w.r.t D, den]-){K) = hgh^
he a splitting factorization of denD{K) w.r.t D, d = n ^ = i ^7- ^^ ^^^ square-
free factorization of d, d^ = Ylk=iPT ^^ ^^^ irreducible factorization of d^
in C F [ t i , . . . , tn]; and hg = YXiLi^i ^^ ^^^ irreducible factorization of hs
in CF[ti^... ,tn]. If f has an elementary integral over K, then there are
wi,...,Wr e CF*, b G F [ t i , . . . , t n ] a n d a i , . . . , a ^ , / 3 i , . . . , / ? t , 7 i 5 - - - , 7 r ^ C
such that
\ sTl cd- Ui Pi Wi
16. W.S. Brown and J.F. Traub. On Euclid's algorithm and the theory of subresul-
tants. Journal of the ACM, 18:505-514, 1971.
17. B.F. Caviness and M. Rothstein. A Liouville theorem on integration in finite
terms for line integrals. Communications in Algebra, 3:781-795, 1975.
18. P.L. Chebyshev. Sur I'integration des differentielles qui contiennent une
racine carree d'un polynome du troisieme ou du quatrieme degre. Journal de
Mathematiques Pures et Appliquees (2^™-^ serie), 2:1-42, 1857.
19. P.L. Chebyshev. Sur I'integration de la differentielle {x + A)dx /
\/x^ + ax^ + hx^ + ex + <i. Journal de Mathematiques Pures et Appliquees (2^^^
Serie), 9:225-241, 1864.
20. P.L. Chebyshev. Sur I'integration des differentielles irrationnelles. Journal de
Mathematiques Pures et Appliquees (2"'^'' serie), 9:242-246, 1864.
21. G. Cherry. Integration in finite terms with special functions: the error function.
Journal of Symbolic Computation, 1:283-302, 1985.
22. G. Cherry. Integration in finite terms with special functions: the logarithmic
integral. SI AM Journal on Computing, 15:1-21, 1986.
23. G.E. Collins. Subresultants and reduced polynomial remainder sequences. Jour-
nal of the ACM, 14:128-142, 1967.
24. R.M. Corless, G.H. Gönnet, D.E.G. Hare, D.J. Jeffrey, and D.E. Knuth. On
the Lambert W function. Advances in Computational Mathematics, 5:329-359,
1996.
25. D. Cox, J. Little, and D. O'Shea. Ideals, varieties and algorithms: an introduc-
tion to computational algebraic geometry and commutative algebra. Undergrad-
uate Texts in Mathematics. Springer-Verlag, New York, 1992.
26. G. Czichowski. A note on Gröbner bases and integration of rational functions.
Journal of Symbolic Computation, 20:163-167, 1995.
27. G. Darboux. Memoire sur les equations differentielles algebriques du premier
ordre et du premier degre. Bulletin des sciences mathematiques, (2^^^ serie),
2:60-96, 123-144, 151-200, 1878.
28. J. H. Davenport, Y. Siret, and E. Tournier. Computer Algebra: Systems and
Algorithms for Algebraic Computation. Academic Press, London, 1988,
29. J.H. Davenport. On the integration of algebraic functions, volume 102 oi Lecture
Notes in Computer Sciences. Springer, Heidelberg, 1981.
30. J.H. Davenport. On the parallel Risch algorithm (I). In Proceedings of EURO-
CAM^82, volume 144 of Lecture Notes in Computer Sciences, pages 144-157.
Springer, Heidelberg, 1982.
31. J.H. Davenport. On the parallel Risch algorithm (III): Use of tangents. SIGSAM
Bulletin, 16:3-6, 1982.
32. J.H. Davenport. Integration formelle. Rapport de Recherche RR375, IMAG,
Grenoble, 1983.
33. J.H. Davenport. Integration algorithmique des fonctions element air ement tran-
scendantes sur une courbe algebrique. Annales de Vlnstitut Fourier, 84(2):271-
276, 1984.
34. J.H. Davenport. The Risch differential equation problem. SIAM Journal on
Computing, 15:903-918, 1986.
35. J.H. Davenport and B.M. Trager. On the parallel Risch algorithm (II). ACM
Transactions on Mathematical Software, 11:356-362, 1985.
36. G.M. Fichtenholz. Differential- und Integralrechnung. VEB Deutscher Verlag
der Wissenschaften, Berlin, 1966.
References 319
IntegrateHypertangentPolynomial N e w t o n - L e i b n i z - B e r n o u l l i algorithm
167 36,58
IntegrateHypertangentReduced 169 n o r m a l polynomial 92
IntegrateNonLinearNoSpecial 173
IntegratePrimitive 160 Parallellntegrate 309
IntegratePrimitivePolynomial 158 ParametricLogarithmicDerivative
IntegrateRationalFunction 52,59 253
IntegrateRealRationalFunction 70 ParamPolyRischDENoCancell 234
IntRationalLogPart 48,51, 54 ParainPolyRischDENoCancel2 238
ParamRdeBoundDegreeBase 228
Lambert W function 309 ParamRdeBoundDegreeExp 229
ParamRdeBoundDegreeNonLinear 230
LaurentSeries 57
ParamRdeBoundDegreePrim 228
Icm 33
ParamRdeNormalDenominator 219
LimitedlntegrateReduce 248
ParamRdeSpecialDenomExp 221
LinearConstraints 223
ParamRdeSpecialDenomTan 222
Lionville's t h e o r e m 142, 144, 145,155
ParSPDE 231
Liouvillian
p a r t i a l fraction decomposition 15, 17,
extension 129
36,39,47,54
log-explicit 293
PartialFraction 15, 17
monomial 131
polar multiplicity 138
logarithmic
PolyDivide 8
derivative
polynomial remainder sequence 22
identity 76,104, 270
E u c h d e a n 22
of a radical 97
fundamental theorem 23
extension 133
primitive 22
integral 152,154,158,245
subresultant 23, 49-51,152
monomial 133
PolynomialReduce 141
LogToAtan 63
PolyPseudoDivide 9
LogToReal 69
PolyRischDECancelExp 213
PolyRischDECancelPrim 212
m o n o m i a l 91 PolyRischDECancelTan 215
arctangent 285 PolyRischDENoCancell 208
elementary 133 PolyRischDENoCancel2 209
real 285 PolyRischDENoCancelS 210
exponential 133, 282, 285 primitive
hyperexponential 129,160,164,166, extension 129,245
1 7 6 , 1 7 7 , 1 8 8 , 200, 212, 220, 229, monomial 129,157,176,177,188,
250,258,261 194,211,220,227,245,259
hypertangent 164,177,178,191, nonsimple 293
214,221,244,258,264 part 25,298
Liouvillian 131 polynomial 25,298
logarithmic 133, 282, 285 polynomial remainder sequence 22
nonlinear 9 1 , 9 5 , 1 2 4 , 1 4 0 , 1 4 1 , 1 5 6 ,
172,201,214,229,242,263 quotient field 7, 33, 4 3 , 1 0 7 , 1 1 6 , 1 1 7
primitive 129,157,176,177,188,
194,211,220,227,245,259 RdeBoundDegreeBase 199
nonsimple 293 RdeBoundDegreeExp 200
tangent 164,285 RdeBoundDegreeNonLinear 201
Index 325