Algorithms and Computation 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] Mathematics Subject Classification (2000): 12F20,12H05,12Y05,13N15, 28-04, 33B10, 33F10, 68W30
Library of Congress Control Number: 2004110974
ISSN 1431-1550 ISBN 3-540-21493-3
Springer Berlin Heidelberg New York
ISBN 3-540-60521-5 ist edition Springer-Verlag Berlin Heidelberg New York 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 protective laws and regulations and therefore free for general use. Typesetting: by the author using a Springer KTgX macro package Production: LE-TEX Jelonek, Schmidt & Vöckler GbR, Leipzig Cover design: design & production GmbH, Heidelberg Printed on acid-free paper
46/3142YL - 5 4 3 2 1 0
Foreword
This book brings together two streams of research in mathematics and computing 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 invention 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 computational 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 numerical 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 provisions 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 computational 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 apply 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 programs 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 reasons 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. Watson 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 algorithmic 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 expect 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 newreferences 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.
Sophia Antipolis, June 2004
M. Bronstein
Preface to the First Edition
The integration problem, which is as old as calculus and differentiation, can be informally stated very concisely: given a formula for a function / ( x ) , determine whether there is a formula for a differentiable function F{x) satisfying
and compute such an F(x), which is called an antiderivative of f{x) and is denoted
F{x) = j f{x)da if it exists. Yet, while symbolic differentiation is a rather simple mechanical process, suitable as an exercise in a first course in analysis or computer programming, the inverse problem has been challenging scientists since the time of Leibniz and Newton, and is still a challenge for mathematicians and computer scientists today. Despite the many great strides made since the 19*^ century in showing that integration is in essence a mechanical process, although quite more complicated than differentiation, most calculus and analysis textbooks give students the impression that integration is at best a mixture of art and science, with flair in choosing the right change of variable or approach being an essential ingredient, as well as a comprehensive table of integrals. The goal of this book is to show that computing symbolic antiderivatives is in fact an algorithmic process, and that the integration procedure for transcendental functions can be carried out by anyone with some familiarity with polynomial arithmetic. The integration procedure we describe is also capable of deciding when antiderivatives are not elementary, and proving it as a byproduct of its calculations. For example the following classical nonelementary integrals
S^'^'^^
/biM'
sm{x)dx
/
X
can be proven nonelementary with minimal calculations.
X
Preface to the First Edition
The algorithmic approach, pioneered by Abel and Liouville in the past century, eventually succeeded in producing a mechanical procedure for deciding whether an elementary function has an elementary antiderivative, and for computing one if so. This procedure, which Risch described in a series of reports [73, 74, 75, 76], unfortunately not all of them published, forms the basis of most of the symbolic integration algorithms of the past 20 years, all of them loosely grouped under the appellation Risch algorithm. The procedure which we describe in this book also has its roots in the original Risch algorithm [75] and its improvements, our main sources besides Risch being [12, 13, 83, 89]. We have tried to keep the presentation as elementary as possible, with the minimal background for understanding the algorithm being an introductory course in algebra, where the topics rings and fields, polynomial greatest common divisors, irreducible polynomials and resultants are covered"^. Some additional background in field theory, essentially algebraic and transcendental extensions, is occasionally used in the proofs associated with the algorithm. The reader willing to accept the algorithm without proof can skip those sections while learning the algorithm. We have also generalized and extended the original Risch algorithm to a wider class of functions, thereby offering the following features, some of them new, to the reader already familiar with symbolic integration: ® The algorithms in this book use only rational operations, avoiding factorization of polynomials into irreducibles. ® Extensions by tangents and arc-tangents are treated directly, thereby real trigonometric functions are integrated without introducing complex exponentials and logarithms in the computations. ® Antiderivatives in elementary extensions can still be computed when arbitrary primitives are allowed in the integrand, e.g. Erf(x), rather than logarithms. ® Several subalgorithms are applicable to a large class of non-Liouvillian extensions, thereby allowing integrals to be computed for such functions. The material in this book has been used in several courses for advanced undergraduates in mathematics or computer science at the Swiss Federal Institute of Technology in Zurich: ® In a one-semester course on symbolic integration, emphasizing the algorithmic and implementation aspects. This course covers Chap. 2 in depth, Chap. 3 and 4 superficially, then concentrates on Chap. 5, 6, 7 and 8. • In the first part of a one-semester course on differential algebra. This course covers Chap. 3, 4 and 5 in depth, turning after Liouville's Theorem to other topics (e.g. differential Galois theory). ® In the last part of a one-semester introductory course in computer algebra, where some algorithms from Chap. 2 and 5 are presented, usually without proofs. ^Those topics are reviewed in Chap. 1.
Preface to the First Edition
XI
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 missing from this book, the main one being the integration of algebraic functions. Including algorithms for integrating algebraic and mixed algebraictranscendental functions would however easily double the size of this book, as well as increase the mathematical prerequisites, since those algorithms require prior famiharity with algebraic curves and functions. We have thus decided to cover algebraic functions in a second volume, which will hopefully appear in the near future. In the meantime, this book is an adequate preparation to the extensive literature on the integration of algebraic functions [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 antiderivatives. 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 corrected many early drafts of this book. I am particularly grateful to Bob Caviness. 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.
Zurich, November 1996
M. Bronstein
Contents
Foreword Preface to the Second Edition
V VII
Preface to the First Edition
IX
1
Algebraic Preliminaries 1.1 Groups, Rings and Fields 1.2 EucHdean Division and Pseudo-Division 1.3 The EucHdean Algorithm 1.4 Resultants and Subresultants 1.5 Polynomial Remainder Sequences 1.6 Primitive Polynomials 1.7 Squarefree Factorization Exercises
1 1 8 10 18 21 25 28 32
2
Integration of Rational Functions . 2.1 The BernouUi Algorithm 2.2 The Hermite Reduction 2.3 The Horowitz-Ostrogradsky Algorithm 2.4 The Rothstein-Trager Algorithm 2.5 The Lazard-Rioboo-Trager Algorithm 2.6 The Czichowski Algorithm 2.7 Newton-Leibniz-Bernoulli Revisited 2.8 Rioboo's Algorithm for Real Rational Functions 2.9 In-Field Integration Exercises
3
Differential Fields 3.1 Derivations 3.2 Differential Extensions
35 36 39 45 . 47 49 53 54 59 70 72 75 75 79
XIV
Contents 3.3 Constants and Extensions 3.4 Monomial Extensions 3.5 The Canonical Representation Exercises
85 90 99 104
4
The O r d e r Function 4.1 Basic Properties 4.2 Localizations 4.3 The Order at Infinity 4.4 Residues and the Rothstein-Trager Resultant Exercises
107 107 110 115 118 126
5
Integration of Transcendental Functions 5.1 Elementary and Liouvillian Extensions 5.2 Outline and Scope of the Integration Algorithm 5.3 The Hermite Reduction 5.4 The Polynomial Reduction 5.5 Liouville's Theorem 5.6 The Residue Criterion 5.7 Integration of Reduced Functions 5.8 The Primitive Case 5.9 The Hyperexponential Case 5.10 The Hypertangent Case 5.11 The Nonlinear Case with no Specials 5.12 In-Field Integration Exercises
129 129 134 138 140 142 147 154 157 160 163 172 175 178
6
T h e Risch Differential E q u a t i o n 6.1 The Normal Part of the Denominator 6.2 The Special Part of the Denominator 6.3 Degree Bounds 6.4 The SPDE Algorithm 6.5 The Non-Cancellation Cases 6.6 The Cancellation Cases Exercises
181 181 186 193 202 206 211 216
7
Parametric Problems 7.1 The Parametric Risch Differential Equation 7.2 The Limited Integration Problem 7.3 The Parametric Logarithmic Derivative Problem Exercises
217 .....217 245 250 255
Contents 8
The 8.1 8.2 8.3 8.4
Coupled Differential System The Primitive Case The Hyperexponential Case The NonUnear Case The Hypertangent Case
9
Structure Theorems 9.1 The Module of Differentials 9.2 RosenHcht's Theorem 9.3 The Risch Structure Theorems 9.4 The Rothstein-Caviness Structure Theorem Exercises
XV 257 259 261 263 264 269 269 276 282 293 296
10 Parallel I n t e g r a t i o n 10.1 Derivations of Polynomial Rings 10.2 Structure of Elementary Antiderivatives 10.3 The Integration Method 10.4 Simple Differential Fields
297 298 301 305 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 replacement for an introductory course in abstract algebra, and we expect the reader to have already encountered the definitions and fundamental properties of rings, fields and polynomials. We only recall those definitions here and describe some algorithms on polynomials that are not always covered in introductory 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 algorithms, including more efficient alternatives for computing greatest common divisors of polynomials, we recommend consulting introductory computer algebra textbooks [2, 28, 39, 64, 97]. Readers with some background in algebra can skip this chapter and come back to it later as needed.
1,1 Groups, Rings and Fields An algebraic structure is usually a set together with one or more operations on it, operations that satisfy some computation rules called axioms. In order not to always list all the satisfied axioms for a given structure, short names have been given to the most common structures. Groups, rings and fields are such structures, and we recall their definitions in this section. Definition 1.1.1. A group (G,o) is a nonempty set G, together with an operation o : G X G —^ G satisfying the following axioms: (i) (Associativity) Va, 6, c G G^, a o (6 o c) = (a o 6) o c. (a) (Identity element) 3e G G such that Va€ G^eo a = ao e = a. (Hi) (Inverses) Va € G^ 3a~-^ G G such that a o a~^ — a~^ o a = e. In addition, o is called commutative (or Abelian^ ifaob = boa for all a^b £ G, and (G, o) is called a commutative group (or Abelian groupj if it is a group and o is commutative.
2
1 Algebraic Preliminaries
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\ c dj
1 f d 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 11\
/01\
/ll
^oij°(,ioJ = ^io and
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) Va, b, c G R^ a • {b -\- c) = {a • b) + {a • c) and {a -i- b) - c = (a - c) -{- {b • c). (i?, +, •) is called a commutative ring if it is a ring and • is commutative. In addition, we define the characteristic of R to be 0 if ni ^ e for any positive integer n, the smallest positive integer m such that mi = e otherwise. Let R and S be rings. A map (j) : R -^ S is a ring-homomorphism if (i){eR) = es, 4'{'^R) = T^s, and <j){a^b) — (f){a)-j-(j){b) and (t){ab) = (t){a) • (j){b) for any a^b G R. A ring-isomorphism is a bijective ring-homomorphism. 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 0\
(n
0^
0 \)
1
\\)
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 commutative 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. T h e o r e m 1 . 1 . 1 . Let (jR,+,•) be an integral domain, and x^y E R. If z and t are both gcd^s of x and y, then z = ut and t = vz for some u^v G R*. Proof Suppose t h a t both z and t are gcd's of x and y. Then, t \ z since t \ x, t I y, and z — gcd(x,y). Thus, z = ut for some u e R. Similarly, z | t, so t = vz for some v e R. Hence z = ut = uvz^ so (1 — uv)z = 0. If z / 0, t h e n 1 = uv^ so u^v E R*. If z = 0, then t = vz = 0,soz = lt and t = Iz. D D e f i n i t i o n 1.1.5. Let R be an integral domain. A nonzero element p E R\R* is called prime if for any a^b £ R, p\ ab =^ P \ ct or p \ b. A nonzero element p E R\ R* is called irreducible if for any a^b E R, p = ab = ^ a E R"^ or b E R\ Example 1.1.7. Let R = Z [\/---5] as in example 1.1.5, and check t h a t 2, 3,1 + A / ^ and 1 — ^/^ are all irreducible elements of R. Equation (1.1) t h e n shows t h a t the same element can have several different factorizations into irreducibles. Therefore, integral domains where such a factorization is unique receive a special name. D e f i n i t i o n 1.1.6. A unique factorization domain (UFD) ( ß , + , • ) ^-^ «^^ 'integral domain where for any nonzero x E R\ R*, there are u E R*, coprime irreducibles p i , . . . ,_py^ E R and positive integers e i , . . . , e^ such that X = upl^ • • -p^"'. Furthermore, this factorization is unique up to multiplication of u and the pi 's by units and up to permutation of the indices. Example 1.1.8. Let R = Q[X, Y] be t h e set of all the polynomials in t h e variables X and Y and with rational number coefficients. It is a classical result ([54] Chap. V §6, [92] §5.4) t h a t (Ä, + , •) is a unique factorization domain where + and • denote polynomial addition and multiplication respectively. In any integral domain, a prime is always irreducible. The converse is not always true, but it holds in unique factorization domains. Thus, we can use interchangeably "prime" or "irreducible" whenever we are in a unique factorization domain, so, "the prime factorization of x" and "the irreducible factorization of x" have the same meaning. T h e o r e m 1.1.2 ([54] Chap. II §4). Let ( i ? , + , •) be an integral domain. every prime p E R is irreducible. If R is a unique factorization domain, every irreducible p E R is prime.
Then then
In addition, gcd's always exist in U F D ' s , and can be obtained from t h e irreducible factorizations. T h e o r e m 1.1.3. If R is a UFD, then any x^y E R have a gcd in R.
1.1 Groups, Rings and Fields
5
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 pGT
TT
mm(np,mp)
pG{xny)\T
which means that t | z, hence that z = gcd(x, y).
D
It is a classical result due to Gauss that polynomials can be factored uniquely into irreducibles. T h e o r e m 1.1.4 ([54] Chap. V §6, [92] §5.4). If R is a UFD, then the polynomial ring JR[XI, . . . , X^] is a UFD, Definition 1.1.7. Let (G, o) be a group with identity element e. We say that H C G is a subgroup of (G^o) if: (i) eeH. (a) \/a,b e H\aob £ H. (iii)ya G H,a~'^ G H. In practice, given a subset iJ of a group G, it is equivalent to check the above properties (i), (ii) and (iii), or that H is not empty and that aob"^ G H for any a,b e H. Example 1.1.9. Let G = GL{Q^ 2) as in example 1.1.1 with o denoting matrix multiplication, and let H = SL{Q, 2) be the subset of G consisting of all the matrices whose determinant is equal to 1. The identity matrix is in iJ, so i7 is not empty, and for any a,b E H^ the determinant of a o 6~-^ is the quotient of the determinant of a by the determinant of 6, which is 1, so i^ is a subgroup of G.
6
1 Algebraic Preliminaries
D e f i n i t i o n 1.1.8. Let ( Ä , + , • ) be a commutative ring. A subset I of R is called an ideal if (/, + ) is a subgroup of ( ß , + ) and xa £ I for any x in R and a in I. Let x i , . . . , x^ G R. The ideal generated by { x i , . . . , x ^ } is the smallest ideal of R containing { x i , . . . ^Xn}, and is denoted ( x i , . . . , x ^ ) . An ideal I C R is called principal if I = (x) for some x E R. 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. T h e o r e m 1.1.5. Let ( A , + , • ) be a commutative Then, (Xi, . . . , Xn) = {aiXi
Proof
H
ring, and x i , . . . , x ^ E R.
h ünXn] tti, . . . , « ^ G
R}.
Let / = {aiXi -|- •. • -|- a^Xn^ a i , . . . , a^ G R}. T h e n Xi £ I for any i.
Let a = ^2^=1 ^i^i ^ -^ ^ ^ ^ ^ = S i L i ^*^* ^ -^- ^ ® have a — h = Y^^=i{^i ~ bi)xi G / , so ( / , + ) is a subgroup of ( i ? , + ) . For any x G i?, we have xa = Yl7=ii^^i)^'i G I , so / is an ideal of R containing { x i , . . . , x ^ } . Let now J be any ideal of R containing { x i , . . . , x ^ } , and let a — YM=I ^i^i ^ ^- ^^^ each i, Xi G J , so üiXi G J since RJ C J , so a G J since (J, + ) is a group. Hence / C J , so / = ( x i , . . . , x ^ ) . D {X,Y). Example LLIO. Let ß = Q [ X , y ] as in example L L 8 , and let / = It can be checked t h a t / is not principal, hence t h a t not every ideal of jR is principal. Naturally, this means t h a t integral domains where every ideal is principal receive a special name. D e f i n i t i o n 1.1.9. A principal ideal domain (PID) ( ß , + , •) ^5 an integral domain where any ideal is principal. 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 domain ([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. D e f i n i t i o n 1.1.10. A Euclidean domain ( A , + , • ) is an integral domain gether with a map v : R\ {0} —> N such that:
to-
(i) Ma.beR \ {0}, u{ab) > u{a). (a) (Euclidean division) For any a^b G R, b j^ 0, there are q^r £ R such that a = bq + r and either r = 0 or ^{r) < y{b). The map u is called the size function of the Euclidean
domain.
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. T h e o r e m 1.1.7 ([54] Chap. II §4, [92] §3.8). Every PID is a UFD. Since every PID is a UFD, and gcd's always exist in UFD's by Theorem 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 We finally recall some important definitions and results about fields. Definition 1.1.11. A field (F, H-, •) is a commutative ring where {F \ {0},-) is a group, i.e. every nonzero element is a unit (F* = F \ {0}). 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. Example 1.1.14- Let R he an integral domain and define the relation ~ on R X R\ {0} by (a, b) ~ (c, d) if ad = be. It can easily be checked that ~ is an equivalence relation on R x R\{0} and that the set of equivalence classes is a field with the usual operations a b
c d
ad-^bc bd
a c bd
ac bd
where a/b denotes the equivalence class of (a, 6). This field is called the quotient field of R. For example, the quotient field of Z is Q and the quotient field of the polynomial ring D[x] is the rational function field D{x) when D is an integral domain. Definition 1.1.12. Let F C E be fields. An element a G E is called algebraic over F if p{a) = 0 for some nonzero polynomial p G F[X], transcendental over F otherwise. E is called an algebraic extension of F if all the elements of E are algebraic over F. Definition 1.1.13. A field F is called algebraically closed if for every polynomial p G F[X]\F there exists a G F such thatp{a) = 0. ^ field E is called an algebraic closure of F if E is an algebraically closed algebraic extension of F.
8
1 Algebraic Preliminaries
Note t h a t if JP is algebraically closed, then any p G K[X]\K factors linearly as p = c n r = i ( ^ ~ ^'^T'' ^^^^ -^' P ™ust have one root a in i^ by definition, and p/{X — a) factors linearly over F by induction. The fundamental result about algebraic closures is a result of E. Steinitz which states t h a t they exist and are essentially unique. T h e o r e m 1.1.9 ([54] Chap. VII §2, [92] §10.1). Every field F has an algebraic closure, and any two algebraic closures of F are isomorphic. In view of the above theorem, we can refer to the algebraic closure of a field F , and we denote it F. T h e last result we mention in this section is Hilbert's Nullstellensatz, which is not needed in the algorithm, but is needed in order t o eliminate the possibility of new transcendental constants appearing in antiderivatives. We present it here in b o t h its classical forms. T h e o r e m 1.1.10 ( W e a k N u l l s t e l l e n s a t z , [92] §16.5). Let F be an braically closed field, I an ideal of the polynomial ring F[Xi^..., X^] and V{I) be the subset of F'^ given by V{I) = { ( x i , . . . ,Xn) G F " s.t p{xu . . . , x , ) = 0 / o r allpe Then, V{I) = (D 4=^
1} .
(1.3)
l e L
T h e o r e m 1.1.11 ( N u l l s t e l l e n s a t z , [54] Chap. X §2, [92] §16.5). Let F be an algebraically closed field, I an ideal of the polynomial ring F[Xi^..., Xn] and V{I) be given by (1.3). For any p € F[Xi^... ,X^]^ if p(xi^... ,Xn) = 0 for every ( x i , . . . , Xn) € y{I), then p^ £ I for some integer m > 0.
1.2 Euclidean Division and Pseudo-Division Let K be a field and x be an indeterminate over K. We first describe t h e classical polynomial division algorithm ([92] §3.4), which, given A^B G K[x]^ B j^ 0^ produces unique Q,R G K[x] such t h a t A = BQ + R and either R = 0 or deg{R) < d e g ( ß ) . This shows t h a t t h e polynomial ring K[x] is a Euclidean domain with t h e degree for size function when K is field. Q and R are called the quotient of A by B , and t h e remainder of A modulo B respectively. PolyDivide(A, B)
(* Euclidean Polynomial Division *)
(* Given a field K and A,B e K[x] with B j^ 0, return Q Re K[x] such that A = BQ + R and either R = 0 or deg{R) < deg{B). *) Q i~~0, R 0 d o
T ^ |^x^ Tetnrn{Q,R)
Q^Qi-T,R^R-BT
1.2 Euclidean Division and Pseudo-Division Example 1.2.1. Here is the Euclidean division oi A — 3x*^ -\- x^ + x - 5 by E = 5 r r 2 - 3 j : + l in Q[x]\
0 ^x 5*^ ^ 25
(5 T
Ä
Q
3x^ + x^ + x + 5 1
fx^ + fx + S
0
52^ 1 i n 25"^ ^ 25
-1
gX 14 25
Thus, /52
--•1-M
111
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 coefficient 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^+^.
PolyPseudoDivide(74, B)
(* Euclidean Polynomial Pseudo-Division *)
(* Given an integral domain D and A, B G D[x] with B ^ 0, return pquo(A,jB) and pYem.{A,B). *) b ^ lc(ß), N ^ deg(A) - deg{B) + l,Q^O, R^A while Ä / 0 and (5 ^ deg{R) - deg{B) > 0 do T ^ lc{R)x\ N ^N-l,Q 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 ao
ai = 6,
and
{qi-,cii) = EuclideanDivision(ai_2 7 G^2-I) for 2 > 2
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. Euclidean(a, b)
(* EucHdean algorithm *)
(* Given a Euclidean domain D and a, 6 G D, return gcd (a ,6). *) while 6 7^ 0 d o (g,r) ^— EuclideanDivision(a, 6) a ^~ b
(*
a =-bq-{- r
*)
b iy(b) t h e n {q,r) ^— EuclideanDivision(5,6) (* s -=• bq + r*) s ^ -7We note t •:7 h a= t in the case + of -Tpolynomial < •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. P a r t i a l F r a c t i o n ( a , «ii,... ,dn)
(* Partial fraction decomposition *)
(* Given a Euclidean domain D, a positive integer n and a,di,... ,dn G D \ {0} with gcd{di^dj) = 1 for i 7^ j , return ao, a i , . . . , an G -D such that
di • • -dn
+ES
• ao
. 1 --
2= 1
and either at = 0 or z^(ai) < iy{di) for i > 1. *) (ao, r) 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
Such a decomposition is called the d-adic expansion of a/d^. Write a = dq-\~ am by the Euclidean division, where either a^ = 0 or i'(am) < y{d). Then, a _ dq^ um _ ^m ~
ßrn
q
~ ßrn-l
o^, ßrn "
If ?Ti = 1, then the above is in the desired form with ÜQ — q. Otherwise, we recursively find a o , a i , . . . ,am~\ € D such that either a^ = 0 or y(aj) < u{d) for J > 1, and Q
m—l
^0 + E l 3=1
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'-: a
n IT—^ a^
n Y A ai
and then compute the (i^-adic expansion of each summand to get 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
fraction decomposition of a/d when the factorization of d into irreducibles^ is used. PartialPraction(a,c?i,... ,(in, e i , . . . , en) (* Complete partial fraction decomposition *) (* Given a Euclidean domain D, positive integ ers Ti, e i , . . . , e^ and a, 0. We use this fact in the following definition, as well as whenever we use primitive parts in the integration algorithm. Definition 1.6.2. Let A e. D[x] and pp(^) = Yl7=i ^t' ^^ ^^^ prime factorization of its primitive part where e^ > 1 for each i. We define the squarefree part of A to be n 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
Note that A ^ = PP(^)- For convenience we call A ^ simply the deflation of A^ and denote if by A~~^ i.e.
A-=A-^ = l[pr
1.6 Primitive Polynomials
27
As consequences of the definition we have the following useful relations: A*A-=MA), A"^' = A~'' ^ where i,j>0
(1.11) and i -^ j = k .
A special case of the above relation is
which together with (1.11) implies that A-'^+i = - 3 ^
for Ä; > 0 .
(1.13)
Although the squarefree part and deflations are defined in terms of the prime factorization, they can be computed by gcd computations in D[x]. The basic idea is that a prime factor of A divides dA/dx once less than A. T h e o r e m 1.6.1. Let A^P E D[x]\D
and n > 0 be an integer. Then,
(i) P^+i I A = ^ P ^ I gcd{A,dA/dx), (ii) if P is prime and char(D) = 0, then P ^ | gcd{A, dA/dx) = > P"+^ | A, Proof, (i) Suppose that P"'+^ | A, then there exists B G D[x] such that A = P ^ + i p . Hence,
^dx= P - - ^ ^dx^ + (n + l ) P - Pdx? so P"^ I dA/dx, which implies that P"^ | gcd{A, dA/dx). (ii) Suppose that D has characteristic 0, P is prime, and P^ | gcd(^, dA/dx). Let m > 0 be the unique integer such that P ^ | A and P ^ + i ]/A. Then, there exists B G D[x] such that A = P ^ P and P)(B. As in part (i), we have 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
1»7 Squarefree Factorization Let D be a unique factorization domain, and x be an indeterminate over D. D[x] is then a unique factorization domain, so every A E D[x] has a factorization into irreducibles. Such a factorization is usually difficult to compute in general, but there are other factorizations that are easier to compute and that can be used instead for many purposes. We introduce in this section the squarefree factorization^ which is the one primarily used by integration algorithms. Definition 1.7.1. A G D[x] is squarefree if there exists no B G D[x] \D such that B'^ \A in D[x]. Equivalently, A is squarefree if e^ = 1 for i = 1 , . . . , n in any prime factorization of A over D. Definition 1.7.2. Let A G D[x]. A squarefree factorization of A is a factorization of the form A = YllLi ^l 'where each Ai is squarefree andgcd{Ai^ Aj) G D fori / j . Note that there is no need to require a separate leading coefficient in D* and prime factors in D as in the prime factorization, since the elements of D are automatically squarefree by our definition. In addition, if we have a squarefree factorization of the primitive part of A of the form pp{A) = Hl^i ^h then A = (content(^) Ai) J | A] is a squarefree factorization of A, so it is sufficient to compute squarefree factorizations of primitive parts. In addition, we assume that D has characteristic 0 (see [39, 40, 97] for squarefree factorizations in positive characteristic). In characteristic 0, a squarefree factorization of A separates the zeroes of A by equal multiplicities, since a zero of A must be a zero of exactly one Ai, and its multiplicity in A is then i. We use this fact in order to express the Ai^s in terms of the deflations of A and vice-versa. L e m m a 1.7.1. Let A G D[x] \D, pp{A) = HlLi -^t ^^ ^ prime factorization ofpp{A), m = m a x ( e i , . . . , e^) and Ai = Hjic^i Pj f^^ 1 < i <m. Then, ß)
A-'- = UT=k^i ^ r ^ = ^fc+i^i+2 • • • ^ " " ^ for any integer Ai=
^_^,
forl0. (1.15)
1.7 Squarefree Factorization
29
Proof, (i) We have m
m
n ^'= n n^r= n pr'=A-^-
iz=k-\-l
i=k-\-l j\ej—i
j\ej>k
ill) From (i) we have Ai • ^m.
-^
(iii) Each Ai is squarefree, since it is a product of coprime irreducibles. In addition, gcd(A^,^j) G D for i ^ j since each prime factor of pp(^) appears in its factorization with a unique exponent. Finally, using A; = 0 in (i), we get pp(^) = A~^ = YYiLi -A*, which is a squarefree factorization of pp(A). D Since deflations and squarefree parts can be computed by gcd's as explained in the previous section, we get the following squarefree factorization algorithm for a primitive A: by (1.14), we have A~^ = A~~ = gcd{A^dA/dx), which gives us A~^* = A* = pp{A)/A~. Once we have A~^* and A~^+^ for Ä: > 0, the sequence can be continued by gcd
(A--^*,
A-'=+>) = gcd (Afc+i •••Am, Ak+2Al+, • • • A--'=-i) = 4--=+^* ,
and Ak-^i and A~^+^ are obtained by (1.15) and (1.13) respectively. We continue 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]. Squarefree (A)
(* Musser' s squarefree factorization *)
(* Given a unique factorization domain D of characteristic 0 and A G D[x], return A i , . . . , Am G D[x] such that A = YYk'-i A^ is & squarefree factorization of A. *) c ^- content(yi), S ^'* *) (* Ak = A"''-^*/A"''-* *) (* 5^* =A-^'* *) (* S~ = A"^+i *)
30
1 Algebraic Preliminaries
Example 1.7.1. Applying Squarefree to A = x^ + ^x^ + 12x^ + 8^^ G Q[x], we get c = 1, 5 = ^ , dS/dx = 8x^ + 36x^ + 48x^ + 16:c, 5 - = gcd
5,
dS
c^ + 4x^ + 4x
dx
and 5* = 5 / 5 - = x^ + 2x. Then,
5-
5*
k
y
^. 1
1 x^ + 2a: x^ + 4a:^ + 4x x^ + 2x 2 :c^ + 2x x2 + 2 x2-|-2 X 3 ^2 + 2 1 x2 + 2 Hence, ^ - x^ + 6x^ + 12x'* + 8x^ = x\x^
4- 2)
Yun [95] showed t h a t it is possible to be more efficient t h a n the above algorithm by reducing the degree of the polynomials appearing in the gcd inside the loop. His idea is to consider t h e following sequence of polynomials:
Yk = Y,{i-k
+ 1)
i=k
Y,{i
dAi A - ^ - i ^ Ai
dx
dAi ~k + l)Ak • • • A , _ i — ^ A , + i •••Am
ioik>l
(1.16)
i=k
whose properties are summarized in the following lemma. L e m m a 1.7.2. With the above
notation,
gcd{A-^-^*,Yi)
G D,
dA'-''^/dx
A~'Yi,
(1.17)
AiVi+i
(1.18)
and with Ai as defined in Lemma Yi
=
1.7.1,
dA->
-
dx
for 1 < i < m. Proof. Let 1 < i < j < m. Then, gcd{Aj,Ai---Aj-i^Aj+i
dAi
•-•Am)£D
since Aj is squarefree and the Ai are pairwise relatively prime. Since Aj \Ai---
dAk Ak-i-j-Ak+i
•••Am
for j ^ fc,
1.7 Squarefree Factorization this implies t h a t gcd{Aj,Yi) G D , hence t h a t gcd{A~'''-^*,Yi) Let 1 < i < m. Using Lemma 1.7.1 and (1.11) we get
31
G D.
^ - - " f : ü - + idx) ^Aj^ = ^ - - ^ From d^-.-i*
d / -
^ \
-
d^.^-.-i'
dx
dx \ ^^
I
^-^
\j=k
J
j=k
dx
Aj -^
we get dA-'-^*
_ ^
.
dAj A-'-^''
= 2^ 0 - 0 dx
^dAjA"'-'
Aj
D Since A ^-^ that
= AiA
'-* and gcd(A '•*^Yi^i) gcd Ur-^
,r,
dA-"-'' ^—j
E D , we conclude from (1.18) = Ai
(1.19)
which yields Yun's squarefree factorization algorithm: assuming as before t h a t A is primitive, we have A~ = gcd{A^dA/dx), which gives us A-"°* =A* = p p ( ^ ) M "
and
Yi = ^ ^ ^
by (1.17).
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~^.
1 Algebraic Preliminaries
32
Squarefree(A)
(* Yun's squarefree factorization *)
(* Given a unique factorization domain D of characteristic 0 and A e D[x], return Ai ...,Am e D[x] such that A = 0 ^ = ^ A^ is a squarefree factorization of A. *) c ^- content (/I), S S' ^ dS/dx S- ^ gcd{S, S')
s* 4-
s/s-
Y ^ k ^ l
S'/S-
^A/c
while (z '* (* y = Yu+i
Y ^ Z/Ak ki~k^l Ak^S* r e t u r n ( c A l , . . . ,Ak)
*) *) *) *)
Example 1.7.2. Here is a step-by-step execution of Yun's algorithm on the A of example l.7A.Wegetc=l,S = A,S' = dS/dx = 82:'^ + 36x^ + 48x^ + 16x, and S- = gcd(5', 5^) = x^ + 4^^ + 4x. Then, A:
5*
Y
Z
1 x^ + 2x 8 x ^ + 4 5x^ + 2 2 x'^ + 2x 5x^ + 2 3 x2 + 2
^3
1
2x2
X
0
x2 + 2
2x
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.2. Find integers x,y such, that (a) 12x + 1 9 ^ = 1. (b) 3x + 2y = 5.
1.7 Squarefree Factorization
33
Exercise 1.3. Find the inverse of 14 in Z37. Exercise 1.4. Compute the gcd of 2x^ — ^x'^ — x + | and a;^ + | x — ^ in Exercise 1.5. Compute the pseudo-quotient and pseudo-remainder of x^ — 72: 4-7 by 3 x 2 - 7 in ^[^]_ 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.9. Compute a squarefree factorization of x^ — 5x^ + ßx"^ + ix"^ — 8. Exercise 1.10. Prove that 2 is irreducible but not prime in Z [\/—5]. Exercise 1.11. Prove that similarity as defined in Definition 1.5.2 is an equivalence relation. Exercise 1.12. Prove that if a, 6 are in a Euclidean domain D, and a = qh-\-r for some q^r G D^ then gcd(a,6) = gcd(6,r). 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. Exercise 1.15. Let D be a unique factorization domain, F its quotient field (see example 1.1.14) and x be an indeterminate over D. Show the following consequence of Lemma 1.6.1: for any A^ B £ D[x] with A primitive, A divides B in D[x] if and only if A divides B in F[x]. Exercise 1.16. Let R be an integral domain and x i , . . . , x^ G ß . We say that 2; G fi is a least common multiple (1cm) of xi,... ^Xn if Xi | z for 1 < i < n and \/t E R^ Xi \ t foi 1 < i < n ==4> z
\t.
Show that if i? is a UFD, then any x, y have an 1cm in R.
Integration of Rational Functions
We describe in this chapter algorithms for the integration of rational functions. This case, which is the simplest since rational functions always have elementary integrals, is important because the algorithms for integrating more complicated functions are essentially generalizations of the techniques used for rational functions. Since the algorithms and theorems of this chapter are special cases of the Risch algorithm, we postpone the proof of their correctness until the later chapters on integrating transcendental functions. Throughout this chapter, let K he SLfield-^of characteristic 0, x an indeterminate over K, and ' denote the derivation d/dx on K{x)^ so x is the integration variable. By a rational function w.r.t. x, we mean a quotient of two polynomials in X, allowing other expressions provided they do not involve x. For example, log{y)/{x — e — TT) is a rational function w.r.t. x, where K = Q(log(y), e, TT). We see from this example that computing in the algebraic closure K of K^ while possible in theory, is in general ineffective or impractical. Thus, modern algorithms try to avoid computing in extensions of K as long as possible.
Introduction The problem of integrating rational functions seems to be as old as differentiation. 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 factorization 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 algorithm 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 problem 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 rational part of the integral without factoring whatsoever. Although his method was taught to Russian students, and appears in older Russian analysis textbooks ([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 Ostrogradsky'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].
2.1 The Bernoulli Algorithm This approach, both the oldest and simplest, is not often used in practice because of the cost of factoring in R[a:], but it is important since it provides the theoretical foundations for all the subsequent algorithms. Let / G R(a:) be our integrand, and write / = P + A/D where P^A^D G M[x], gcd(A, D) = 1, and deg(^) < deg{D). Let n
m
D = c Y[{x - aiY'^' [ ] ( x 2 + bjX + CjY^ i=i
j=i
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
where the A^/c's, Bjk^s and Cjk^s are in M. Hence,
J^ J
ht^J (^~^^f ht^J ^^'^h^^^j)k' i=\k=\'' ^ "^ j=ik=i
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 f Ajk _ f Ak{x - a,)^-V(l - ^) if A: > 1 J (x-üi)^ \Aiilog{x-ai) if/c = l
(2.1)
and, noting that 6| — Acj < 0 since x'^ + bjX + Cj is irreducible in R[x] BjlX
+ Cnl
Bjl
T
/ 9
,
X
/
4c,-&2
VV^'^.-^'l
and for /c > 1, ßj/^x + Cjfc _ (2Cjfc — bjBjk)x + bjCjk — 2cjBjk (x2 + 6^x 4- c^)^ (A; - l)(4q - b^.){x^ + 6j:r + c^)^-^ (2A:-3)(2C,fc-6,ß,-fc) (Ä: - l)(4c^- - b]){x'^ + 6jx + Cj)^-^ ' This last formula can be used recursively until /c = 1, thus producing the complete integral. Example 2.LI. Consider / = l/{x'^-\-x) G Q(x). The denominator of/ factors over E as x"^ + X = x{x^ + 1), and the partial fraction decomposition of / is 1
l_
x^ -\- x
X
X
x^ + 1
So from the above formulas we get
Example 2A.2. Consider / = l/{x'^ + 1)^ G Q(x). The denominator of / factors over M as (x^ + 1)"^, and the partial fraction decomposition of / is l/{x^ + l)'^, so from the above formulas with j = 1^ k = 2^ bi = B12 = 0 and ci = C12 = 1, we get f dx 2x f 2dx X 1 J p n F " 4(x2 + 1) ^ i 4(x2 + 1) = 2(x2 + 1) "^ 2 ^"^^^^(^^ • A variant of Bernoulli's algorithm that works over an arbitrary field K of characteristic 0, is to factor D linearly over the algebraic closure of K^ D = ri?=i(^ — ^iY''^ ^^d then use (2.1) on each term of the following partial fraction decomposition of / :
38
2 Integration of Rational Functions
i=l
j=l ^
^'
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 -A79
yi,>.
A.ä-\
f =
^ \ \ 1 \— {x — ai)'^ {x — ai) (x — aiY' 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 1
___ _1
X^ + X
X
1/2 X + \ / ^
1/2 X -
So an integral of / is
/ x^ + x
log(x) - - log {x + v ^ ) - - log {x • ' ' 2 ^ ^ 2
Note that there exists an integral of / expressible without \/--T, namely (2.2). Since this algorithm can be based, on power series expansions, we call it a local approach. Its major computational inconvenience is the requirement of computing with algebraic numbers over K that might not appear in the integral, namely the coefficients of the Laurent series. This is the case in the previous example, in which the algorithm computes in Q ( ^ / ^ ) , but there exists an integral that is expressible over Q(x) only. On the other hand, there are integrals that cannot be expressed without the introduction of new algebraic constants, like j{dx/{x^ ~ 2)), which cannot be expressed without using \/2 ([75] Prop. 1.1), so in general we may need to introduce an algebraic extension of K at some point. In order to have a complete and efficient algorithm, we have to answer the following questions: Ql. How much of the integral can be computed with all calculations being done in K{x)l Q2. Can we compute the minimal algebraic extension of K necessary to express the integral? An algorithm that never makes an unnecessary algebraic extension and does not compute irreducible factorizations over K will be called "rational".
2.2 The Hermite Reduction
39
2.2 The Hermite Reduction We can see from the variant of Bernoulli's algorithm discussed above, that any / G K{x) has an integral of the form m
/ = ^ + E^^^^g(^^)
/
(2.4)
i=l
where v^ui^... ^ u^ G K{x) and C i , . . . , c^ G ÜT. i» is called the rational part of the integral, and the sum of logarithms is called the transcendental part of the integral. Hermite [43] gave the following rational algorithm for computing v: write the integrand as / = A/D where ^4, D G K[x] and gcd(74, D) = 1. Let D = D1D2 • •' D^ be a squarefree factorization of D. Using a partial fraction decomposition of / with respect to Di, I^^, • • •, -Dn? write
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
{k - l)BV'
(l-fc)C
yk
1/fc-i
^ "
•
Adding and subtracting B'/V''~^ to the right hand side we get Q _ ( B' yk yyk-i
{k-l)BV'\ yk
{l-k)C~B' yk-i
j
And integrating both sides yields
1^ J yk
= -^+ yk-i ^ J
{l-k)C-B'
[•
yk-i
Since deg((l — k)C — B') < deg(y^ ^), the integrand is thus reduced to a similar one with a smaller power of V in the denominator, so, repeating this
40
2 Integration of Rational Functions
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.
HermiteReduce(^,D)
(* Hermite Reduction - original version *)
(* 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 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)
Example 2.2.1. Here is H e r m i t e R e d u c e on x^ - 24x^ - 4x^ + 8x - 8 ^ ~~ x^ + 6x6 + 12x4 + 8^2
^ ^V^) •
A squarefree factorization of the denominator of / is D =: x^ + 6x^ + 12x^ + 8x^ = x2(x2 + 2)^ =
DIDI
and the partial fraction decomposition of / is:
/ = X-
1
-4X
- 6x3 __ 18^2 __ i 2 x + 8 (x2 + 2)3
Here is the rest of the Hermite reduction for / :
i
V
3
A.
B
C
2
X
1
x-1
1
-1
3 x2 + 2 2 x4 - 6x3 _ 28^2 _ i2x + 8 6x 3 x2 + 2 1 -x + 3 x^ - 6x ~ 2
-4+3X-2 1
2.2 The Hermite Reduction
41
Thus, 24x^ - 4^2 + 8x - 8 , 1 6x dx = -\, ^ ^ (x2 +, ^,n 2)2 x» + 6J:6 + 12^4 + 8x2
x-3 f dx 77——: + x^ + 2
We also mention t h e following variant of Hermite's algorithm t h a t does not require a partial fraction decomposition of / : let D = D1D2 • • • D'^ be a squarefree factorization of D and suppose t h a t m > 2 (otherwise D is already squarefree). Let then V = Dm smd U = D/V^. Since gcd{UV\V) = 1, we can use t h e extended Euclidean algorithm to find B^C G K[x] such t h a t
1 and deg{B)
^
= BUV
+ CV
< d e g ( y ) . Multiplying both sides by (1 — m)/{UV'^) A l/ym
__{l-m)BV' ym
so, adding and subtracting B'/V^"^ A l/ym
( B' \ym-i
'
gives
(l-m)C [/F^-i
to t h e right h a n d side, we get
{m~l)BV'\ ym
(l-m)C~-UB' f/l/m-i
J
and integrating b o t h sides yields A
/
UV^
B 1/m-i
f
{l~m)C-UB'
/
ijy
so the integrand is reduced to one with a smaller power of V in the denominator. This process is repeated until the denominator is squarefree. Since the exponent of one of the squarefree factors is reduced by 1 at every pass, the number of reduction steps in the worst case is 1 + 2 + • • • + (m — 1), which is 0{m'^) so we call this variant the quadratic Hermite reduction. HermiteReduce(/l,D)
(* Hermite Reduction - quadratic version *)
(* Given a field K and A,D E K[x] with D nonzero and coprime with A, return g^h E K{x) such that ^ = ^ + ^ ^^d h has a squarefree denominator. *) g ^0, (Di,..., Dm) ^ SquareFree(i:>) for 2 0 d o V ^ Di, U 0, D squarefree and gcd(^, D) = 1. Let R = resultant^(L), A - tD')
e K[t].
(2.7)
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 appropriate 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 minimal 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 functions 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 containing 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 factorization 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.
IntRationaILogPart(A,D)
(* Rothstein-Trager algorithm *)
(* Given a field K of characteristic 0 and A,D E K[x] with deg{A) < deg(D), D nonzero, squarefree and coprime with A, return J A/Ddx. *) t 0 of i?. We note t h a t the trailing monomial of R is ^^ riir=i-^(ft)) which is nonzero since gcd{A^C) = 1, so a 7^ 0. Since a has multiplicity n, then there is a subset I^ C { 1 , . . . ,g} of cardinality n such t h a t A{ßi) - aB{ßi) = 0 if and only if i e la. Hence G^ = Hi^j^i^ - ßi) divides A — aB in K[x]. But x — ßi ^ A — aB for i ^ /Q,, so Ga is a gcd of C and A — aB in K{a)[x]. Hence, deg^{gcd{C^A — aB)) = n, which implies t h a t n < deg(C). (i) If n = deg(C), then gcd(C, A — aB) is a divisor of C of degree deg(C), hence gcd(C, A — aB) = C. (ii) Suppose t h a t n < deg(C). Then, A — aB / 0, otherwise we would have gcd(C, A — aB) = gcd(C, 0) = C which has degree greater t h a n n. Let Sn G Ä'[t][x] be the n*^ subresultant of C and A — tB with respect t o x^ (J : K[t] —> K{a) be the ring-homomorphism t h a t is the identity on K and maps t to a, and ä : Ä'[t][x] —> K{a)[x] be given by ä (J2 CLJX^) — Yl cr{cij)x^Since A^B^C do not involve t, ö'(C) = C and 'ä{A — tB) = A — aB^ hence d e g ( ä ( C ) ) = g, and Theorem 1.4.3 implies t h a t 'ä{Sn) = c^Sn where r is a nonnegative integer and Sn is the n*^ subresultant of C and A — aB. Let {QoiQi^- • • ,Qi 7^ 0 , 0 , . . . ) be the subresultant P R S in if(a)[x] of C and A - aB if d e g ( ß ) < d e g ( a ) , or of yi - aB and C if deg{B) > d e g ( C ) . By Theorem 1.5.1, Qi is a gcd of C and A — aB, so deg^(Q^) = n. Hence, 'ä{Sn) is similar to Qi by Theorem 1.5.2, which implies t h a t ö'{Sn) ^ 0 and it is a gcd of C and A — aB, and in particular deg{'ä(Sn)) = n, Since deg^(5^) < n by definition, and deg(ä(6'^)) < deg3,(5^), we have deg^{Sn) = n. By Theorem 1.5.2, Sn is similar to some Rjn for m > 0, which implies t h a t deg^{Rm) = TI. Since deg(jRo) ^ deg(C) > n, we have m > 1, which implies t h a t m is unique, since deg(i?^) > deg(i?^^i) for i > 1 in any P R S . Write piSn = p2PPxi^rn) with pi,/>2 ^ -^[^] satisfying gcd{pi,p2) = 1. Then, cr(/)i)ä(S'^) = a{p2)ä{pp^{Rm)). Note t h a t ä ( 5 ^ ) / 0 and ö'(pp2,(i?^)) / 0 since pp^{Rm) is primitive. In addition we cannot have (j{pi) = (j{p2) = 0 since gcd{pi,p2) = 1. Hence, (j{pi) 7^ 0 and cr(p2) 7^ 0, so '^(pPx(^m)) = PPx{^m){o^-> x) IS a gcd of C and A — aB. D Now let A, 1} G K[x]\{0} with gcd(A, D) = 1, I ) squarefree and deg(A) < d e g ( D ) . Applying Theorem 2.5.1 with A = A, B = D' and C = D , we get i? = resultantx(D, A — tD') and for any root a of ß of multiplicity z > 0, we have i < deg(.D) and: (i) if i = deg(D), then gcd{D, A - aD') = D,
2.5 The Lazard-Rioboo-Trager Algorithm
51
(ii) if i < deg{D)^ then gcd(D, A — aD') = p p ^ ( f i ^ ) ( a , x ) where TTI > 1 is the unique strictly positive integer such t h a t deg^{Rm) = iThus, it is not necessary to compute the gcd's appearing in t h e logarithms in (2.8), we can use the various remainders appearing in t h e subresultant P R S instead. Since deg(D^) < deg(i9), we are in the case where deg(E) < deg((7), so we use the subresultant P R S of D and A — tD'. As long as the result is returned as a formal sum over the roots of some polynomials, all the calculations are done over K , no algebraic extension is required, and the formal algebraic numbers introduced by the sum are in the smallest possible algebraic extension needed to express the integral. In practice, we perform a squarefree factorization R = H l L i Q\^ ^^ ^^^ roots of multiplicity i of R are exactly the roots of Qi. Evaluating ppx{Rm) foit = a where ce is a root of Qi is equivalent to reducing each coefficient with respect to x of pp^(jR^) modulo Qi. We do not really need to compute pp^(Rm), it is in fact sufficient to ensure t h a t Qi and t h e leading coefficient with respect to x of Rm do not have a nontrivial gcd, which implies then t h a t the remainder by Qi is nonzero"^. Since multiplying the argument of any logarithm in (2.8) by an arbitrary constant does not change the derivative, we can make pp^{Rm){o^, x) monic in order to simpHfy the answer, although this requires computing an inverse in i f [a], but not computing a gcd in iir[a][x]. Since the Qi's are not necessarily irreducible over K, K[a] can have zero-divisors, but the leading coefficients of the pp^{Rm){c^^xys are always invertible in K[a\ (Exercise 2.7). This normalization step is optional.
I n t R a t i o n a l L o g P a r t ( A , D)
(* Lazard-Rioboo-Trager algorithm *)
(* Given a field K of characteristic 0 and A,D ^ K[x] with deg(A) < deg(D), D nonzero, squarefree and coprime with A, return J A/Ddx. *) t ^r- a. new indeterminate over K {R, (ßo, ß i , . . . , ß/c, 0)) ^ SubResultanta; (D, A - t ^) ( Q i , . . . , Qn) 0 do if i = deg{D) t h e n Si ^ D else Si t. Then, (i) \ca:{Wx{Pi)) = 1 fori t is B = { P i , P2} = {4^2 + 1, x^ + 2tx^ - 3x - 4t} . Thus, Qi = 4t2 + 1/1 = 4t^ + 1 and Si = P2, which yields the integral
/
x^ - 3 x ^ + 6 x^ - 5x4 + 5:^2 _^ 4
y^
a log(x^ + 2ax^ - 3x -- 4a)
a|4a2 + l=0
which is the same integral t h a t was obtained in example 2.4.1.
2.7 Newton—Leibniz—Bernoulli Revisited We have seen t h a t t h e difficulty with using formula (2.1), which dates back t o Newton and Leibniz, was the computation of the Laurent series expansions at the poles of the integrand. However, Bronstein and Salvy [15] gave a rational algorithm for computing those series. T h a t algorithm can be then used t o make the full partial fraction approach rational, so we describe it here. The basic result is t h a t the ^^^'s of
(x — aiY'-
(x — aiY
(x — ai)
can be computed as functions of the a^'s without factoring. T h e o r e m 2 . 7 . 1 . Let A, P) G K[x] with D monic and nonzero, gcd(yl, D) = 1, and let D = D1D2 • • • D^^ be a squarefree factorization of D. Then, using only
2.7 Newton-Leibniz-Bernoulli Revisited
55
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^
i = l a\Diia)=0
\(x-aY
X- a
^^
'
where P is the quotient of A by D. Proof We first describe the construction of the iJ^^'s: let i G { 1 , . . . , n}, Ei =
D/Dl and 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 BiEi = 1 (mod Di)
and
dD^ = 1 (mod A ) •
(210)
For j = 1 , . . . , z, compute hi'~'^^/{i — j)\ and write it as
where Py- is a polynomial with coefScients in K. Let then
and finally let Hij = Qij S r ' ^ ' Ci'~'
(mod Di)
(212)
where Bi and Ci are given by (210). We prove now that the iJ^j's given by (212) satisfy the theorem. Let K be the algebraic closure of K^ a E K he di root of D^, Di^a = Di/{x — a), and
Since hi^^ is just hi evaluated at t^ = Di^oc^ we have
f^-i) _ p,, ( x , A , « , i ) U ' ^ " « ' • • •'A^:«'0 (^-i)! D^'-^Et'^' 2,a where P^^ is the same polynomial as in (2.11). We have Di = {x — a)Di^a^ so for k > 0,
56
2 Integration of Rational Functions
since (x — a)^-^'' = 0 for j > 1. Hence,
for Ä: > 0, which impUes that Qij{a) =
Pijla,D',{a),-
2
'
3
'
'
i-j+1
I
= Pi^ (^a,D,,^{a),D[Ja),D'l^ia),...,Dii-'\a)) In addition, (2.10) implies that Bi{a) = l/Ei{a) Hij{a) =
.
and Ci{a) = 1/Dl{a), so
Qij{a)Bi{ay-^+'Ci{af'-^
2,a
V
/
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
so the Laurent series of AjD at x = a is
D
(x - ay
(i - j)! (a: - a)^
^
—"^ {^ - ^^V
which proves the theorem.
D
This theorem yields an algorithm for computing Laurent series expansions of rational functions. We can make an additional improvement: it is possible that for given i and j ' s , Gij = gcd{Hij, Di) is nontrivial. This means that for a root a of C^j, the coefficient of l/{x — a)^ in the expansion of A/D is 0. When this happens, we replace Di by Dij = Di/Gij^ and return the partial fraction decomposition of A/D in the form
p+EE
E
where all the summands are guaranteed to be nonzero.
2.7 Newton-Leibniz-Bernoulli Revisited
57
L a u r e n t Series (A, D,F,n) (* Contribution of F to the full partial fraction decomposition of A/D *) (* Given a field K of characteristic 0 and A,D,F G K[x] with D monic, nonzero, coprime with A, and F the factor of multiplicity n in the squarefree factorization of D, return the principal parts of the Laurent series of A/D at all the zeros of F. *) if deg(F) = 0 t h e n r e t u r n 0 14 Vj) h ^ h'/ij +1) F'^F/gcd{F,Q) if cleg(7^*) > 0 t h e n H ^ QB^+iC"-+^ mod F* return a
Example
2.7.1. Consider
Applying L a u r e n t S e r i e s to A = 36, D = (x - 2)(x^ - 1)^, F = x^ - 1 and n = 2 we get: 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 , 5. 6. 7. 8.
7;o = F ' = 2:r, Q = eval(36, u-^ VQ) = 36, so gcd(x2 - 1, Q) = 1, F * = a:2 - 1, i J = - 3 6 {x + 2 ) / 3 (x/2)2 mod x^ - 1 = - 3 x - 6,
9.h = h' = ( ( - 7 2 x + 144)^' 10. P = ^^(x - 2)2/i = ( - 7 2 x l l . t ; i =F"/2 = 1, 12. Q = eval(P, u -^ VQ, U' -^ 13. P * = ( x 2 - l ) / ( x - l ) = x
- 36ii)/(w^(x - 2)^), + 144)i^' - 36ii, vi) = - 1 4 4 x + 144, so gcd(x2 - 1, Q) = x - 1, + l,
58
2 Integration of Rational Functions
14. H = (-144x + 144) {{x + 2)/3)2 {x/2f
mod (x + 1) = - 4 , so a = er +
Hence, the sum of the Laurent series of / at the roots of x^ — 1 = 0 is 36 x^-2^4-2x3+4x2+x-2
^ V I Z_^
~3^~^I (x-a)2|
4 x+1
'
\Q;^ —1=0
FullPartialFraction(/) (* Full partial fraction decomposition of / *) (* Given a field K of characteristic 0 and / G K{x), return the full partial fraction decomposition of / . *) D Z-^
a logfx^ + 2ax^ - 3x - 4a). sv -r J
(2.15) \ J
a|4a2 + l=0
The zeros of 40^ + 1 are a = ±i/2 where i^ = — i^ so, applying (incorrectly) the fundamental theorem of calculus to the above integral with x = 2 and X = 1, we would get for the definite integral ^ log(2 + 2t)~'-
log(2 - 2i)\ - (^log(-2
- 0 - ^ log(-2 + i)
OTT
—
/1\
^ arctan
- R^ —3.46 . 4 \2j As explained above, this result cannot be the correct area. Thus, it is preferable 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 integrand 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,
Proof. Writing i = y—T7 ^^ immediate calculation yields
d . I - j ~ log
dx
fu-^i\ \u — i J
fu — i\
d fu + i
\u -^ i J dx \u — i^ u — i\ du {u ~ i) — (u i- i) u-\-iJ dx (lA — 2)2 du/dx d .: —7^ 7 = 2 -—- arctan(ii) . u^ -\-l dx
2.8 Rioboo's Algorithm for Real Rational Functions
61 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 antiderivatives, 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): y^
alog(a:^ + 2ax^ - 3x - 4a)
a|4a2 + lzzr0
- log {x^ - 3x + i{x^ - 2)) - 2 log (^ log
x^ -~3x + i{x'^ - 2) x^ — 3x — i{x'^ — 2)
arctan
- 3x — i{x x^
-3x"
•2)) (2.18)
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 —^
To avoid this problem, Rioboo gave an improvement to Lemma 2.8.1 where the argument of the arc-tangent is a polynomial in x instead of a fraction.
62
2 Integration of Rational Functions
T h e o r e m 2.8.1 ([72]). LetA.B
e K[x]\{0}
d ^ fA^iB\ "1 ^ dx log^\A-iBj
be such thatA^-^B^
^ 0. Then,
d ^ f-B + iA = 1dx- log ""y-B-iA
and, for any C^D E K[x] such that BD — AC = gcd(A^B), .d^ fA + iB\ ^d fAD^BC\ i —— —- = 2 dx -—- arctan \gcd{A,B)J — dx log ""yA-iBj
C ^ 0 and
d^ fD + iC + ^dxT" ^og "^ \D - iC
where i^ — —1. Proof. We have A + iB _ {-{) {-B + iA) _ -B-^iA A-iB ~ i {--B - iA) ~ ~~BiA so, taking logarithmic derivatives on both sides, d ^ fA-i-iB\ d , f-B l^g ~A ^ h = 1 - log
dx
\A~iBj
dx
+ iA
\-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 A~iB
.d^ dx
fD--iCA + iB\D + iC \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
fA + iB\ \A — iB J
.d^ dx
fP + i\ \P —iJ
^d
,^.
d^ dx
fD + iC \D — iC
Hence, by Lemma 2o8.1, d^ I-
fA-^iB\
dx ^°^ X I l S
.d,
fD + iC
= ' d^ "'^^^^'^^^ -^'TJ''^\D-^C D
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
as a sum of arc-tangents with polynomial arguments: since G = gcd(A, 5 ) , we have deg(G) < d e g ( 5 ) . If d e g ( ß ) = deg(G'), then B\A,soG = B, which implies t h a t D = 1 and (7 = 0, hence t h a t P = {AD + BC)IG = A/B e K[x] and t h a t -— = 2 —- a r c t a n ( P ) ax ax by Lemma 2.8.1. If deg{A) < deg{B),
then
f-B-ViA df d ^ -r- log \ —B — lA dx — i dx 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 process terminates. LogToAtan(A, B) (* Rioboo's conversion of complex logarithms to real arc-tangents *) (* Given a field K of characteristic 0 such that -s/--T ^ K, and A, B G ^l^] with B j^ 0, return a sum / of arctangents of polynomials in K[x] such that df d ., fA-hiB —- = -— ^ log ' dx dx \A — iB *) if B\ A t h e n r e t u r n ( 2 arctan(A/5)) if deg{A) < deg{B) t h e n r e t u r n L o g T o A t a n ( - B , A) (D, C, G) ^ E x t e n d e d E u c I i d e a n ( ß , -A) {^ BD - AC = G *) r e t u r n ( 2 arctan((ylD + BC)/G) + LogToAtan(i:), C))
Example 2.8.1. Plugging in a = ± i / 2 in (2.15), we get \r^
1 / ^
^
2
o
. N
^1
/ ( x ^ - 3 x ) + 2(x2-2)
Applying L o g T o A t a n to A = x^ — Zx and ß = x^ — 2, we get
64
2 Integration of Rational Functions
A
B
C
x^ — 'ix x^-2
xß
x2/2 - 1/2 x/2 2 2x
2
D
G
(yl£) + ß C ) / G
^2/2 - 1/2 1 a;V2 - 3x3/2 + a:/2 x3 2x 1
SO the integral is x'^ - 3 x ^ + 6
(ix = arctan
x^ - 3x^ + X
arctan(x^) + arctan(x) (2.20)
which differ from (2.18) only by a step function (Fig. 2.2).
Fig. 2.2. A continuous formal integral of
x6~5a;4-}-5x2+4 "
Using (2.20) to compute the integral (2.14), we get the correct answer:
1 x^ ~ 5x4 4 - 5 ^ 2 + 4
dx = arctan(5) + arctan(8) + arctan(2) arctan ( — - j -- a r c t a n ( l ) — arctan(l) arctan(5) + arctan(8) ,
TT
TT
arctan(5) + arctan(8) Pä 2 . 8 1 .
TT
2.8 Rioboo's Algorithm for Real Rational Functions
65
T h e above algorithm returns a real primitive given an expression of t h e form (2.19). B u t the integration algorithms return a sum of terms of t h e form Y^
alog{S{a,x))
(2.21)
a\R{a)=0
where R G K[t] is squarefree, and S G K[t^x]. In order to complete Rioboo's algorithm, we need to convert such a sum t o one where all t h e complex logarithms are in the form (2.19). This conversion can be done whenever K is a real field, which is an algebraic generalization^ of the subfields of t h e real numbers. D e f i n i t i o n 2 . 8 . 1 ([3]). Let K be a field. K is a real field if —1 cannot be written as a sum of squares of elements of K. K is a real closed field if any real algebraic extension of K is isomorphic to K. E is a real closure of K if E is a real closed algebraic extension of K. 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 definition 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
is a real function. We then compute P, Q ^ K[u^v\ such that = ^rj{u-\-ivy
= P{u,v) ^iQ{u,v),
(2.23)
and A^B G K[u^v^x] such that S{u + iv,x) = ^Sjkiu^ivYx^
= A{u,v,x)
-\~iB{u,v,x).
(2.24)
Since K = IK(z), it is a vector space of dimension 2 over K with basis (l,i), so for a £ K, R{a) = 0 if and only if P(a, b) = Q{a, b) = 0 where a = a + ib. Furthermore, a ^ IK if and only if 6 7^ 0. Hence, we can rewrite (2.22) as f = 9+
Yl
{a + ib)log{S{a-i-ib,x))
(2.25)
a,beK,bj^O P{a,b)=Q{a,b)=0
Let a be the field-automorphism of K such that a(i) = —i and a{z) = z for any z e K, and define W : K[x] —^ K[x] by ä{J2ajX^) = J^^i^j)^'^- Let a^b eK. Applying W to (2.24) we get A{a^ b^x) — i B{a, 6, x) = cr{A{a, 6, x) + i J5(a, 6, x)) = W{S{a + i 6, x)) = S{a(a + 25),a:) = 5(a — ib^x). Applying a to (2.23) we get P{a, b) - i Q{a, b) = a{P{a, b) + i Q{a, b)) = a{R{a ^ib)) = R{a{a + i5)) = R{a - ib) 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 f = g-h
Y
{(« + ^ ^) log(*5'(ß -^ib,x))
+ {a-~i b) log{S{a ~ i 6, x))}
a,beK,b>0 P{a,b)=Q{a,b)=0
= 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
^ ib (log(A(a, 6, x) + i ß ( a , 6, x)) ~ log(74(a, 6, x) — iB{a^ 5,x)))} .
2.8 Rioboo's Algorithm for Real Rational Functions
E
/ == g + h +
-^l»g(1^^'1^'o!"'''1'l
67
(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]. Proof Let a, 5 € IK be such that P{a^ b) = Q{a^ b) = 0 and 6 7^ 0 where P and Q are given by (2.23). Then, R{a + ib) = 0 where i^ ^ - 1 and i? = P + iQ is a squarefree factor of the Rothstein-Trager resultant of C — tD' and D. Furthermore, since A and B are given by (2.24), S{a + ib,x) = A{a^b^x) + iP(a, 6,x) is a gcd in K{a + ib)[x] of C — (a + ib)D' and J9, so there exist E and F in K{a + ib)[x] such that C{x) - (a + ib)D'{x) = E{a + z6, x)S{a + ib, 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 C{x) - {a + ib)D\x) and
= {Ei{a,b,x) + iE2{a,b,x)){A{a,b,x)
-i-iB{a,b,x)) (2.27)
68
2 Integration of Rational Functions D{x) = (Fi(a, b, x) + iF2(a, 6, x)){A{a, 6, x) + 25(a, 6, x)).
(2.28)
Taking the imaginary part of (2.27) and the real part of (2.28) we get -~hD\x) = Elia, 6, x)B{a, 6, x) + ^2(0,6, :2:)^(a, 6, x)
(2.29)
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)
which is a linear combination of A{a,b,x) and B{a,b,x) with coefficients in isr(a,6)[x]. Since 6 ^ 0 , this implies that gcd(A(a, 6,x), ß(a, 5,x)) = 1 in ir(a,6)[x]. D As a consequence, we can perform Rioboo's conversion to arc-tangents generically, i. e. expand once . ' A(u,v,x) + i B(u,v,x) % log ^ A{u, v^x) — i B{u, V, x) where u and v are independent indeterminates, obtaining a real function (j){u,v,x). We can then rewrite (2.26) as 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 *) (* Given a real field K^ R G K[t] and S G K[t,x], return a real function / such that
£ = ^ E «M5(a,a.)). cx\R{cx)=0
*) 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 y^
a log {A{a, b, x)^ -f B{a, b, xf)
+ b L o g T o A t a n ( ^ , B){a, 6, x)
a,beK,b>0 P(a,b)=Q(a,b)=0
+
^
alog(S'(a,x)).
aeK,R(a)=0
Example
2.8.3. Applying L o g T o R e a l to t h e integral (2.15), we have
R{t) = 4^2 + 1 G Q[t],
5 ( t , x)=x^
+ 2tx^ -3x-4te
Q[t, x],
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^ 2 arctan I
-3x^
+ x\
^ / sx ^ 1 + 2 arctan(x ) + 2 arctan(x)
as seen in example 2.8.1, so multiplying by 6 = 1/2 we get the same integral as in example 2.8.1. Instead of solving the system P{u^v) = Q{u^v) = 0 in step 3, we can call L o g T o A t a n ( x ^ + 2ux'^ — 3x — 4tx, 2vx'^ — Av)^ which returns /
N
r^
f X
U\
iu.v.x) = 2 arctan \— ^ ' ' ^ \2v vJ , x'^ 2u o 4u^ + 4v^ - 1 + 2 arctan ( 1 x H ^— x 2v V 2v
u V
70
2 Integration of Rational Functions X
5
., U
+ 2 arctan
o,2 I , , 2 4 | " ' - T - t v - ± 3
\— x A \4:V
V? -i-v^ - l . ^ x
V
V
3ii 2^ x
OL6
V
81/2 _,_ 3^2 __ 3 x + Av
^ V
and the integral would be returned formally as —7
z
T;
dx =
>^
b(h(a,b,x)
a,beR,b>0 4a^-4b'^-\-l=8ab=0
which is a real function. Plugging in a = 0 and 6 = 1/2 in this result, we get the same integral as previously.
IntegrateReaIRationalFuiiction(/)
(* Real rational function integration *)
(* Given a real field K and / G K{x)^ return a real function g such that dg/dx = / . *) m
Y^ i=l
a log{Si{a,x))
1, and we can use Mafik's criterion [63], which states that A/D'^ is the derivative of a rational function for m > 1 if and only if 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 functions, 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
Recognizing Logarithmic Derivatives 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 using the Hermite reduction and the Rothstein-Trager algorithm. Exercise 2.2. Compute
/
8x^ + x« - 12x^ - 4x^ - 26x^ - Gx^ + SOx^ + 23^2 - 2x - 7 dx ^10 _ 2^8 - 2x^ - Ax^ + 7x4 + 10x3 + 3x2 - 4x - 2
using the Lazard-Rioboo-Trager algorithm. Exercise 2.3. a) Compute 72x'^ + 256x^ - 192x^ - 1280x4 _ ^i2x^ ^ 1440x2 _^ 575^ _ 9g dx 9x8 j^ 36^7 _ 32:^6 - 252x5 „ 73^4 ^ 458x3 _^ 288x2 „_ IQSX + 9 using the Rothstein-Trager or the Lazard-Rioboo-Trager algorithm. With that integral compute the symbolic definite integral for —2 < x < —2/3 and compare it with the result obtained by direct numerical integration. b) Apply the Rioboo algorithm to the above result and compute again the definite integral for — 2 < x < — 2/3. 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
E x e r c i s e 2.5 ([66]). Compute x'^ H- x^ + x^ + X + 1 + x4 + 2x3 4- 2^2 - 2 + 4 \ / - l + \ / 3 ax using the Lazard-Rioboo-Trager algorithm. W h a t happens if the subresultants are not made primitive before evaluating them? E x e r c i s e 2 . 6 . Write procedures for the Hermite Reduction, the L a z a r d Rioboo-Trager algorithm and the Rioboo algorithm using your favourite programming language or computer algebra system. E x e r c i s e 2 . 7 . Modify the Lazard-Rioboo-Trager algorithm so t h a t in t h e result, the polynomials inside the logarithms are monic in x. Note t h a t t h e polynomials Qi{t) indexing the sums of logarithms are not necessarily irreducible (show first t h a t the leading coefficients of the polynomials inside t h e logarithms must be units in K\t]/{Qi{t))). 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 continuous in R). c) Apply to your integral the transformation t h a t sends arctan(a t a n ( x / 2 ) + 6) to X ( 2ab cos(x) — (1 + 6^ — a^) sin(x) - 4- arctan f \ J \ J \ J V (1 + «)^ + ^^ + (1 + ^^ - «^) cos(x) + 2absin(x) 2 and verify t h a t the resulting function is an integral of 3/(5 — 4cos(x)) t h a t is continuous in M.
Differential Fields
We develop in this chapter the algebraic machinery in which the integration algorithms 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. Definition 3,1.1. Let R be a ring (resp. field). A derivation on R is a map D : R —^ R such that for any a^b G R: (i) D{a + b) = Da^ Db, (ii) D{ab) = aDb + bDa. The pair (fi, D) is called a differential ring (resp. fieldj. The set Consti)(i?) = {a E R such that Da = 0}
76
3 Differential Fields
is called the constant subring (resp. subfieid) of R with respect to D. A subset S C R is called a differential subring (resp. subfieid) of R if S is a subring (resp. subfieid) of R and DS C S. 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. T h e o r e m 3.1.1. Let (R^D) be a differential ring (resp. field). Then, (i) D{ca) — cDa for any a E R and c E Consto^R). (a) If R is a field, then a bDa — aDb b 62 for any a^b E R, b ^ 0. (Hi) Const/) (i?) is a differential subring (resp. subfieid) of R. (iv) Da^ = nd^~^Da for any a E R\ {0} and any integer n > 0 (resp. any integer n). (v) Logarithmic derivative identity: if R is an integral domain, then D{u\K..ul-) L^...
for any ui,...
__
Du^
Un
j_
^
Ui
,Un E R* and any integers ei,
(vi) ^
dP Ui
for any i^i,..., i^^ in R and polynomial P with coefficients in Constu{R). 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, Da = D{bc) = bDc + cDb = bD^ + ^ Db. Hence, a _,\
D-b = -b VDa--Db] b
J
=
bDa — aDb 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
a differential subring of R. Suppose that jR is a field and that d ^ 0. Then, D{l/d) = —Dd/d^ = 0, so l/(i G C, which implies that C is a differential subfield of R. (iv) Let a £ R\ {0}. For n = 1, Da^ = Da = la^Da. Suppose that Da"" = na^~^Da for some n > 1. Then, Da^+i = D{a''a) = a'^Da + aDa"" = a'^Da + aina'^-^Da) = {n + l)a'^Da 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 r^ n
n 1
^«~"
-na-^~'Da
,_.
(v) is left as Exercise 3.1 at the end of this chapter. (vi) Let X i , . . . , Xn be indeterminates, P £ Const£>(i?)[Xi,..., Xn] and write n
(e) = (ei,...,e„,)
i=l
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
IZ (e)=:(ei,...,e,,,)
-(e) 1 ] eiuf-^Dui i=l
n
J l li^'^' .^^
^^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. L e m m a 3.1.1. The set Q{R) of all the derivations on R is a left-module over R. Proof Let D^ D2 ^ f^{R) and c e R. Let D = cDi + D2, i.e. D : R-^ R is defined by Da ~ cDia + D2a for any a £ R. Let a^b £ R. Then, D{a + b) = cDi{a + b) + D2{a + 6) = cDia + cDib + D2« + D2b = Da + Db,
78
3 Differential Fields
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 differential 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
3.2 Differential Extensions We study in this section the problem of extending a given derivation to a larger ring or field. As in the previous section, the rings and fields in this section can have arbitrary characteristic. In classical algebra, roots of equations or new indeterminates are added to a given ring in order to create a larger ring. An obvious question is then, if the initial ring admits a derivation D, can it be extended to a new derivation on the larger ring? If this is the case, and the new derivation is compatible with D, we say that the larger differential ring is a differential extension of the initial one. The following definition formalizes the notion of "compatibility with D". Definition 3.2.1. Let (R^D) and {S^A) be differential rings. We say that (5, A) is a differential extension of (ß, D) if R is a subring of S and Aa = Da for any a £ R. We first show that any derivation on an integral domain has a unique extension to its quotient field, and this extension is given by the usual rule for differentiating quotients. T h e o r e m 3.2.1. Let R be an integral domain, F the quotient field of R and D a derivation on R. Then there exists a unique derivation A on F such that (F, A) is a differential extension of (ß, D). Proof Define A : F ^ F SiS follows: for any x E F, write x = a/b where a^b e R, b y^ 0^ and let Ax — {bDa — aDb)/b'^. Suppose that x = a/b = c/d for a, b^c^d G R. Then, ad = bc^ therefore: bPa - aPb ^^^
dDc - cDd _ d%Da - d^aDb - b'^dDc + b^cDd ^2 "~~ b^d^ ____{bDd + dDb){bc - ad) + abdDd _ _ - bcdDb + bd{dDa - bDc) __ D{bd){bc - ad) + bd{dDa + aDd - bDc - cDb) b^d^ D{bd){bc - ad) + bdD{ad - be) 0 _ _
which impHes that A is well defined. Let now x,y e F and write x ~ a/b^y c/d where a, b^c^d G R. By a calculation similar to the one above, we get: ^ad + bc
bdDiad + be) - (ad + bc)D(bd)
__ bcfPa + abdPd + bcdPb + b^dPc - abdPd - ad?Dh - bcdPb - b'^cDd bPa~aPb and
dPc-cPd
3 Differential Fields ^ac
hdDiac) — acD(hd) abdDc + bcdDa — abcDd — acdDb b^d^ ajdDc - cDd) cjbDa - aPb) xAy + yAx bd? "*" d^ '
so Zl is a derivation on F. Take a E R^ and write a = a / 1 . This implies that Aa — {IDa — aDl)/l^ — Da^ so (F, A) is a differential extension of (i?, D). Suppose that there are two derivations Zli and A2 on F such that (F, Ai) and (F, A2) are both differential extensions of (R^D), and let x £ F. Write X = a/b where a,b £ R and 6 7^ 0. From part (ii) of Theorem 3.1.1 we have a bAia — aZ\i6 bDa — aDb ^1^ = ^11 = p = p =
bA2a — aA2b a p =A2-^=A,x
SO Al = ZI2, which shows that A as defined above is the only derivation on F such that (F, A) is a differential extension of ( ß , D). D Definition 3.2.2. Let R be a ring and X an indeterminate over R. For any derivation D on R, we define the coefficient lifting of D to be the map KJJ : R[X] -> R[X] given by
KniY^^iX') = Y.^Da,)X\ i=0
i=0
The map KD simply applies the derivation D to every coefficient of a polynomial 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 = n
YA=O
^i^'^ ^^^ Q = SlLo ^i^^- Then,
n
n
and 2n
2n
KD{pq) = J2^( E a^&i)^' = E E ^ M i ) ^ ' k=ö
. .^^ i-\-j=k
2n
i-j-j=k 2n
= E E «'^^^•^' + E E ^^-^«^^
so
tZD
is a derivat;ion on Ä[X].
D
3.2 Differential Extensions
81
If R is an integral domain, then R[X] is an integral domain, so, by Theorem 3.2.1, KD can be extended uniquely to a derivation on its quotient field R{X) (example 1.1.14), and we also write KJJ for this extension to R{X). L e m m a 3.2.2. Let (R^D) be a differential ring, {S^A) a differential extension of (Ä, D), and X an indeterminate over R. Then, dP A{P{a)) = KD{P){a) + {Aa) — {a) for any a G S and any P G i?[X]. Proof This follows directly from the sum and product derivation rules: write P = J2^=o ^iX^ where the a^'s are in R. Then Aai = Doi for each z, so / n
\
n
n
\i=0
= no{P){a)^{Aa)
dP — {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
^ 1 ^ = ^' 6 = — p —
b{KDCi + w da/dt) — a{KDb + w db/dt)
= =
p bA2a — aA2b .a . p = Ä,-=Ä,x
82
3 Differential Fields
so Al = Zi2, which shows that A as defined above is the only derivation on F{t) such that At = w and {F{t)^ A) is a differential extension of (F, D). D 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. Example 3.2.2. Let {F^D) be a differential field and t be transcendental over F . Let Zl be an extension of D to F(t) satisfying Zlt = 0. Since (F(t),/^£)) is a differential extension of (F, D) and Kjjt — 0, Theorem 3.2.2 implies that A — H.-D.^ i.e. the only extension of D to F(t) for which t is constant is KJ). We now turn to algebraic extensions of differential fields. The assumption that F is separable over F in the next theorem is needed for the case where F has nonzero characteristic, and F separable over F means that the minimal irreducible polynomial over F for any element of F has no multiple roots. In characteristic 0, algebraic extensions are always separable, so the reader interested in this case only can ignore the separability hypothesis. In addition, we use Zorn's Lemma in the proof to allow for non-finitely generated extensions. That part of the proof can be skipped if one considers only finitely generated algebraic extensions. T h e o r e m 3.2,3. Let (F^D) be a differential field, and E a separable algebraic extension of F. Then, there exists a unique derivation A on E such that (F, A) is a differential extension of (F^D). Proof. Suppose first that F = F{a) for some a £ E. Let X be an indeterminate over F , and P G F[X] be the minimal irreducible polynomial for a over F . Then, since F is separable over F , dP/dX{a) ^ 0, so let 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 7r{AP) = 7r{KDP + Qjx)-
dP ^D{P){a) + w —{a) = KD{P){a)-KD{P){a) =0
hence AP G ker(7r) = (P), so ker(7r) is a differential ideal, which implies by Lemma 3.L2 that A induces a derivation A* : F -^ F such that iroA = zl*o7r„ Finally, for a G F , we get
3.2 Differential Extensions A*a = A^ixa = irAa =
83
+ Q -prp) = 7r{Da) = Da dX. so (£", Z\*) is a differential extension of {F^D). Let now E be any algebraic extension of F , and let 5 be the set of all pairs {K^ A) such that (i^, A) is a differential extension of (F, D) and ÜT C E. Define a partial ordering on 5 by {Ki^Ai) < {K2^A2) if (^^2,^2) is a differential extension of (i^i,Z\i). Since {F^D) G 5*, 5 is not empty, so let C •= {(i^i, Zii)} be a totally ordered subset of S, and let K = \^^Ki and define Zi on ÜT by Ax — Aix \i x ^ Ki. Since C is totally ordered, {K^ Zl) is a welldefined differential extension of (F^D). (K,A) is also a differential extension of [Ki^ Ai) for each i, so (ÜT, Zl) € 5 is an upper bound for C with respect to 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
i=l
J
i=l
i=l
i=2
so {Dx2,. ..,Dxn) e ker(A1(y2,---,yn))- If Dx2 = ... = Dx^ = 0, then x i , . . . , Xn £ C, so y i , . . . , y^ are linearly dependent over C. If Dxi ^ 0 for some i > 1, then ker(A^(y2, • • •, Vn)) i=- {0}, so ^2, • • •, Vn are linearly dependent over C by induction, which implies that ?/i,..., ?/^ are linearly dependent over C. D As a consequence, linear independence over the constants is independent of the constant field, hence preserved under differential extensions. Corollary 3.3.2. Let (F, D) he a differential field and (£", A) he a differential extension of (F^D). If S C F is linearly independent over Consti:)(F)^ then S is linearly independent over Const/^(£'). Proof. Let S C F he linearly independent over ConstD(F) and { s i , . . . , 5^} be any finite subset of S. Then, W ( s i , . . . , 5 ^ ) 7^ 0 by Lemma 3.3.5. But s i , . . . , s^ G F , so by Lemma 3.3.5 applied to (F, Zl), { s i , . . . ,s^} is linearly independent over Const/i(£'). Since this holds for any finite subset of 5, S is linearly independent over Const^(E). D The following lemma states that if an algebraic system of equations and inequations is satisfied by constants, then it is also satisfied by algebraic constants. L e m m a 3.3.6 ([51]). Let (F^D) he a differential field with algebraically closed constant field, (E^A) he a differential extension of (F^D), X i , . . . , X m he independent indeterminates over F, g G F [ X i , . . . , Xm] cind S he any suhset of F[Xi,..., Xjn]- If there are c i , . . . , c ^ G Const^(£') such that g{ci,... , c ^ ) 7^ 0 and / ( c i , . . . , Cm) = 0 for any f in S, then there are also such c i , . . . , c^ in Const D{F).
90
3 Differential Fields
Proof. Let C = ConstD{F)
and
V{S) = { ( a i , . . . , a ^ ) G C ^ suchthat / ( a i , . . . , a ^ ) = 0 for all f e S} . Since F is a field containing C, it is a vector space over C, so let ß be a vector space basis for F over C. Then, B generates F[Xi,..., Xm] as a free module over C [ X i , . . . , X ^ ] so write each / in 5 as / = J^beB ^f,b^ where hf^b G C[Xi,..., Xm] and all but finitely many of the hf^b are identically 0. Let / C C [ X i , . . . , Xm] be the ideal generated by all the hf^b and V{I) = { ( a i , . . . ,am) G C^ such that h{ai,...
, a ^ ) = 0 for all h e 1} .
By construction, we have V{I) C F(S'). Let c i , . . . , c^^ G Const^(-E) be such that g{ci,..., c^) 7^ 0, which implies that ö' 7^ 0, and / ( c i , . . . , c^) = 0 for all f E S. Then, for each / G 5, 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
Evaluating that equality at ( X i , . . . , X m ) == (ci, • •., c^) yields 1 = 0. Therefore 1 ^ / , so by Hubert's Nullstellensatz (Theorem LLIO) V{I) ^ 0. Write now g — Ylbeßdbb where ^5 G C [ X i , . . . ,X^] and all but finitely many of the gb are identically 0. Suppose that ^ ( a i , . . . , a ^ ) = 0 for every ( a i , . . . , a ^ ) G V{I). As previously, this implies that ^5(01,... ,am) = 0 for every b e B and every ( a i , . . . , a ^ ) G V{I)^ hence, by Hilbert's Nullstellensatz (Theorem L L l l ) , that there exist positive integers rib such that g^^ G / for each b E B. Since /i(ci,... ,c^) = 0 for every /i G / , we get 5f^'(ci,...,c^) = 0, hence gbi^ii • • • 5^m) — 0 for every 6 G i5, in contradiction with g{ci^..., Cm) 7^ 0. Hence there exist ( a i , . . . , am) G ^(1) such that ^ ( a i , . . . , a^) 7^ 0. Since V{I) C V(5), this proves the lemma. D
3.4 Monomial Extensions We want to study simple transcendental differential extensions of the form k(t) where there is some amount of similarity between the derivations D and d/dt, which will allow us to apply the algorithms for integrating rational functions to such extensions. Recall that if /c is a differential field, K a differential extension of k, and t an element of K, then k{t) is a differential field itself if it is closed under the derivation D of Ü^. A condition for some similarity with
3.4 Monomial Extensions
91
d/dt is that D transforms polynomials in t into polynomials in t, i.e. that k\t] is closed under D^. Therefore, we study here differential extensions where the derivatives of polynomials are polynomials. In addition, we now restrict our study to fields of characteristic 0, so for the rest of this chapter, fc is a differential field of characteristic 0, K is a differential extension of A:, and D denotes the derivation on K. We first show that the requirement that Dt G k\t] is equivalent to k\t] being a differential subring of k{t). L e m m a 3.4.1. Let t E K. Then, Dt G k[t] 4=^ k[t] is closed under D. Proof. Suppose that Dt G k\t], and let p G k[t]. By Lemma 3.2.2, Dp = nD{p) +
{Dt)^^ek[t]
so k[t] is closed under D. Conversely, if k[t] is closed under D, then Dt G k\t] since t E k\t\. D Note that we did not require that t be transcendental over k in the above lemma. We can now define the class of differential extensions for which the integration algorithm will be presented later. This class is general enough to model the usual elementary transcendental functions of calculus. It consists of simple transcendental extensions for which k\t] is closed under D. Definition 3.4.1. We say that t £ K is a monomial over k (w.r.t. D), if (i) t is transcendental over k, (ii) Dte k[t]. In addition, we define then the D-degree oft to be S{t) = deg^(Dt)^ and the D-leading coefficient oft to be X{t) = lct{Dt). We call t linear if 6{t) < 1, nonlinear otherwise. Furthermore we let Tit G k[X] be the polynomial such that Dt = nt{t). Since the derivative of polynomials are polynomials in monomial extensions, we often need to know the degree and leading coefficient of a derivative. L e m m a 3.4.2. Let t be a monomial over k, and p G k\t]. (i) deg(Dp) < deg(p) -f max(0, 6{t) - 1). (ii) Ift is nonlinear and deg(p) > 0, then equality holds in (i), and the leading coefficient of Dp is deg{p) lc(p) A(t). Proof. If p = 0, then Dp = 0 and (i) is satisfied under the convention that deg(O) = —(X), so suppose that p ^ 0 and let n = deg(p). (i) We have Dp = noip) + {Dt){dp/dt) by Lemma 3.2.2. If n = 0, then dp/dt = 0, so deg{Dp) = deg{tvD{p)) < n < n -{- max(0, 5{t) — 1). Otherwise n > 0, so deg{dp/dt) = n — I and deg{{Dt)dp/dt) = n + ö{t) — 1. Hence, ^This condition is probably not even necessary (Exercises 3.7 to 3.11) but the integration algorithms have not been generalized to the extensions of [71].
92
3 Differential Fields deg{Dp) < max I deg{tvjj{p)),deg{{Dt) —) | < max(n,n + ö{t) — 1) = n + max(0, ö{t) - 1).
(ii) Suppose that t is nonlinear and n > 0. Then, (5(t) > 1 and deg((Dt) dp/^t) = n + 6{t) - 1 > n > deg(KD(p)) so deg(I^p) = n + (5(t) — 1. Since the leading coefficient of dp/dt is na^ where a is the leading coefficient of p, the leading coefficient of Dp is naX{t). D Let t E K he a, monomial over k for the rest of this section. It is well-known that for D — d/dt, every squarefree polynomial has no common factor with its derivative, and this fact forms the basis of the various squarefree factorization algorithms. This fact is not always true for more arbitrary derivations, so we introduce a name for the polynomials for which it still holds. Definition 3.4.2. We say that p G k[t] is normal with respect to D if gcd(p, Dp) = 1. We say that p is special with respect to D i/gcd(p. Dp) = p i.e. p \ Dp. In addition, we introduce the following notations for the sets of special and special monic irreducible polynomials: "^klty.k == {p ^ ^M such that p is special}, ^khhk ~ {P ^ "^klty.k such that p is monic and irreducible} . When the monomial extension is clear from the context, we omit the subscripts and simply write S and S^^^. A polynomial is not necessarily normal or special, but an irreducible polynomial p £ k[t] must be either normal or special, since gcd(p, Dp) is a factor of p. Note that k C S^ and that p G k[t] is both normal and special if and only if (p) = (1), which is equivalent to say that p £ k"". Special polynomials generate differential ideals, so there is an induced derivation on the quotient rings (Lemma 3.L2). More importantly, this induced derivation turns out to be an extension of D. L e m m a 3.4.3. Let p £ S \ k. Then, (p) is a differential ideal of k[t] and (Ä:[t]/(p), D*) is a differential extension of (k^D) where D* is the induced derivation. Proof. Let p £ k\t]\k he special. Then, p | Dp by definition, so (p) is a differential ideal of k\t]. By Lemma 3.L2, D* o TT = TT o D, where D* is the induced derivation on k\t]/{p) and TT :fc[t]-^ ^M/(p) is the canonical projection. Hence, D^'a = D*7r(a) = 7r{Da) = Da for any a £ k, which implies that {k[t]/{p)^D*) is a differential extension of (Ä:,D). D
3.4 Monomial Extensions
93
L e m m a 3 . 4 . 4 . Let p i , . . . ^Pm ^ k[t] be such that gcd{pi^pj) = 1 for i j ^ j , and let p = H ^ ^ I P ^ * where the e^ 's are positive integers. Then,
(
m
\
i=l
m
J i=l
Proof. Let a, 5 E k[t] and suppose t h a t gcd(a, 6) = L Then, gcd(a5, D{ab)) = gcd(a, D{ab)) gcd(6, D{ab)) = gcd(a, aDb + bDa) gcd(6, aDb + bDa) — gcd(a, bDa) gcd(6, aDb) = gcd(a, Da) gcd(6, Db). So by induction, gcd(p, Dp) = H I ^ i gcd(p^'% Z)(p|')). In addition, gcd(pf ,D(pf)) = g c d ( p r , e , p r " ' ^ P ^ ) = Pf"^ gcd(pi, e^Dpi) = p^^""^ gcd(pi, Dpi) which proves the lemma.
D
As a consequence, any normal polynomial must be squarefree. In addition, we get t h e multiplicative properties of special and normal polynomials, in particular t h a t tS is a multiplicative monoid generated by k and S^^^. T h e o r e m 3.4.1. (i)
Any finite product of normal and two by two relatively prime is normal. Any factor of a normal polynomial is normal. (ii) p i , . . . ,pn G cS = ^ Yri=iPi ^ ^• (Hi) p G S \{0} =4> q G S for any q G k[t] which divides p.
polynomials
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=\
since each pi is normal. Hence, p is normal. Let p G k\t\ be normal and write p = qh where q,h G k[t]. Since p is squarefree, we have gcd(g,/i) = 1, hence by Lemma 3.4.4, 1 = gcd(p. D p ) = gcd(g, Dq) gcd(/i, Dh)^ so gcd(g, Dq) = 1, which implies t h a t q is normal. (ii) Let a^b £ S^ then Da = ap and Db = bq for some p , g G k[t]. Hence, D{ab) — aDb + bDa = abq + bap = ab{p + q) so ab e S. P a r t (ii) follows by induction. (iii) Let p G 5 \ {0}, r G k[t] be an irreducible factor of p, and n b e t h e maximal exponent such t h a t r^ | p . Then, n > 1, since r | p, and p = r""/! for some h e k[t] with gcd(r, /i) = 1, so by Lemma 3.4.4,
94
3 Differential Fields r^/i = p = gcd(p, Dp) = gcd(r^/i, Dir^'h))
= r ^ - ^ gcd(r, Dr) gcd(/i, Dh).
Hence rh = gcd(r, D r ) gcd(/i,-D/i), which implies t h a t gcd{h^ Dh) = h and gcd(r, D r ) = r, hence t h a t r G S. Therefore, every irreducible factor of p must be special. Let now q E k[t] be any factor of p. If g E fc, then q G S hy definition. Otherwise, g is a nonempty finite product of irreducible factors of p, so it is special by part (ii). D As mentioned above, every normal polynomial must be squarefree. T h e converse is not always true however, and there is an important connection between t h e normality of a squarefree polynomial and the differential properties of its roots. This relationship is described by the following two theorems. T h e o r e m 3.4.2. Letk be the algebraic closure ofk, andp G k[t] be squarefree. Then, p normal 4=4> Da y^ ldt{a) for all roots a E k of p. Proof. Let p G k[t] be squarefree, and let a i , . . . , a^ € fc be t h e distinct roots of p, where n = deg(p) > 0. T h e factorization of p over k is then n
P = c J J ( t - ai) i=i
where c G k* is the leading coefficient of p. By Lemma 3.4.4 we have n
gcd{p,Dp)
n
= c J | g c d ( t - ai,D{t-ai))
= c J\gcd{t
i=l
- ai,Ht{t)
-
Dai).
i=l
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 T h e o r e m 3 . 4 . 3 . Let k be the algebraic closure ofk, andp G k\t\ \ { 0 } . Then, p G S 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 deg(g) = deg{bDe - eDb) - 2deg6 < 6{t) - 1 < deg(Dp) in contradiction with (3.2), so deg(a) = deg(6).
D
Thus, the existence of new constants in k{t) \ k implies that S^^^ is nonempty. The converse, whether the existence of nontrivial special polynomials imply the existence of a new constant, is a more difficult problem: a theorem of Darboux essentially states that if A; is a purely transcendental extension of its constant field, then the existence of sufficiently many elements of S^^^ is equivalent to the existence of a new constant in k{t) \k (see Exercise 3.6 and [27, 85, 93]). Fortunately, the situation is easier for the key monomial extensions appearing in the integration problem, where any element of S^^^ produces a new constant, as the next lemmas show. L e m m a 3.4.6. Suppose that Dt G k, and let p G k\t] be nonzero. Then, p^S
^=> D
[ P
\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,
pes ^=^ D fry-T^r-rrl = 0• Proof. Let p G k[t] be nonzero, and write q = p/lc{p). We have deg(g) = deg(p) and Dq - nqDt/t D (^) in for any integer n. Suppose that Diq/t'^^^^'f^) = 0. Then, Dq = deg{q)qDt/t, so q I Dg, which implies that g G ^S, hence that p G «S by Theorem 3.4.1. Conversely, suppose that p G 5, and write q = YYi=ii^ ~~ ^iY'' where the a^'s are in the algebraic closure of k and the e^'s are positive integers. Then, Dai = {Dt/t)ai for each i by Theorem 3.4.3, so n
Dq = J2 ^ii^^ - Dai)(t - aiY"~~^ jQ(t - ajf'^ ^Y^e,
—
which implies that D{q/t^^^^'i'^) = 0 .
(t-a,r^(t^a,r^
D
We need for later use to define one particularly interesting class of special polynomials. We first define some useful terminology. Definition 3.4.3. We say that u G k is a logarithmic derivative of a /c-radical if there exist v E k* and an integer n j^ 0 such that nu = Dv/v. Note that if n < 0, then we can write {~n)u = Dw/w where w = v~-^^ so we can always assume that the coefficient n is positive in the above definition. Example 3.4-i- Let k = Q{x) with derivation D = d/dx^ and u = l/(2x) G k. Since 2u = Dx/x^ li is a logarithmic derivative of a Q(x)-radical. In fact, u is the logarithmic derivative of y ^ , which is a radical over Q{x). On the other hand, Dv/v ^ Z for any -?; G /c*, so 1 is not a logarithmic derivative of a Q(x)-radical.
98
3 Differential Fields
It is clear from the definition that if we extend k to some extension field E^ then the logarithmic derivatives of /c-radicals become logarithmic derivatives of £^-radicals. However, when E is algebraic over k^ then an element of k that is not a logarithmic derivative of a /c-radical cannot become a logarithmic derivative of an E-radical. L e m m a 3.4.8. Let E be algebraic over k, and a G k. If a is not a logarithmic derivative of a k-radical, then it is not a logarithmic derivative of an E-radical. Proof. Suppose that a E k is not a logarithmic derivative of a Ä^-radical, and that there exist a E E* and an integer n / 0 such that na = Da/a. Since E is algebraic over k, let p G k[X] be the minimal polynomial of a over k^ and write p = X^ + Y^^=o ctiX'^ where the a^'s are in k and m > 1. Then, m—l
0 = D{p{a)) = mnaa^
+ V^ {Dai -\- inaa^)a* = q{a) i=0
where a = mna X ^ + EI^Ö ( ^ « ^ ^ + » " « « 4 ) ^ ' e fc[X]. Since p is the minimal polynomial for a over k^ p \ g, so q = mnap, which implies that Dai + inaoi = m n a a ^ for 2 = 0 , . . . , m — 1. Since p is irreducible and a / 0, a^ / 0 for some j in { 0 , . . . , m — 1}. We then have, Doj n[m — jja in contradiction with a not a logarithmic derivative of a Ä:-radical since n 7^ 0 and m. j^ j . D Definition 3.4.4. We say that q G k[t] is special of the first kind (with respect to D) if q E S and for any root a of q in the algebraic closure of k, Pa{o^) is not a logarithmic derivative of a k{a)-radical, where Dt-Da Pa = ——
,, ,,, € k{a)[t\.
In addition, we introduce the following notations: *^i,/c[t]:/c = {p ^ ^k[t]:k such that p is Special of the first kind} , ^^i\\t]'k ~ {P ^ *^i,/c[t]:/c such that p is monic and irreducible} . When the monomial extension is clear from the context, we omit the extension subscripts and simply write Si and Sf^. Note that since a is a root of the polynomial Dt — Da^ t — a \ Dt — Da in k{a)[t], so Pa{o:) is always defined. In addition, we remark that k* C Si by definition, and that we could have replaced "/c(a;)-radical" by "/c-radical" in the above definition in view of Lemma 3.4.8. Theorem 3.4.1 and Corollary 3.4.1 are easily generalized to special polynomials of the first kind, showing that *Si is a multiplicative semigroup generated by k* and Sf^.
3.5 The Canonical Representation
99
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^ Proof Let k be the algebraic closure of k. (i) Let pi^... ,pn G Si. Then, q = Pi- • -Pn ^ S hj Theorem 3.4.L Let a e k be a root of q. Then, a is a root of pi for some i and pi G Si, so Pa{(^) is not a logarithmic derivative of a Ä:(a)-radical, which implies that q E Si. (ii) Let p e Si and q € k[t] be any factor of p. Then, q E S hy Theorem 3.4.L If g G /c, then g ^ 0 (since p ^ 0), so q E Si. Otherwise, q ^ k, solet a E k be a root of q. Then, a is a root of p, so Pa(a) is not a logarithmic derivative of a A:(a)-radical, which implies that q E Si. (iii) Let p E Si and E be an algebraic extension of k. Then, p is special in E[t] by Corollary 3.4.1. Let a E k he a. root of p. Then, Pa(«) is not a logarithmic derivative of a A:(a)-radical, so it is not a logarithmic derivative of an E{a)radical by Lemma 3.4.8. Hence, p is special of the first kind when viewed as an element of E[t]. D
3.5 T h e Canonical Representation Given p E k[t], we want to separate the special and normal components of p. The following definition formalizes that separation. Definition 3.5.1. Let p E k[t]. We say that p — PsPn ^-^ CL splitting factorization 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. T h e o r e m 3.5.1. Let p E k[t]. Then,
ß) 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 factors, 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 i ^ [ t i , . . . , t^] given by
'«D f E Mr • • • ^:" j = E(^««)*l' • • • *n" is a derivation on i^[ti,..., t^]. b) Show that if K{ti,... ,tn) is closed under Zi, then n
4=1
on jFf(ti,...,tn).
7
3.5 The Canonical Representation
105
c) Suppose that K C Const^(£^), that k = i ^ ( t i , . . . ,tn-i) is closed under Ä and that tn is a monomial over k. (i) Show that I (A) = {h e K[ti,...
,tn-i] s.t. hA is a derivation on K[ti,...
,tn]}
is an ideal of K[ti,... ,t^_i] and that I (A) / {0}. (ii) Let h G I{A)^ p G k[tn] and g € i^[ti,... ,tn_i] be such that P = qp is in K[ti^ • • • ,^n] (for example g can be the common denominator of the coefficients of p). Show that if p is special with respect to A, then P divides hAP in K[ti,... ,t„] (Hint: use Exercise 1.15). Such a P is called a Darhoux polynomial for hA^ and the existence of sufficiently many two-by-two coprime Darboux polynomials is equivalent to the existence of new constants in k{t)\k (see [27, 85, 93]). Although we have defined normal and special polynomials in monomial extensions only, Rao [71] has defined them in any simple transcendental differential extension as follows: let (A:,D) be a differential field of characteristic 0 and {k{t),A) be a differential extension of {k,D) where t is transcendental over k. Then, At G fc(t), so let a^b £ k[t] be such that 6 7^ 0, gcd(a, 6) = 1 and At = a/b. Define then p G k[t] to be normal with respect to A if gcd{p^bAp) = 1, and special with respect to A if p \ bAp. The following exercices all relate to this definition. 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, p normal 0. Let n > e and suppose that
108
4 The Order Function
p^ I X. T h e n x = p^y for some y E D. Let y = uf^iLiPl' be the irreducible factorization of y, where the p^'s are coprime and li is a unit. We have t h e n a factorization x = up^ YYiLiVT ^^ ^ where p appears with exponent at least n > e, in contradiction with D being a unique factorization domain. Thus any q in Sa{x) satisfies g < e, so Sa{x) is finite. In addition 0 G Sa{x), so Ua is well-defined on D. L e m m a 4 . 1 . 1 . Let x^y E D. (i) (ii) (Hi) (iv)
Then,
Ua{xy) > z^a(^) + ^a{y) OL'^d equaUty holds if a is irreducible. Ua{x-^y) > mm{iya{x),iya{y)) and equality holds if Ua{x) ^ i^a{y)Ifx\y, then Va{x) < Pa{y)Ua{gcd{x,y)) = min(z/a(a:), z^a(y))-
Proof. All the statements are trivial if either x or y is 0, so suppose t h a t X 7^ ^ ¥" y- Let n = Uaix) and m — i^aiv)- Then x = coP' and y — daT" for some c^d G D , and a divides neither c nor d. (i) we have xy — cddP'^^ so Vaixy) > n -{- m. Suppose t h a t a is irreducible. Then a j/cd since it does not divide c or «i, so a ^ + ^ + i j(xy^ which implies t h a t Va{xy) = n + m. (ii) we can assume without loss of generality t h a t n < m. We have t h e n X -j- y = 0^(0-^- dd^~^) so Va{x + y) > n = min(n, m ) . Suppose t h a t n j^ m^ then 771 — n > 0, so a I dd^"^^ which implies t h a t a)({c-\- da^~^) since a )(c. Hence, //^(x ^ y) = n. (iii) Suppose t h a t x \y. Then y = xz for some z £ D. Hence i^aiv) — ^a(^^) ^ //^(a:) + Ua{z) by part (i), so //«(?/) > ^aG^). ( i v ) L e t ö ' = gcd(x,y).Thenöf | x and g \ y, so Ua{g) < i^aix) a,nd i^aig) < ^a{y) by part (iii). Hence Va{g) < min(zy^(a:), !/«(?/))• Let z = a"^i^(^-(^)'^"(?^)) e D. Then, z | x and z \y, so z \ g. Hence, z/a(ö') > ^a{z) = mm{ua{x),Ua{y)) by part (iii), so Va{g) = min(z/a(:z^), i^a(l/)). • Example 4.1.1. In Z we have z/6(12) = ^IS) = 1 and i/6(12 x 18) = UQ{216) = 3, which shows t h a t the equality in (i) above does not always hold if a is not irreducible. On the other hand, z/3(12) = 1,1^3(18) = 2 and 1/3(216) = 3 == 1 + 2 , as well as z/2(12) = 2,1/3(18) = 1 and z/2(216) = 3 = 1 + 2. The following lemma shows t h a t multiplying a or the argument of Ua by a unit does not change the order function. This property is necessary in order to extend the definition of z/^ to F. L e m m a 4 . 1 . 2 . Let u e D"" and x e D. (i)
Va{ux)
= Z/a(x) =
Then:
Vua{x).
(ii) Va{u) = 0 . Proof, (i) If X = 0, then Uaiux) = i/a(x) = i^uai^) = +00, so suppose t h a t X j^ 0. T h e n a^"'^^^ | x, so a^"-^^^ | ux so Va{x) ^ i^ai^x). Since this inequality holds for any unit, and u'"^ is also a unit in D , we have z/a('w^) < Uaiw^ux) =
4.1 Basic Properties
109
z/a(x), SO Vaix) = Ua{ux). Similarly, a^''-^^^ \ x implies that (uaY"'^^^ | x since ^^aXx) Ig ^ unit, so Ua{x) < lyuai^)- As previously, this inequality applied to ua and u~^ implies that I'uai^) — ^u-'^ua{^) = ^a{x)j so Uai^) = ^ua{x)(ii) By (i), Vaiu) = Va{u^)- But Uai'u'^) > ^^^aiu) by Lemma 4.1.1, so Uaiu) G {0, +00}. Since ?i / 0, we must have i^a('^) = 0D In the following definition and the rest of this chapter, we say that any two elements y and z in D have no common factor when gcd(y, z) is a unit in D. Definition 4.1.2. Let x G F* and write x = y/z where y^z E D have no common factor and z ^ 0. We then define Va{x) = i^aiv) — i^a{z)Let X E F* and y^z^t^w G D be such that y and z have no common factor, t and w have no common factor, and x = y/z = t/w. Then yjt = z/w = u £ D*, so i^aiy) = i^a{ut) = Uait) ^.ud z^a(^) = ^ai^w) = Vai"^) by Lemma 4.1.2, so ^a{y) — ^a{z) — ^^a(0 — ^a('^)? which shows that Va Is wcll-defined on F . In addition, VaiX) — 0 by Lemma 4.1.2, so choosing y = x and z = 1 when X G D, we see that the above definition is compatible with the definition of i/a on D. We note that parts (i) and (ii) of Lemma 4.1.1 do not remain valid over F: ^5/3) = lyßilß) = 0, but i/6(5/3 x 1/2) = z/6(5/3 + 1/2) = - 1 < 0. Those statements remain however true when a is irreducible. T h e o r e m 4.1.1. Let x^y G F and suppose that a is irreducible in D. Then^ (i)
Ua (xy)
= Va {x) + l^a (v) •
(ii) if X ^ 0 then I'aix'^) = mUa{x) for any m GZ. (Hi) Ua{x -i-y) > min(z/a(x), J^a{y)) and equality holds if Va{x) /
faiv)-
Proof. Let x^y E F and write x = b/c^y = d/e where b^c^d^e G D, b and c have no common factor, d and e have no common factor and c 7^ 0 ^ e. Since a is irreducible, we have I'aifg) = ^a{f) + ^a{g) for any / , ^ G D by Lemma 4.1.1. (i) Let h — gcd(6(i, ce), / = bd/h and g = ce/h. We have f^g^heD^ f and g have no common factors, and xy = bd/ce = f/g^ so ^a(a:t/) = Va{f)
~ J^a{g) = ^a{f)
= l^aifh)
- Va{gh)
+ ^a{h)
= Va{bd) -
- {Va{g) +
^aih))
Va{ce)
= {^a{b) - I/a(c)) + {Va{d) - Va[^)) = Z^a(^) + ^a{v) •
(ii) a:^ = 1 is a unit in D, so z^a(l) = 0 by Lemma 4.1.2. Suppose that the statement holds for ?7i > 0. Then, Uaix"^^^)
= Uaix'^x)
= Vai^"^)
+ ^a{x)
= mUa{x)
+ M^)
= (m +
l)Ua{x)
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"^)
holds for all m G Z.
- mUa{x),
SO Z/a(x^) = miya{x).
T h u S (ii)
110
4 The Order Function
(iii) X -^ y = {be -\- cd){ce)'~^. Although be + cd and ce may have common factors, we have Ua{x + y) = i^aibe + cd) + Ua ((ce)~^) = Uaibe + cd) - Ua{ce) by parts (i) and (ii). We can suppose without loss of generality that Ua{x) < ^a{y)i which implies that z^a(^) — ^a(c) < ya{d) — ^^a(e), hence that Vaib) + z^a(e) < ^a(d) + z^a(c). Thus, z/a(&e) < i/«( Va(be) by Lemma 4.1.1, so z/a(^ + y) ^ ^a(^e) — z/a(ce) = z^a(&) — i^a(c) = ^aip^)- Suppose that Vaip^) < ^a{y)j then iJa{be) < Va{dc) as above, so Va{be + cd) = i^a{be) by Lemma 4.1.1, so Ua{x + y) — i^aibe) — z/a(ce) = Uai^). • Parts (i) and (ii) of the above theorem show that the restriction that y and z have no common factor in Definition 4.1.2 can be removed if a is irreducible: for any y^z G F such that x = y/z, we have h'a{x) = h'a{yz~^) = ^a(y) — ^a(^)In the case of polynomial rings, we need to study the effect of enlarging the constant field on the order function. It turns out that when an irreducible polynomial splits in an algebraic extension, then the order at the new irreducible factors remains the same as before for arguments that are defined over the ground field. T h e o r e m 4.1.2. Let F be a field, E be a separable algebraic extension of F and X be an indeterminate over E. If p G F[x\ is irreducible over F, then ^p{f) = ^qif) /^^ ^'^y irreducible factor q G E[x] of p in E[x], and any
fGFix). Proof Let q G E[x] be any irreducible factor ofp in E[x] and write p = qr with r G E[x]. Let h G F[x] and n = Up{h) > 0. Then p"" \ h, so h = p'^s = q^'r^'s with s G F[x]^ which implies that q^ \ h. In addition, p^~^^ / / i , so p does not divide 5, which implies that gcd(p, s) = 1 since p is irreducible in F[x]. Thus, I = ap -]- bs = arq + bs for some a^b e F[x], so gcd(g, s) = 1. Suppose now that q^ I h for some m > n. Then, h = p^s = q^r'^s = q^t for some t G E[x]^ so r^s = q^~~^t^ which implies that q \ r^s in E[x]. Since q is irreducible in E[x] and gcd(g, s) = 1, g | r"', which implies that n > 0 (otherwise q would be a unit) and that q \ r, hence that q^ | p, in contradiction with p squarefree in E[x] (since E separable over F). Hence g"^ / / i for m > n, so i'q{h) — n. Let now / G F{x) and write / = a/b for a^b £ F[x] and 6 7^ 0. By Theorem 4.1.1 and the above proof, ^p(/) = ^'p(a) — iyp{b) = z/g(a) — z^g(6) =
^.(/).
•
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
where the intersection is taken over all the irreducible factors of a in D.
4.2 Localizations
111
Intuitively, the localization at a is the set of all the fractions in F t h a t can be written with a denominator having no common factor with a. If a is irreducible, the localization, which is then a local ring, can also be seen as the set of all t h e fractions in F with nonnegative order at a. L e m m a 4.2.1. (i) (ii) (Hi) (iv) (v) (vi)
Oa is a subring of F containing D. xeOa=^ iya{x) > 0. X € aOa 0}.
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) (n)
Ooo ^5 a subring of
D{x).
fex-^Ooo ^=^ z^oo(/)>l where X~^OOQ is the ideal generated (iii) fx""^^^^ e Ooo for any f G D{xy.
by x~^ in Ooo-
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
TTooif)
by:
ric(6)/lc(c),
i/z/oo(/)-0,
1
i/z/oo(/)>0.
0,
where b^c E D[x] and f == b/c. Suppose t h a t / = b/c = d/e where b^c^d^e G D[x] and t h a t z^oo(/) — 0Then, be = cd^ so lc(5)lc(e) = lc{c)lc{d)^ so lc(6)/lc(c) = lc((i)/lc(e), which implies t h a t TTOO is well-defined on Ooo-
4.3 The Order at Infinity
117
T h e o r e m 4.3.2. (i) ker(7roo) = x'^ö^o(ii) TToo is a surjective ring-homomorphism from Ooo onto the quotient F of D, hence a field-isomorphism between OOO/X~^OQO and F.
field
Proof (i) Let / G Ooo- If / € x"^(9oo, then Uooif) > 1 by L e m m a 4.3.1, so ^oo{f) = 0 from the definition of TTOO- Conversely, suppose t h a t / ^ x'^Ooo, which impHes t h a t i^oo(/) = 0, and write / = b/c where b,c ^ D[x]. T h e leading coefficients of b and c are never 0 by definition, so iToo{f) 7^ 0. Hence ker(7roo) = x~^Ooo(ii) Let F be the quotient field of D and a; G F . If cj = 0, then tu = 7roo(0). Otherwise, write a; = b/c with b^c E D and 6 7^ 0 7^ c. Then, deg(5) = deg(c) = 0, so z^oo(^/c) = 0, so TToo{b/c) = b/c = UJ. Hence, TTOO is surjective. Taking LÜ = 1 yields 7roo(l) = 1- Let f^g G Ooo. Then, I'ooif) ^ 0 and i^ooig) > 0. Suppose t h a t Uooif) > 0. Then, i>oo{fg) = ^ooU) + ^00(p) > 0, so TTooifg) = 0 = 7Too{f)7Too{g) sluce TTooU) = 0. Similarly, iToo{fg) = 0 = 7Too{f)7^oo{g) if J^oo{g) > 0 so suppose t h a t i^ooif) = '^oo{g) = 0. Write / = b/c and g = d/e where 6, c, d, e G D[x]. Then, I'ooifg) = 0 by Theorem 4.3.1, so
,. ,
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 Theorem 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)
since TTooig) = 0- Suppose finally t h a t i^ooig) = 0- Then, deg{d) = deg(e), so deg(cd) = deg(6e), so deg(5e + cd) < deg{be) — deg(ce). If deg(öe + cd) = deg(6e), then i^cx)(/ -\- g) = 0 and lc(6e + cd) = lc(6)lc(e) + lc(c)lc(d), so lc(6e + cd)
''-^f-^'^ =
lc{b)
lc{d)
-H^er^^
If deg(6e + cd) < deg(6e), then z/oo(/ + ^f) > 0 and lc(6)lc(e) = lc(c)lc((i), so ^oo(/) = ^oo{g)^ so TTooif) -^ TTooig) = 0 = ^ o o ( / + g)• Hence, TToo is a ringhomomorphism. Since ker(7roo) = x~^^Ooo by part (i), this implies t h a t TTOO is a field-isomorphism between OQO/X'^^OOO and the quotient field of D . D
118
4 The Order Function
ValoeAtInfinity(/)
(* Value at infinity *)
(* Given a Euclidean domain D, and / G Ooo, return 7roo(a:). *) if / = 0 then return 0 a ^— nunierator(/), b ^— denoniinator(/) if deg(6) > deg(a) then return 0 return(lc(a)/lc(6))
4.4 Residues and the Rothstein—Trager Resultant We present in this section the properties of the order function that are used for integration, namely the relation between the orders of a function and its derivative at a point, and the basic theory of residues in monomial extensions, up to the fundamental property of the Rothstein-Trager resultant. This relation and the various residue formulas let us connect the poles of a function to the poles of the functions that appear in its integral. Throughout this section, let Ü^ be a differential field of characteristic 0 with derivation D, and t be a monomial over K. We first define the notion of a residue at a normal polynomial. Definition 4.4.1. Let p G K[t] \K
be normal, and 7Zp be the set
np = {f e K{t) such that pf e Op} . We define the residue at p to be the map residue^ : IZp —> K[t]/{p) given by p residuep(/) =^'Kp{f — ) . Let q £ K[t] be any irreducible factor of p. Then q jf Dp since p is normal, so I/Dp e Oq. Since this holds for any irreducible factor of p, we have 1/Dp £ Op. For / E T^p, pf £ Op^ so fp/Dp G Op, which means that residucp is welldefined. Since 7rp(a) = a for any a G if, we identify K and 7rp{K) C K[t]/{p) when dealing with residues. Thus, when we say in the rest of this section that / has a residue a G ÜT, we mean the residue of / is the image of an element of K by TTp. T h e o r e m 4.4.1. Let p G K[t] \K be normal Then, IZp is a vector space over K, ker(residuep) = Op, and residucp is a K-vector space isomorphism between IZp/Op and K\t]/{p). Proof. We have 0,1 G T^p since 0,p G Op. Let f.gG^lp and c G K C Op. Then, pf^pg G Op, so cpf -\-pg £ Op since Op is a ring. Hence, cf + g E IZp, so Tip is a vector space over K. Let f e Op. We have 1/Dp G Op as earlier, so f/Dp G Op, so pf/Dp G pOp, which implies that residuep(/) = 7Tp{pf/Dp) = 0 by Theorem 4.2.L Hence, Op C ker(residuep). Conversely, let / G ker(residuep).
4.4 Residues and the Rothstein-Trager Resultant
119
Then, 7rp{fp/Dp) = 0, so pf/Dp G pOp by Theorem 4.2.1, which impUes t h a t f/Dp G O^. But Dp e Op, so / = Dp{f/Dp) e Op. Hence ker(residuep) = Op. Let f^g E Tip and c G K. Since iTp is a ring-homomorphism by Theorem 4.2.1 we have iesidnep{cf
p ^ g) = 7Tp{{cf + 9)-^)
p = 'rCp{c)7Tp{f — ) +
p 7Tp{g—)
= TTp{c)iesidvLep{f) + residuep(^) . But c £ K, so 7rp{c) = c, hence residuep(c/ + ^) = c residuep(/) +residuep(5f) in K[t]/(p), so residucp is a K-vector space homomorphism. Let cu E K[t]/{p). Since iip is surjective by Theorem 4.2.1, there exists g E Op such t h a t TTp{g) = (jj7Tp{Dp). Let / = g/p. Then pf e Op so f e 1Zp, and residuep(/)=7r,(/-^) =
^ ^ = c .
hence residue^ is surjective. Since ker(residuep) = Op, this impUes t h a t D residucp is a K-vector space isomorphism between IZp/Op and K\t\/{p). Example 4-4-^- Let ii" = Q, t be a monomial over K with Dt = 1 {i.e. D = d/dt), and p = t £ K[t] is normal and irreducible. We have / = 1/t G Tip b u t P = 1/t^ ^ Tip, so Tip is not a ring, even when p is normal and irreducible. The following formula gives a useful relation between the residue at a normal polynomial and at any of its nontrivial factors. L e m m a 4 . 4 . 1 . Let p G K[t] \K be normal, and q G K[t] \ K be a factor p. Then, Tip C Tlq and residueg(/) = 7rg(residuep(/)) for any f GTlp.
of
Proof Since q \ p, we have Op C Oq and TTq{7rp{g)) = T^q{g) for any g £ Op. Write p = qr with r G K[t]. Since p is normal, p is squarefree, so gcd(g, r) = 1, which means t h a t 1/r G Oq. Let / G Tip. Then, pf G Oq, so g / — pf /r G Og, which implies t h a t / G T^g. Since p is normal, gcd(p. Dp) = 1, so let a, 6 G iir[t] be such t h a t aDp -^bp = 1. We have arDq + {aDr + 6r)g = a{rDq + g D r ) + 6rg = aDp + 6p = 1, so gcd{rDq,q)
= 1 and 7rq(a) = TTq{l/{rDq)).
7rg(residuep(/)) = 7Tq (iVp f/—
Then,
j j = 7Tq{7rp{fap)) = Tiq{faqr)
120
4 The Order Function
Example 4-4-^- Let K = Q, t be a monomial over K with Dt = 1 {i.e. D = d/dt), and / = (t - 2)/(t2 - 1) € Ä"[t]. Then, residuet2_i(/) = 7rt2__i
2t
/
l-2t 2
while residue,_i(/) = 7r,_i ( ^
j = - 1 = 7r,_, ( 1 ^
and residuet+i(/) = TTt+i f ^ — j ] = 2 "" ^*+i T h e o r e m 4.4.2. Let f G K{t) \ {0} anc^ p e K[t] be irreducible. (i) If p is normal^ then Vp{Df) = i^p(/) — I if ^p{f) 7^ 0^ Up{Df) > 0 if ^pif) = 0- Furthermore, n,{p'-^^^f^Df) (ii) (Hi) p£Si
=
Mf)n,{p-^'^^f^f)ix,{Dp).
peS^iyp{Df)>iyp{f). 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, D / = ngp^'-^Dp ^p^'Dg.
(4.4)
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 Dg =
cDb - bDc 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 ringhomomorphism, we have
4.4 Residues and the Rothstein-Trager Resultant TTpip^-'^Df)
= n7Tp{g)7rp{Dp) + TTp{p)TTp{Dg) =
121
n7Tp{p~''f)iTp{Dp)
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 0. We have Vt{f) = 0, but Df = mV^'~^, Vt{Df) = m — 1. This shows t h a t one cannot give a general upper bound iyp{Df) when i/p(/) = 0.
= (t) so on
Theorem 4.4.2 has several useful consequences: K{t) must be a differential subring of i f (t), and we get formulas for the orders and residues of logarithmic derivatives, and for the residue at a given p. 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) -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)Proof. Letp G K\t] be irreducible, / G iC(t)\{0}, n = Pp{f) and m = Pp{Df). (i) By Theorem 4.4.2, either m > n or m = n — 1, so Up{Df/f) = m — n> —1 in any case. (ii) Suppose that n y^ 0 and p is normal. Then, by Theorem 4.4.2, m = n — 1, so Up{Df/f) = —1. Conversely, suppose that Vp[Df/f) = —1, then m = n — 1 < n. By Theorem 4.4.2, m > n if either p G 5 or n = 0, so p must be normal and n ^ 0. (iii) Suppose that p is normal. If n > 0, then m > 0 by Theorem 4.4.2. If n < 0, then m = n — 1 < —1 by Theorem 4.4.2, so m ^ —1. If n = 0, then Pp{Df/f) > —1 by parts (i) and (ii), so Df/f G Op, which impUes that residuep(jD///) = 0 by Theorem 4.4.1. Suppose now that n / 0. By (ii) we have Vp{Df/f) = - 1 , hence Vp{pDf/f) = 0 so pDf/f G Op. By Theorem 4.4.2, we have yp[Df) = n-l and 7rp{p^~'^Df) = niXp{p~'^ f)7ip{Dp). Since p, Dp.,p^'~^Df and p~'^f are all in Op and TTp is a field-homomorphism by Theorem 4.2.1 (p is irreducible), we have 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
L e m m a 4.4.2. Let p G K[t] be normal irreducible, g E Op and d G K[t] be such that iyp{d) = 1. Then, iesiduep{g/d) = Tip{g/Dd). Proof. Since i'p{d) = 1, Vp{Dd) = 0 by Theorem 4.4.2, so i/p{g/Dd) = i'p{g) > 0, which imphes that g/Dd G Op by Lemma 4.2.L In addition, iyp{pg/d) = 1 + i^p{g) — 1 = J^pig) > 0, so g/d € 7^p, so both iesid\iep{g/d) and 7Tp{g/Dd) are defined. Write d = pq for some q G K[t]^ and let h = gpDq/qDpDd. Then, i^p{q) = i^p{d) — Up{p) = 0 , Vp{Dp) = 0 since p is normal, i/p{Dd) = i/p{d) — 1 = 0 by Theorem 4.4.2, so Up{h) = Vp{g) + 1 + Pp{Dq) > 1. This implies that h e pOp by Lemma 4.2.1, hence that 7Tp{h) = 0 by Theorem 4.2.1. In addition, we have _p_ Dd
1 ^^Dd
pDq ^ qDp_+_pDq_ ^ 1 ^g p qDpDd' ^ qDpDd ^qDp dDp
residue,(|)=7r,^|^j=.r,(/.+
^ )
D
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, q I gcd(a — aDd^d) 4=> residueg(/) = a. Proof. Since Vq{f) = —1, we have z/g(a) = 0 and h'q{d) = 1, so Uq{Dd) = 0 by Theorem 4.4.2. This implies that Dd G Oq and that Uq{l/Dd) = 0, hence that 1/Dd G Oq. Furthermore, a^p G Oq and / = {a+pd)/d^ so residueg(/) = TTq{{a +pd)/Dd) = 7Tq{a/Dd) by Lemma 4.4.2. Suppose that q \ gcd(a — aDd, d). Then, 0 = TTq{a — aDd) = T^q{a) — a7Tq{Dd) so
Conversely, suppose that a = residueg(/) = 7Tq{a/Dd). Then, 7rq{a ~ aDd)
= 7rq{a)
- a7Tq{Dd)
= 7rq{a)
so g I a — aDd, hence q \ gcd(a — aDd^ d).
- TTq{ —
)'Kq{Dd)
= 0
D
124
4 The Order Function
We can now state the fundamental property of the Rothstein-Trager result a n t , namely t h a t from any simple function, one can construct a polynomial over K whose nonzero roots in K are exactly the residues of / t h a t are in K. Note t h a t in general, not all the residues of / are in K, expect when K is algebraically closed. T h e o r e m 4 . 4 . 3 . Let f G K{t) be simple w.r.t D, and write f = p -\- a/d where p^a^d £ K[t], d j^O, deg(a) < deg{d), and gcd(a,(i) = 1. Let r = resultantt(a - zDd, d) e K[z] where z is an indeterminate
over K.
(4.5)
Then, for any a € K"",
r{a) = 0 residueg(/) = a for some normal irreducible q G K[t]. We call the polynomial
r given by (4-5) the Rothstein-Trager resultant of f.
Proof For any ß G .K*, let rß = resultantt(a — ßDd^d) E if, and aß : K[z] —^ K be the ring homomorphism given by (Jß{z) = ß and (Jß{x) = x for any x E K. Define äß : -?f[^][t] —> K[t] by 'ö'ß{Y^ajP) = Yl^ßi^jWSince 'äß{d) = d, deg^{'äß{d)) = deg^((i), so r{ß) = '^ßij) = :tlc{d)'^^rß for some nonnegative integer mß by Theorem 1.4.3. Recall t h a t / simple means t h a t d is normal, hence squarefree, i.e. t h a t J^pif) ^ —1 for any normal irreducible p G K[t]. Let a G Ü^* be such t h a t r ( a ) = 0. Then, r^ = 0, so deg{g) > 0 by Corollary 1.4.2 where g = gcd(a — aDd^ d). Let then q G K\t] be an irreducible factor of g. Since q \ d and / is simple, q is normal. Also, Vq{d) = 1 since d is squarefree, so a = residueg(/) by L e m m a 4.4.3. Conversely suppose t h a t residueg(/) = a G K* for some normal irreducible q G K[t]. Then, residueg(/) ^ 0, so / ^ Og by Theorem 4.4.1, which imphes t h a t yq{f) = —1. Hence, Uq{d) = 1, so g | gcd(a — aDd.d) by Lemma 4.4.3. Therefore, TQ, = 0 by Corollary 1.4.2, so r{a) = 0. D Let F be a field of characteristic 0, x be an indeterminate over F , and D be t h e derivation d/dx on F{x). Since every irreducible q G F[x] is normal with respect to d/dx., applying t h e above result to ÜT = F , we see t h a t Theorem 4.4.3 and Lemma 4.4.3 respectively prove parts (i) and (ii) of T h e orem 2.4.1. There are similar results relating the order at infinity of an element of K{t) and its derivative. T h e o r e m 4 . 4 . 4 . Let f G K{t) \ {0}. Then, (i) Uoo{Df) > uooif) - max(0,(5(t) - 1). (ii) Ift is nonlinear and Uoo{f) ¥" 0; then equality holds in (i), and
4.4 Residues and the Rothstein-Trager Resultant (Hi) If t is nonlinear and Uooif) = 0; then the strict inequality i.e. VoQ^Df) > 1 — S{t), and
125
holds in (i),
Proof. Write / = a/d where a^d £ K[t], d ^ 0 and gcd(a, d) = 1. Then, Df = {dDa - aDd)/d^, so Voo{Df) = 2deg(d) - deg(6^Da - aDd). Let m = max(0,J(t)-1). (i) By Lemma 3.4.2, deg(D deg{d) — deg(a) — m = ^ooif) -m. (ii) Suppose t h a t t is nonlinear and z^oo(/) 7^ 0- Then m = 6{t) — 1 and Df / 0 by Lemma 3.4.5. Suppose t h a t deg(d) = 0, then deg(a) j^ 0 since Voo{f) ^ 0, so deg{dDa — aDd) = d e g ( D a ) = deg(a) + m by Lemma 3.4.2, which implies t h a t Uoo{Df) = — deg(a) — m = i^ooif) — ^ , hence t h a t Vooit^^Df/f) = 0. Furthermore, lc{dDa — aDd) = lc{dDa) = —m, so suppose t h a t D / ^ 0. If deg(a) 7^ 0, t h e n d e g ( d D a - aDd) < deg(a) + deg(ci) + m by (4.6), so Uoo{Df) = 2deg(d) - deg{dDa - aDd) > -m. If deg(a) = deg{d) = 0, then f e K, so Df G K, which implies t h a t i/ooiDf) = 0 > —m. Hence,
yoo{t-^Dflf)
> 0, so n^{t-^Df/f)
=0.
D
126
4 The Order Function
Exercises Exercise 4 . 1 . Let {k^ D) be a differential field of characteristic 0, t a monomial over k, and / G k{t) be simple. Show that if there are h G k{t) and g G k(t) such that Dg ^ f + h, then / G k[t]. Exercise 4.2. Let {k, D) be a differential field of characteristic 0, t a monomial over /c, and / G k{t), a) Show that if / is the logarithmic derivative of a nonzero element of fc(t), then / is simple and can be written as
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. Exercise 4.3 (Indicial equation of a linear differential o p e r a t o r ) . Let [k^D] be a differential field of characteristic 0, t a monomial over k^ p G k[t] be normal and irreducible, and / G k{t) be such that i^'pif) < 0. a) Show that Vp{D^f) = i^p{f) — n for any n GN. b) Show that 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 0 for any / 7^ 0, since in t h a t case there is always some polynomial p G k[t] for which h'p{f) = 0. Also, the minimum in the above definition can be taken over all the irreducible or squarefree factors of the denominator of / . It is easy to see t h a t for / / 0, / i ( / ) is exactly the highest power appearing in any squarefree factorization of t h e denominator of / (Exercise 5.1). algorithm T h e o r e m 5 . 3 . 1 . Let f G k{t). Using only the extended Euclidean in k[t], one can find g^h^r G k{t) such that h is simple, r is reduced, and f = Dg + /i + r . Furthermore, the denominators of g^h and r divide the denominator of f, and either g — 0 or ß{g) < fi{f). Proof. Let f = f^ -{- f^ ^ f^he the canonical representation of / , and write fn = a/d with a^d G k[t] and gcd(a,d) = 1. We proceed by induction on m = ji{fn)- Let d = did^' • • d^ be a squarefree factorization of d. If m < 1, then either / ^ = 0 or d is normal. In both cases, fn is simple, so g = 0^ h = fn and r = fp -\- fs E k{t) satisfy the theorem. Otherwise, ?7i > 1, so assume t h a t the theorem holds for any nonzero g ~ gp + gn -^ gs with ß{gn) < ^ , and let v = d^ and u = d/v^. Since every squarefree factor of d is normal by the definition of the canonical representation, V is normal, so gcd{Dv^v) = 1. In addition, gcd(ii,i;) = 1 by the definition of a squarefree factorization, so gcd{uDv^ v) = 1. Hence, we can use the extended Euchdean algorithm to find h^c£ k[t] such t h a t = buUv Multiplying both sides by (1 — m)/{uv^)
gives
a
(1 — m)bDv
(1 — m)c
y^yrn
ym
y^ym—1
SO, adding and subtracting Db/v^~^
/ Db
-f cf.
(m-l)bDv\
to the right hand side, we get
(l-m)c~uDb
^
5.3 The Hermite Reduction
139
where po = h/v^~^ and IL» = {{l—m)c—uDh)/{uv^~^). Since the denominator of w divides uv^~^^ w has no special part, so let w = Wp-\-Wn be the canonical representation of w. Since iJ.{w) < m — 1, we have ß{wn) < m — 1, so by induction we can find gi^hi and r i in k{t) such t h a t Wn = Dgi + /i + r i , h is simple, r i is reduced, the denominators of gi^h and r i divide nf"^~\ and /i(^i) < /i(i(;) if^i 7^ 0. Let then ^ = go-^gi and r = / p + ' w ; p + / s + r i , and write e for the denominator of / . Note t h a t d \ e hy the definition of the canonical representation. The denominator of gi divides uv'^~^ and go = b/v'^~^^ so the denominator of g divides d hence e. The denominator of h divides uv^~^ ^ so it divides d hence e. The denominator of w divides d and the denominator of r i divides uv'^~^, so the denominator of r divides e. In addition, / p , lüp, fs and r i are in k{t)^ which is a subring of k{t) by Corollary 4.4.1, so r G /c(t). Finally, we have f = fp + fs -^ fn = fp -i- fs + Dgo + w = fp + fs + Dgo + Wp + Dgi -^h^ri
= Dg +
h^r
which proves the theorem.
D
Although we have used the quadratic version of the Hermite reduction in the above proof, the other versions are also valid in monomial extensions (Exercise 5.2). Instead of splitting a rational function into a derivative and a simple rational function, the Hermite reduction splits any element of k{t) into a derivative, a simple and a reduced element. Thus, it reduces any integration problem to integrands t h a t are the sum of a simple and a reduced element.
H e r m i t e R e d u c e ( / , D)
(* Hermite Reduction - quadratic version *)
(* Given a derivation D on k{t) and / G fc(t), return g^h^r G k{t) such that / = Dg + /i + r, h is simple and r is reduced. *) (/p5 fs, fn) ^— C a n o n i c a i R e p r e s e i i t a t i o n ( / , D) (a,d) 0 and that the theorem holds for any elementary extension generated by ?7i — 1 elements. Let t = ti and F = K{t). Since K C F C E^ then C C Const(F) C Const(E) = C, so Const(F) = C. In addition, / G F , and E = F ( t 2 , . . . , t ^ ) is an elementary extension of F generated by m — 1 elements, so by induction there are v £ F^ ui^... ^Un E F* and c i , . . . , c ^ € C such that
f = Dv + J2c,:^.
(5.4)
Case 1: t transcendental over K. Then, since Const(F) = C, t is Liouvillian monomial over K by Theorems 5.1.1 and 5.1.2. Let p G K[t] be normal and irreducible. We have i/p{Dui/ui) > —1 by Corollary 4.4.2, hence h'p{Y^^=iCiDui/ui) > —1 by Theorem 4.1.1. Suppose that iyp{v) < 0. Then, Up{Dv) = Up{v)-1 < -1 by Theorem 4.4.2, so i^pif) = mm{i'p{Dv), ~1) < - 1 by Theorem 4.1.1, in contradiction with f E K. Hence I'piv) > 0, so, since this holds for any normal irreducible p, v e K{t). Hence, Dv G K{t) by Corollary 4.4.1. Write now Ui = Wi Yü^iPT/ where Wi G K* ^ each pij G K[t] is monic irreducible, and the e^j's are integers. Then, using the logarithmic derivative identity and grouping together all the terms involving the same pij, we get
1=1
^-^
j=l
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 a
v^ ^-^
Dwi 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
^-^
which is of the form (5.3). Case 2: t algebraic over K. Let Tr : F —^ K and N : F —^ K he the trace and norm maps from F to K and d = [F : K]. Applying Tr to both sides of equation (5.4) we get:
Trif)=Tr{Dv
+ yci^)=Tr{Dv)+yciTr{
— )
since Tr is if-linear and the Q'S are in K. We have Tr{f) = df since f E K, and Tr{Dv) = DiTriv)) and Tr ' ^""'^ DN{ui)
Niu,)
by Theorem 3.2.4, so Ci Dwi
f = Dw + J2
d
which is of the form (5.3) with w = Tr{v)/d
e K and Wi = N{ui) G /f *.
D
Of course, in practice we may have to adjoin new constants in order to compute integrals, as we have seen in Chap. 2. We first show that new transcendental constants are not necessary in order to express an elementary integral T h e o r e m 5.5.2. Let K he a differential field with algebraically closed constant field and f £ K. If there exist an elementary extension E of K and g £ E such that Dg = f, then there are v £ K, i/i,...,ii„ £ K* and c i , . . . , c^ £ Const(ÜT) such that
=1
Uj
5.5 Liouville's Theorem
145
Proof. Suppose that there exist an elementary extension E of K and g £ E such that Dg = f. Write Const (if) = C, Const (£) = C ( a i , . . . , am) for some constants a i , . . . , a ^ in E, and let F = i f ( a i , . . . , a ^ ) . Since C ( a i , . . . ,ay^) C F C E^ C ( a i , . . . , a ^ ) C Const(F) C Const(^), so F and E have the same constant subfield. In addition, f E F and E is elementary over F , so by Theorem 5.5.1, there are v e F, ui,... ,Um £ F* and c i , . . . , c„ G Const(F) such that
f^Dv + Tc,^.
(5.6)
Let X i , . . . , X ^ be independent indeterminates over K. Since the elements of F are rational functions in a i , . . . , a ^ , we can write _ p(ai,...,a^) __ r i ( a i , . . . , a ^ ) _ pi(ai,... ,a^) -y _ __ -^ Q — —;; ^—- ana Ui — — —- [o.i) g(ai,. . . , a ^ ) Si(ai,...,a^J g u a i , . . -,0^771) where p^q^Pi^Qi are in i i r [ X i , . . . , X ^ ] , and Vi^si are in C [ X i , . . . , X ^ ] . In addition, g{ai^..., a ^ ) j^ 0, where
5 = 9 ( n ^ J lf[pA lf[qA
€K[Xi,...,X^].
Replacing v, c i , . . . , c ^ and w i , . . . , ? i ^ by the fractions (5.7) in (5.6), and clearing denominators, we obtain a polynomial h G K[Xi^..., Xm] such that /i(ai,... , a ^ ) = 0. By Lemma 3.3.6 applied to g and 5 = {/i}, there are 6 1 , . . . , 6^ G C such that ^'(^i^ • • • ^ ^m) 7^ 0 a^nd /i(6i,..., bm) = 0. But this implies that
1=1
where p(6i,...,6^) g(6i,..., 6^)
ri(öi,...,ö^) 5^(61, ...,bm)
pi(6i,...,5^) 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
Proof. Suppose that there exist an elementary extension E of K and g G E such that Dg = / . Since CK is algebraic over K, Const(Cür) = C Pi CK = C by Corollary 3.3.1. Hence, CK has an algebraically closed constant subfield, / € CK^ g E CE", which is an elementary extension of CK^ so by Theorem 5.5.2, there are v £ CK., n i , . . . , i ^ ^ G {CKY and ci,...,Cn G C such that f = Dv+ }
Ci
.
i=l
*
F = K{v^ 1^1,..., tin, c i , . . . , Cn) is finite algebraic over K^ so let Tr;^ : F -^ K be the trace from F to K^ K be the algebraic closure of K and a i , . . . , cr^ be the distinct embeddings of F in if over K. Each aj can be extended to a field automorphism of K over K, and since Trf^ and each cr^ commute with D by Theorem 3.2.4, we have
j=l
j = l i=l
^
so j = l 1=1
with
-*
tu = — Trr^(v) E Ä', rfö^- = — cj^ G K
and
lü^.- = u^^ G K .
In addition, Const(E') = Ü n F = Ü by Corollary 3.3.1, and Ddij = D(c^^/m) = [DciY^/m = 0, so dij G C for each i and j . Let now L = K{dii^... ,djnn) and M = L(t(;ii,... ,tt;^n)- Since L is algebraic over K^ K is the algebraic closure of L. Since M is finite algebraic over L, let Tr^ : M -^ L and N : M —> L he the trace and norm maps from M to L. Since (i^j G L and T r ^ is L-linear, we have 'L l"*^ „.,
i-"ii-L
I ^.^. y - " i i
^(^^^.
by Theorem 3.2.4, so
•
1
•
1
^ Ü
^ ^ - ATK hence
m
n
3 = li=l
T
^
j-^
^'^
which is of the form (5.3) with w G K^ dij G C and Zij = N{wij) in K{dn,...,dmny•
5.6 The Residue Criterion
147
5.6 The Residue Criterion Now that Liouville's Theorem gives us a way of proving that a function has no elementary integral over a given field, we can complete the integration algorithm. For the rest of this chapter, let (/c, D) be a differential field and t a monomial over k. From the Hermite reduction, we can assume without loss of generality that the integrand is given as the sum of a simple and a reduced element of k(t). We have seen in Sect. 2.4 that the Rothstein-Trager algorithm expresses the integral of a simple rational function with no polynomial part as a sum of logarithms. In this section, we show that this algorithm can be generalized to any monomial extension, where it will either prove that a function has no elementary integral, or reduce the problem to integrating elements of k{t). Rothstein had already generalized this algorithm to elementary transcendental extensions in his dissertation [83]. L e m m a 5.6.1. Let f G k{t) be simple. If there are h £ k{t), an algebraic extension E of Coiist(k), v G k{t), c i , . . . , c^ G E^ and i^i,..., n^ G Ek{t) such that
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 algebraic extension E of Const(/c), v G k{t)^ c i , . . . , c„ G £ , and ui^.,. ,Un G Ek{t) such that ^-^ i=\
Ui *
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 residuep(/) = residuep(/) + residuep(/i) = residuep(/ + h) = residuep(D^') + y . Q residuCp ( i=l
\
j = 2 , ^i ^pi'^i) • ^i
J
i=.i
D
148
5 Integration of Transcendental Functions
L e m m a 5.6.2. Suppose that Const(Ä:) is algebraically closed and let f E k{t) be simple. If there exists h G k{t) such that f + h has an elementary integral over k{t), then residuep(/) G Const(A:) for any normal irreducible p G k[t]. 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
Let j> G k[t] be normal and irreducible. By Lemma 5.6.1 we have n
residuep(/) = ^ c ^ iyp{ui) G C. i=l
D
Example 5.6.1. Let Ä: = Q, t be a monomial over k with Dt ^ 1 {i.e. D = d/dt)^ and
Then, / has an elementary integral over k{t): Of — 0
I.
,
^
jdt = {l + x/=l) log(l + i^/=l) + (1 - v ^ ) log(l -
t./^).
On the other hand, t^ + 1 is irreducible over Q, but /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 + \ / ^ ) , residue^
r^(f)
= TT^ r—r i
7=
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
T h e o r e m 5.6.1. Let f G k{t) be simple, and write f = p-\-a/d where p^a^d E k[t], d j^ 0, deg(a) < deg{d), and gcd{a^d) = 1. Let z be an indeterminate over k, r = resultantt(a — zDd^ d) £k[z\^ ^ = '^s^n be a splitting factorization of r w.r.t. the coefficient lifiing njj of D to k[z], and Dga
-£ a^^
(5i
rsia)=0
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^
then rg factors linearly over E. Proof (i) Let r^ = cr^^ • • -r^" be the irreducible factorization of r^ in k[z]. Then, g can be rewritten as
E
\-^
Dga
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
j:Tr.
Dga, 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
root of r. If a = 0, then Da = 0. Otherwise a ^ 0 and a = residueg(/) for some normal irreducible q G k[x] by Theorem 4.4.3, hence Da = 0 by Lemma 5.6.2. Thus rs{a) = 0 in both cases by Theorem 3.5.2, so rn{(^) 7^ 0 since gcd(rn,r5) = 1. Since this holds for all the roots of r, we have r^ G k. For any a G k^ write g^ = gcd{d^a — aDd). Note that all the irreducible factors of QQ, must be normal, since g^ | d^ which is normal. Let a^ß G A:, and q G k\t\ be a normal irreducible common factor of go^ and gß. Then a = residueg(a/(i) = /3 by Lemma 4.4.3, so gcdi{go,^gß) = 1 when a^ ß. Let now q E.k\t\ be irreducible and normal, and ß = residueg(/). If /3 = 0, then q does not divide d, so q does not divide any g^^ which implies that i'q{g) > 0, hence that residueg(^) = 0 = residueg(/ -- g). If ß ^ 0, then r{ß) = 0 by Theorem 4.4.3, and q \ gp hy Lemma 4.4.3, so rs{ß) = 0 since r^ G k. Since d is squarefree, gß is squarefree, so i'q{gß) = 1. By Theorem 4.4.1, residue^ is /c-linear, so we get residueg(/ - g) = ß -
^
aresidue^ I
r^(a)=0
\ = ß --
\ 9a
y
^
ah'q{goc)
rsia)=0
by Corollary 4.4.2. Since i^q{ga) = 0 foi a j^ ß^ this gives residueg(s) = ß—ß = 0. Since this holds for any normal irreducible q £ k[t] and f ~ g is simple, we have f — g G k[t]^ hence f — g E k[t]. (iii) Suppose that there are h G k{t), an algebraic extension E of Const(/c), V G k{t)^ ci^... ^Cn E E^ and t^i,... ,1^^ E Ek{t) such that
/ + /i = i)t; + y c , i l ^ . i=l
(5.9)
*
Let A; be the algebraic closure of k. As explained in part (ii), we can replace k{t) by k{t) and view (5.9) as an equality in k{t). Let a E k he any root of Vs. By Theorem 4.4.3, a = residuep(/) for some normal irreducible p E k[t]^ so by Lemma 5.6.1 n
a = residuep(/) = 2 . ^i^pi^i) E E. Hence, E contains all the roots of rg in Ä;, so Vg factors linearly over E.
D
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
which is the Rothstein-Trager formula in the case of rational functions. Part (iii) of Theorem. 5.6.1 applied to the rational function case proves part (iii)
5.6 The Residue Criterion
151
of Theorem 2.4.1, thereby completing the proof of t h a t theorem. As in t h e rational function case, a prime factorization Vg = us^'^ • • • s^ is required, as well as a gcd computation in k{ai)[t] for each i, where a^ is a root of s^. There is no need however to compute the splitting field of Vg. Furthermore, the monic part of Vg always has constant coefficients.
R e s i d u e R e d u c e ( / , D)
(* Rothstein-Trager resultant reduction *)
(* Given a derivation D on k(t) and / 6 k(t) simple, return g elementary over k(t) and a Boolean h G {0,1} such that / — Dg G A:[t] if 6 = 1, or f + h and f -\- h — Dg do not have an elementary integral over k{t) for any h e k{t) ifb = 0. *) d 0- K i^oo('^) > 0, then i/oo{Dv) > —ra by Theorem 4.4.4. Otherwise, z^oo(^) = 0 and Poo{Dv) > —m also by Theorem 4.4.4. Hence i/oo{t~^Dv) > 0 in any case, so TToo{t~^Dv) = 0. Multiplying both sides of (5.11) by t"^ and applying TTOO, we get b = n^{t-^f)
hence c = b/\{t)
= J2ci7r^(t-^-^]
=~X]Qi/oo(nOA(t)
= — Yll=i ^* ^oo{ui)^ so Dc = 0.
•
If c is a constant, then Theorem 5.4.2 implies t h a t
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 degree 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.
5.8 The Primitive Case In the case of primitive monomials over a differential field k^ the related problem we need to solve over k is the limited integration problem: recall that the problem of integration in closed form is, given f E k to determine whether there exist an elementary extension E of k and g £ E such that Const(£') is algebraic over Const(A:) and Dg = f. Let wi,... ^w^ G k be fixed. The problem of limited integration with respect to wi,... ^Wn is: given f E k^ determine whether there are g E k and c i , . . . , c^ G Const(A:) such that Dg = f — ciwi — . . . — CnWn, and to compute g and the Q'S if they exist. It is very similar to the problem of integration in closed form, except that the specific differential extension k(JWi,..., JWn) is provided for the integral. We present in this section an algorithm that, with appropriate assumptions on fc, integrates elements of k{t) when t is a primitive monomial over k. We first describe an algorithm for integrating elements of k[t]. T h e o r e m 5.8.1. 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 of k, and Dt is not the derivative of an element of k, then for any p £ k[t] we can either prove that p has no elementary integral over k(t), or compute q G k\i\ such that p — Dq G k. Proof We proceed by induction on m = deg(p). If m = 0, then p E k and q = 0 satisfies the theorem, so suppose that m > 0 and that the theorem holds for any polynomial of degree less than m. Since Dt is not the derivative of an element of k^ t is a, monomial over k, Const{k{t)) = Const(Ä:), and S = k hy Theorem 5.1.1. Thus, Theorem 5.7.1 says that if p has an elementary integral over fc(t), then there are t; Gfc[t],c i , . . . , c ^ G C and ui^... ^Un G /c(ci,...,c„) such that p = Dv + y c i ^
(5.12)
where C = Const (A:), if = Ä:(CI, . . . , c^) is an algebraic extension of Ä:, so t is transcendental over K. Furthermore, Dt is not the derivative of an element of
158
5 Integration of Transcendental Functions
K by L e m m a 5.1.1, so t is a monomial over K and Const{K{t)) = Const(K). Equating degrees in (5.12) we get deg{Dv) = deg(p) = m > 0, so deg(t') < m + 1 by L e m m a 5.1.2, so write p = af^ + 5 and v = ct^^^ + hf^ + w where a^h^c E k^ s^w E k[t]^ deg(s) < m and deg{w) < m. Equating the coefficients of t ^ + ^ and t ^ in (5.12) we get i^c = 0 and 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 p-Dqo
= {at'^ + s)~{{rn
+ l)cDt + Db)t'^-{mbDt)t'^-^
=:s-{rnbDt)t'^-^
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 D p — Dq E k where g = go + ^i •
IntegratePriniitivePolynoiiiial(p, D) (* Integration of polynomials in a primitive extension *) (* Given a is a primitive monomial t overfc,and p E k[t]^ return q E k[t] and a Boolean ß E {0,1} such that p — Dq E k if ß = 1, or p — Dq does not have an elementary integral over k(t) ii ß = 0. *) if p E k t h e n r e t u r o ( 0 , 1 ) a 0 such that r— Dt
Db
then, taking 4-
T+ t
nn
and
c= jj 62
ek{V^){t)
we get Dc
DO
Db
^
r— Dt
^Db
^
SO c E Const(/c(t)) C A: in contradiction with t transcendental over k. Hence, \/'^Dt/(iP' + 1) is not a logarithmic derivative of a ^(y^^^)-radical. D As a consequence, we have k{t) = {f e k{t) such that (t^ -f-1)""/ G k[t] for some integer n > 0} when t is a hypertangent monomial over k. We now present an algorithm that, with appropriate assumptions on k, integrates elements of k{t) when t
166
5 Integration of Transcendental Functions
is a hypertangent monomial over k. Note first t h a t if the polynomial X^ + 1 factors over k^ then \ / ^ G k, so Ä:(t) = k{$) where 0 = (\/—T — t ) / ( v ^ ^ -ft) is a hyperexponential monomial over k. Hence we can use the algorithm for integrating elements of hyperexponential extensions in this case, so we can assume for t h e rest of this section t h a t X ^ + 1 is irreducible over k, in other words t h a t \ / ^ ^ k. Since hypertangents are nonlinear monomials, integrating elements of k[t] is straightforward. T h e o r e m 5 . 1 0 . 2 . Let k be a differential field not containing \/--l, and t an hypertangent over k. If ^/^Dt/{t'^ -j- 1) is not a logarithmic derivative of a k{\f^)-radical, then for any p G k[t] we can compute q G k[t] and c G k such that
P-Dq-c Furthermore,
^^^^
efc.
if Dc ^ 0^ then p has no elementary
integral over k.
Proof. Let a = Dt/{t'^ + 1) G k. Since a \ / ^ is not a logarithmic derivative of a A:(A/^^)-radical, t is a monomial over k^ Const{k{t)) = Const(Ä:), and all the special irreducible polynomials divide t^ + 1 in k[t] by Theorem 5.10.1. Since A / ^ ^ k,t'^ + 1 is irreducible over k, so S'^^^ = {t^ + 1}. Since ö{t) = 2, Theorem 5.4.1 shows how t o compute g , r G k[t] such t h a t p — Dq = r and deg(r) < 1. Write r = at -{-b where a^b £ fc, and let c = a/(2a) G k. Since /i = t^ + 1 G 5 , Theorem 5.4.2 says t h a t deg(r — cDh/h) < 1, hence t h a t
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 ^ D6 ft^ -f 1)"^'^ ^ at + b = Dv + J2^, 'I, ' =Dv + 2ta^m,c,
"^ Db + Y,c,—^.
(5.18)
If z/oo('^) < 0, then VOQ{DV) = z/oo(t;) — 1 < —1 by Theorem 4.4.4, in contradiction with (5.18), hence z/oo('^) ^ 0^ which implies t h a t UQO{DV) > 0 by Theorem 4.4.4. Let c = a/{2a) G k. Equating t h e coefficients of t in (5.18), we get a = 2a YM=I '^i^ii
so 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 monomial 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 —'^, ^t'^-\-i{Dwo) > —m by Theorem 4.4.2, so, equating t h e coefficients of (t2 + 1)~"^ we get at -[-h = {Dc — 2mad)t
+ Dd +
2mac
5.10 The Hypertangent Case
169
which implies t h a t
f Dc\ \Dd)
f 0 —2ma\ (c\ ' \2ma 0 ) \d)
(a \h)
'
^^'^^^
Since we can solve coupled differential systems over k and a^h^a £ k, we can either prove t h a t (5.20) has no solution c^d E k, or find such a solution. If it has no solution in /c, then (5.19) has no solution, so p has no elementary integral over k{t). If we have a solution c^d E k, letting go = {ct + (i)/(t^ + 1 ) ^ G k{t), we get u 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 + ^iD
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 *) (* Given a differential field k such that ^/^^ ^ /c, a hypertangent monomial t over k and p E /c(t), return q E kit) and a Boolean ß E {0,1} such that p— Dq E k[t] if ß = 1, or p — Dq does not have an elementary integral over k{t) if /3 = 0. *) m
(* /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 1, then, deg(p) = deg{Dv + g) = deg{Dv)
= deg('?;) + S{t) - 1 > ö{t)
in contradiction with deg(p) < 6(t). Hence, v £ k^ so p = Dv -{- g £ k. This provides a complete algorithm for integrating elements of k{t).
D
5.11 The Nonlinear Case with no Specials
173
monomial T h e o r e m 5 . 1 1 . 1 . Let k be a differential field and t be a nonlinear over k be such that S^^^ = 0. Then, for any f £ k{t) we can either prove that f has no elementary integral over k{t), or compute an elementary extension E of kit) and g G E such that f — Dg £ k. Proof. Suppose t h a t t is Si nonUnear monomial over k and t h a t S^^^ = 0. Then, Const(^(t)) = Const(Ä:) by Lemma 3.4.5. Let / G k{t). By Theorem 5.3.1, we can compute gi^h^r G k{t) such t h a t / = Dgi + /i + r, h is simple and r is reduced. From /i, which is simple, we compute p2 ^ k{t) given by (5.8) in Theorem 5.6.1. Note t h a t go = gi ^ J g2 lies in some elementary extension of k{t). Let p = h ~ g2 and q = p -^ T^ then / = Dgo + g so / has an elementary integral over k{t) if and only if q has one. If p ^ A:[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 t h a t p G k[t]. We have k{t) = k[t] by (5.1), so r £ k[t]^ hence q £ k[t]. By Theorem 5.4.1 we compute gi, ^2 ^ k[t] such t h a t q = Dqi +^2 ^^nd deg(g2) < ^{t)- We now have f — Dg = q2 where g = go-\-qi. If ^2 ^ k^ then the theorem is proven, otherwise 0 < deg(g2) < ö{t)^ so ^2, and therefore / , have no elementary integral over k D by Corollary 5.11.1.
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 *) (* Given a is a nonlinear monomial t over k with S^^^ = 0, and / G k{t), return g elementary over k{t) and a Boolean ß £ {0,1} such that f — Dg £ k if ß = 1, or f — Dg does not have an elementary integral over k{t) if /3 = 0. *) (gi ,h,r) ^- H e r m i t e R e d u c e ( / , D) (g2, ß) ^- ResidueReduce(/i, D) if /? == 0 t h e n r e t u r n ( p i +^2,0) {qi J ^2) ^— PolynoniiaIReduce(/i — Dg2 + T, D) if q2 £k t h e e ß ^1 else ß ^0 r e t u r n ( p i -\- g2 + qi,ß)
Example 5.11.1. Let z/ G Z be any integer and consider
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 (/)i,{x) is the logarithmic derivative of Jy{x). Since Jy{x) is a solution of the Bessel equation y"{x) + -y'(x) + f 1 - ^ ) y{x) = 0 X^ J X \
(5.21)
it follows that (j)v{x) is a solution of the Riccati equation y\x) + y{xf + -y{x) + ("l - ^ " j = 0 . X \ X^ J
(5.22)
Let k = Q(:r) with D — d/dx, and let t be a monomial over k satisfying Dt = —t'^—t/x — (1 -z/^/x^), i.e. t = (t)y{x). It can be proven that 5^^^ = 0 in this extension^ so Corollary 5.11.1 implies that t has no elementary integral over A:, hence that / J
""^. • dx = z/log(x) - / (j)y{x)dx Ju{x)
J
where the remaining integral is not elementary over Q(x, (^^^(x)). Example 5.11.2. Let z/ € C be any complex number and consider x'^cj^l + x(^t - i^m - x{x^ + l)cßl - {x^ - z/2)^^ - xV4 dx x2(/)4 + x2(x2 + 2)(^2 _^ ^2 _^ ^4 ^ ^ 6 / 4
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 1+^2/4 (z/2 + x4/2)t + X^ + X __ 1 ^ i - - t 2 + l+x2/2' ^ - ~ ^2^24.^2 + ^4/2 ' a n d r - t + - . ^ 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
2. Calling {g2^ß) = ResidueReduce(/i, D) we get ß = 1 and 1^ 3. We have h-Dg2+r
f.2
= 0,so (gi,^2) = (0,0).
Hence / = Dgi + Dg2^ which means that x'^(i)l + x(t)l - u^cßl - x{x^ + l)(j)l - {x^ - z/2)(/)^ - x^/4 x2(/>4 + x 2 ( x 2 + 2)(l)l + a;2 + x4 +
l+xV4 (/),(x)2 + 1 + ^ 7 2
X^/4
dx
1 log((;^,(x)2 + l + : r V 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.
5.12 In-Field Integration We outline in this section minor variants of the integration algorithm that are used for deciding whether an element of k{t) is either a ® derivative of an element of k{t), ® logarithmic derivative of an element of fc(t), ® logarithmic derivative of a ^(t)-radicaL As we have seen in Sect. 5.2, such procedures are needed when building the tower of fields containing the integrand. Furthermore, they will be needed at various points by the algorithms of the remaining chapters, in particular when bounding orders and degrees. Note that the structure Theorems of Chap. 9 provide efficient alternatives to the use of modified integration algorithms, and in some cases the only complete algorithms for recognizing logarithmic derivatives. 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
if / = Du for some u G A;(t), then h G k[t]^ so we are left with integrating h-\-r which is reduced. The algorithms of Sects. 5.7 to 5.11 can then be applied (with a minor modification in the nonlinear case, to prevent introducing a new logarithm), either proving that there is no such w, or reducing the problem to deciding whether an element a £ k has an integral in k{t). If t is a primitive over k^ then it follows from Theorem 4.4.2 and Lemma 5.1.2 that if a has an integral in k{t)^ then a = Dv + cDt where V G k and c G Const(/c), and we are reduced to a limited integration problem in k. Otherwise, 6{t) > 1, and it follows from Theorem 4.4.2 and Lemmas 3.4.2 and 5.1.2 that if a has an integral in A:(t), then a = Dv where v £ k^ and we are reduced to a similar problem in k. When / = Da/a for some a £ Ä:(t)*, then Corollary 9.3.1, 9.3.2 or 9.4.1 provide alternative algorithms: / = Du for u £ k{t) if and only if the linear equation (9.8), (9.12) or (9.21) has a solution in Q. Corollary 9.3.2 also provides an alternative algorithm if / = DhjilP' -f 1) for some h £ k{t)^ i.e. f = arctan(6). It is obvious that the solution u is not unique, but that if / = Du = Dv for u,v £ k{t)^ then u ~v £ Const{k{t)). Recognizing Logarithmic Derivatives 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 If t is a hypertangent over k and \/^^ ^fc,then p = a + bt foi a^b G /c, and u = v{t^ + 1)^forv e k"" and e G Z, since S^^^ = {t^ + 1}. We are thus reduced to deciding whether a -\-bt can be written as a^U=
Dv D(t^ + 1) Dv ^ Dt — +e ; / = — + 2e-^—-t V t^ + 1 V t^ + 1
which is equivalent to ^
and
'u
^ ^ . Z . 2 Dt
The second condition can be immediately verified, while the first is the problem 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). Recognizing Logarithmic Derivatives of
fc(t)-radicals
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—
g=
y
DQO, 1 ^ ( n r . ( a ) = o C )
a
=
^-
7^^
IDv
=
where v G k{t) since the ma is an integer for each a. Furthermore, Theorem 5.6.1 implies that if / = Du/{nu) for n G Z and u G k{t)^ then / — Dg G fc[t], so we are left with deciding whether an element p of k\t] is the logarithmic derivative of a /c(t)-radical, li p = Du/{nu) for n G Z and u G k{t)^ then it follows from Exercise 4.2 that deg(p) < max(l,(5(t)) and from Corollary 4.4.2 that u = p\^ .. .p^' where pi E S and e^ G Z. If t is a primitive over k^ 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 overfc,then p G k and u = vt^ for v G k* and e G Z, since S^^^ = {t}. We are thus reduced to deciding whether p G k can be written as
178
5 Integration of Transcendental Functions
p=
1 Dv
e Dt +- —
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
na=
V
^ and
bt^^l ^ - —p^-— G Q . 2 Dt
T h e second condition can be immediately verified, while the first is the problem 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. L e m m a 5 . 1 2 . 1 . Let {K, D) be a differential
field and u^v e K*. If
I Du __ 1 Dv n u
m V
for nonzero n, ?n G Z^ then ^.lcm(n,m)/n /i.lcni(n,7n)/m Proof,
G Const(ü:').
L e t C = tfclcm(n,m)/n/^lcm(n,m)/m_ rpj^^^^^
Dc lcin(n,m) Du \-J—l— — = c n u so c G Const (iC).
lcm.(n,m) Dv , , , f 1 Du ^ ' ^ -lcm(n,m) m v \n u
1
Dv\ =0
m v J D
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, deg(a) + max(0, Ö{t) - 1), then deg{q) G {0, deg(c) - deg(6)}. (ii) If deg(6) < deg(a) + 6{t) - 1 and ö{t) > 2, then deg{q) G {0, deg(c) - deg(a) + 1 - 6{t)} . 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 If D t G k^ then, in order t o compute an upper bound on deg(g), we need t o decide whether an arbitrary element f of k can be written as f = mr]^Du
(6.13)
for some integer m and u e k^ where r] = Dt e k. Note t h a t (6.13) is a limited integration problem in k^ so it can b e solved by applying the algorithm of Chap. 7 t o / and TJ. Since the integer ?72 in a solution of (6.13) can appear in the upper bound computation, we first need t o ensure t h a t m is the same in all the solutions of (6.13). L e m m a 6c3«2. Suppose that t is a primitive over k such that rj = Dt is not the derivative of an element ofk. Then, for f G k{t), and any solutions (m^u) and {n^v) in Z x k of (6.13), we have n = m and v — u £ Const(A;).
6.3 Degree Bounds
195
Proof. Suppose t h a t {m^u) and {n^v) are both solutions of (6.13). Then, / = mr] + Du = riT] + Dv so Dw = {m — n)r] where w = v — u. Since r] is not the derivative of an element of k^ the above imphes t h a t m = n and t h a t Dw = 0. D L e m m a 6 . 3 . 3 . Suppose that t is a primitive over k such that rj = Dt is not the derivative of an element of k. Let a^b^q £ k[t] be such that a 7^ 0^ deg{b) < deg(a)^ and deg(g) > 0. Then, (i)
If deg{b) < deg(a) — 1, then deg{aDq + bq) G {deg(a) + deg(g),deg(a) + deg(g) - 1} .
(ii) If deg{b) = deg(a) — 1, then
either
deg{aDq + bq) € {deg(a) + deg(g), deg(a) + deg(g) - 1} or — -—-— = degfo) T] + Du lc(a) (Hi) If deg{b) = deg(a); then
for some u £ k .
either
deg{aDq + bq) E {deg(a) + deg(g),deg(a) + deg{q) - 1} or lc(fe)
Djlciq))
lc(aD(lc(g)) + 61c(g))
-Ho) ^ ^ ^ ( ^
HÖM^)
,
, ,
^
^
= ^''^'^' + ^ "
for some u £ k. Proof Since deg(g) > 0, deg(Dg) G {deg(g),deg(g) — 1} by L e m m a 5.1.2. (i) If deg(6) < deg(a) - 1, t h e n deg(aDg) = deg(a) +
deg{Dq)
> (deg(6) -h 1) + (deg(g) - 1) = deg(6) + deg(g) = deg{bq) which implies t h a t deg(aDg + bq) = deg{aDq)
G {deg(a) + deg{q), deg(a) + deg(g) - 1} .
(ii) Suppose t h a t deg(5) = deg(a) — 1. If deg(Dg) = deg(g), then deg(aDg) = deg(a) + deg{Dq) = deg{b) + 1 + deg(g) > deg(5) + deg(g) = deg(6g) which implies t h a t deg(ajDg + bq) = deg{aDq) = deg(a) + deg(g). Otherwise, deg(Dg) = deg(g) - 1, so D{lc{q)) = 0 by Lemma 5.1.2, which implies t h a t
196
6 The Risch Differential Equation lc{Dq) = deg{q)r]lc{q) + Dv
where v E k is the coefficient of t^eg(g)--i -^^ ^_ j ^ addition, we have deg(aDg) = deg(a) + deg{Dq) = (deg(6) + 1) + (deg(g) - 1) = deg{b) + deg(g) = deg(5g) 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\ ___ 0 =
TToo (
— aq
\
JI
=
f ftb tb
tDq\
f tb\
TToo ( — H
I =
~ Va
TToo ( —
ftDq I 4 - TToo (
since ITQQ is a ring-homomorphism, and both tb/a and tDq/q are in deg(6) = deg(a) — 1 and deg{Dq) = deg(g) — 1, we have tb\ I aJ
TToo 1 —
=
lc{tb) lc(a)
~
O^Q.
Since
lc(6) lc(a)
and ftDq\
IcjtDq)
lc{Dq)
degiq)ri\c{q) + Dv
,
. .
^ „
where u = v/lc{q) G k. (iii) Suppose that deg(6) = deg(a). If deg(Dg) = deg(^) — 1, then deg(aDg) = deg(a) + deg(Dg) = deg(6) + deg(g) - 1 < deg(6) + deg(g) = deg(6g) which imphes that deg(aDg + bq) = deg(6 0. Then,
d/dt.
(i) If deg{b) > deg(a) — 1 then, deg{aDq + bq) = deg(6) + deg(g). (ii) If deg{h) < deg(a) — 1, then deg{aDq + hq) — deg(a) + deg(g) — 1. (Hi) If deg{b) = deg(a) — 1, then either deg{aDq + bq) = deg(5) + deg(g), or 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 0. Then, (i) If deg{b) < deg(a), then deg{aDq + bq) = deg(a) + deg(g). (ii) If deg{b) = deg(a)^ then either deg{aDq + bq) = deg(6) + deg(g), or lc(a)
^^SW^+
j^^^)
•
Proof Since deg(g) > 0, we have deg(Dg) = deg(g) by L e m m a 5.1.2. (i) If deg(5) < deg(a), then deg(ajDg) = deg(a) + deg{Dq) > deg{b) + deg(g) = deg{bq) which imphes t h a t deg{aDq + bq) = deg(aDg) = deg(a) + deg(g). (ii) Suppose t h a t deg(6) = deg(a) and deg{aDq-j-bq) ^ deg(6) + d e g ( g ) . Since 6{t) = 1, L e m m a 6.3.1 impUes t h a t
lc(6)
fDq
lc(a)
\ q HDq)
= 1
D{lc{q))+deg{q)r,\ciq)
^=
H^)
, J3(lc(g))
=^^^('^)^ + 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. *) da ^ deg(a), dh ^ deg(6), dc ^ deg(c),n ^ max(0, dc — max(ci5, da)) (* possible cancellation *) if da = db t h e n a ^ -lc(&)/lc(a) if a = mDt/t + Dz/z for z G k* and m G Z t h e n n ^— max(n, m) return n
6.3 Degree Bounds
201
Example 6.3.3. Continuing example 6.2.1, let k = Q(x) with D = d/dx, t b e 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^, 6 = c = t'^/x'^ + {2/x - l)t, hence 1. 2. 3. 4.
da= db = dc = 2 da = db^ so a = —lc(6)/lc(a) = —Ijx^ n = max(0, d^ — max((i5, (ia)) = 0 — 1/x^ cannot be written in the form vn -h Dzjz
foimE'Z
and z G Q{x)
Hence any solution p G k[t] of (6.10) must be of degree 0, i.e. in Q{x). The Nonlinear Case L e m m a 6 . 3 . 5 . Suppose that t is a nonlinear monomial over k, and let a,b,q G k[t] be such that a 7^ 0, deg(6) = deg(a) + S{t) — I, and deg(g) > 0. Then, either deg{aDq + bq) = deg(6) + deg(g), or -|^=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 lc(6) _ / Dq lc(a) " ^ ^ \qtm-i) Furthermore, lc{Dq) deg{q)X{t).
\ _ lc(Dg) ~~ lc{qt^(t)-^)
= deg{q)lc{q)X{t)
_ ~
IcjDq) \c{q) '
by L e m m a 3.4.2, so —lc(5)/lc(a) = D
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. *) - deg(Dt), A max(0, 6{t) — 1), or t is nonlinear and either deg(ö) j^ Ö{t) — 1 or deg(6)/A(t) is not a negative integer. Since there is no cancellation between the leading terms of Dq and bq in those cases, we call them the non-cancellation cases. L e m m a 6.5.1. Let b^q G k[t] with q ^ 0. (i)
Suppose that b j^ 0. If D = d/dt or deg(6) > max(0, J(t) — 1), then the leading monomial of Dq + bq is 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
Proof, (i) Suppose t h a t 6 ^ 0 . If D = d/dt, then deg{Dq) < deg(g) < deg(g) + deg(6) = deg{bq) so deg{Dq + bq) = deg{b) + deg{q) and the leading coefficient of Dq + bq is t h e leading coefficient of 6g, which is t h e product of the leading coefficients of b and q. If t is an arbitrary monomial and deg{b) > m = max(0, 5{t) — 1), then, by Lemma 3.4.2, deg{Dq) < d e g ( g ) + m , so deg{Dq) < deg(g) + deg(6) = deg{bq). Hence, deg(Dg+6g) = deg{bq) = deg(6)+deg(g) as previously, and t h e leading coefficient of Dq + bq is t h e leading coefficient of 6g, which is t h e product of the leading coefficients of b and q. (ii) Suppose t h a t deg(g) > 0, deg(ö) < 6{t) — 1, and either 6{t) > 2 or D = d/dt. If 5{t) > 2, then deg(Dg) = deg(g) + 6{t) - 1 by Lemma 3.4.2, so deg{Dq) > deg(g) + deg(6) = deg{bq). Hence, deg{Dq 4- bq) = deg(jDg) = deg{q)-i-5{t) — l^ and t h e leading coefficient of Dq-\-bq is t h e leading coefficient of Dq, which is deg(g)lc(g)A(t) by Lemma 3.4.2. If D = d/dt, t h e n ö{t) = 0, so deg(6) < 0 which implies t h a t 5 = 0, so deg{Dq-\-bq) = deg{Dq) = deg{q) — 1, and the leading coefficient of Dq + bq is t h e leading coefficient of Dq which is deg(g)lc(g)A(t) since X{t) = L (iii) Suppose t h a t 5{t) > 2, deg(6) = ö{t) — 1, deg(g) > 0 and deg(g) j^ - l c ( 6 ) / A ( t ) . Then, deg{Dq) = deg{q) + 5{t)--l by Lemma 3.4.2, so deg{Dq) = deg{bq). T h e leading coefficient of Dq is deg{q)lc{q)X{t) by L e m m a 3.4.2, and the leading coefficient of bq is lc(6)lc(g). Since deg{q)X{t)+lc{b) ^7^ 0 by hypothesis, we get t h a t the leading coefficient of Dq + bq is (deg(g)A(t) -h lc(5))lc(g) D and the degree of Dq -h bq is deg(g) + 6{t) — 1. Lemma 6.5.1 yields t h e following algorithms for finding t h e solutions of equation (6.19) whenever one of its hypotheses is satisfied. W h e n d e g ( 5 ) is L a r g e E n o u g h Suppose t h a t 6 7^ 0, and t h a t D = d/dt or deg(6) > max(0, ^(t) — 1). Then, for any solution q £k\i\\ {0} of Dq + bq = c, we must have deg(g) + deg(6) = deg(c), so deg(g) = deg(c) — deg(6) and lc(6)lc(g) = lc(c). This gives the leading monomial ut^ of any such g, and replacing q by uf^ + /i in (6.19), we get
Diuf") +Dh + but"" + bh = c so Dh^bh
=
c-D{ut'')-but''
which is an equation of t h e same type as (6.19) with t h e 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). This bound will decrease at every pass through this process, guaranteeing termination.
208
6 The Risch Differential Equation
P o I y R i s c h D E N o C a n c e I l ( 6 , c, D n)
(* Poly Risch d.e. - no cancellation *)
(* Given a derivation D on fc[t], n either Mi integer or +oo, and 6, c G k[t] with 6 7^ 0 and either D = d/dt or deg(6) > max(0,8{t) -1) , return either "no solution", in which case the equation Dq -\- bq = c has no solution of degree at most n in k[t], or a solution q G k\b] of this equation with deg(g) < n. *) q^O while c ^ 0 do m n t h e n r e t u r n "no solution" V ^ (lc(c)/lc(5)) t^ q^ q + p n ^- m — 1 c ^^ c— Dp — hp return q
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 Dy + {t^ + 1)^ = t^ + (x + l)t^ + 1 + X + 2
(6.20)
which arises fom the integration of (tan(x)^ + (x + 1) tan(x)^ + tan(x) + x + 2) e*^"^^) . 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, •2, n = +00 and r ^{xi-l)r +t•
t
xr + x-\-l
so y = t -i- X is Si solution of (6.20), hence / (tan(x)^ + (x -h 1) tan(x)^ + tan(x) + x + 2)e*^"^^^dx = (tan(x) + x)e tan(a;) 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
replacing q by uf^ + /i in the equation yields a similar equation with a lower degree bound on its solution. If g E /c, then: if 6 € fc*, then Dq + bq e k, so either c G /c, in which case we are reduced to solving a Risch differential equation of type (6.1) over A;, or deg(c) > 0 and (6.19) has no solution in k, hence in k[t]. If deg(6) > 0, then the leading term of Dq + bq is qlc{b)t^^^^^\ so either deg(c) = deg(6), in which case q — lc(c)/lc(5) is the only potential solution, or deg(c) ^ deg(6) and (6.19) has no solution in k^ hence in k\i\.
P o l y R i s c h D E N o C a n c e l 2 ( 6 , c, D, n)
(* Poly Risch d.e. - no cancellation
(* Given a derivation D on /c[t], n either an integer or +oo, and b^c £ k[t] with deg(6) < 5{t) — 1 and either D = d/dt or S{t) > 2, return either "no solution", in which case the equation Dq -\- bq = c has no solution of degree at most n in k[t], or a solution q G k[t] of this equation with deg(g) < n, or the tuple (/i,5o,co) such that h G k[t], bo,co G k, and for any solution q G k[t] of degree at most n of Dq -j- bq = c, y = q — h is a solution in k of Dy + 6oy = CQ. *) 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 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 D''q*+TTp{b)q* =7Tp{c)
(6.25)
where q* = 7Tp{q). Assuming that we have an algorithm for solving (6.25) in k[t]/{p), we can then solve (6.19) as follows: if (6.25) has no solution in k[t]/{p)^ then (6.19) has no solution in k[t]. Otherwise, let g* G k[t]/{p) be a solution of (6.25), and let r £ k[t] be such that deg(r) < deg(p) and TTp{r) = g*. Note that TTp{Dr + hr) = 7rp(c), so p | c — Dr — br. In addition, 7Tp{q) = 7rp(r), so h = (^q — r)/p £ k[t] and we have
c = Dq + bq=p(Dh+
(b+—]h]
-{-Dr + br
so /i is a solution in k[t] of degree at most deg(g) — deg(p) of Dh^(b+^)h='-^'-^' \ P J P
(6.26)
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 techniques 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 If Dt/it? -\- 1) = T] £ k^ then 5{t) = 2, so the only case not handled by Lemma 6.5.1 is 6 = 6o — niqt where bo £ k and n > 0 is the bound on deg(g). In such extensions, the method outlined above provides a complete algorithm: if / = 4 £ k, then S''' = {t - A/=T,^ + v ^ } , and (6.25) is simply a Risch differential equation over k.
6.6 The Cancellation Cases
215
If y ^ ^ k, then taking p = t"^ + 1 £ 5^^^ (6.25) becomes i^g* + (6o - n 7 ] v ^ ) g * = c ( v ^ )
(6.27)
where D is extended to k[t]/{p) :^ k{y/^) by Dy/^ = 0. One possibility is to view (6.27) as a Risch differential equation in fc(\/^) and to solve it recursively. If it has no solution in ^ ( \ / ^ ) , then (6.19) has no solution in k[t]. Otherwise, if u-\- vy^^ is a solution of (6.27) with u^v E k^ t h e n letting r = u-^vt^ h = {q — r)/p is a solution in k[t] of degree at most n — 2 of (6.26). It is also possible however t o avoid introducing V ^ by considering the real and imaginary parts of (6.27): writing q* = u -{- vy^^^^ we get
where CQ -{- Cit is the remainder of c by t^ + 1. This is the coupled differential system introduced in Sect. 5.10. If it has no solution in k, then (6.19) has no solution in k[t]. Otherwise, if (u^v) € A;^ is a solution of (6.28), then letting r = u -\- vt^ h = [q — r)/p is a solution in Ä:[t] of degree at most n — 2 of (6.26).
PolyRischDECancelTan(6o, c, D, n) (* Poly Risch d.e., degenerate cancellation - tangent case *) (* Given a derivation D on /c[t], n G Z, 6o G A: and c £ k[t] with Dt/{t^ + 1) G /c, ^/—l ^ k and n > 0, return either "no solution", in which case the equation Dq + {ho — ntDt/(t^ -\- \))q = c has no solution of degree at most n in k[t]^ or a solution q G k\t] of this equation with deg(g) < n. *) if n = 0 t h e n if c G A: t h e n if 6o 7^ 0 t h e n r e t u r n RischDE(6o, c) else if / c = g Gfct h e n return(g) else r e t u r n "no solution" else r e t u r n "no solution" p 0 since h £ k[t]. So suppose now t h a t n = iyp{y) < 0. Let g = J^^i 0. Then, i'p{Dy + fy) = Vp{y) - 1 by Lemma 6.1.1. Since g = Dy + fy, this implies t h a t i^pig) < 0, hence t h a t p \ e. Since p is normal, gcd(p, Cs) = 1, so Up{en) = i^p{e) > -yp{g) = l - n . Also, p does not divide d since i'p{f) > 0, so i/p(c) = 0, so i/p(gcd(c, dc/dt)) = 0. Hence iyp{h) = h'p{gcd{en^den/dt)) = Up{en) — 1 > - n , so yp{q) = n + ^p(^) > n — n = 0. Case 2: i'p{f) < 0. Then, Vp{g) = Vp{Dy + fy) = iyp{f) + n by L e m m a 6.1.1, so n = ^p{g) — ^p[f)' Since n < 0, this implies t h a t Vp{g) < ^p{f) < 0, hence t h a t p I d and p | e. As above, since p is normal, gcd(p, «i^) == gcd(p, e^) = 1, so Up{dn) = -i^pif) < --^p{9) > ^pien)' Thus, Up{c) = min{up{dn),jyp{en)) = i^p{dn) = -yp{f) > 0, so
7.1 The Parametric Risch Differential Equation Up{h) = Up{gcd{en,den/dt))
-
219
Vp{gcd{c,dc/dt))
= (z^p(en) - 1) - (^p(c) - 1) z/p(e) + Vp{f) > -iyp{g) + iyp{f)
-n,
so i^p(g) = n + z^p(/i) > n — n = 0.
D
gi^...^gm C o r o l l a r y 7 . 1 . 1 . Let / € k{t) be weakly normalized w.r.t. t, in k{t), and d^^en and h he as in Theorem 7.1.1. Then, for any solution c i , . . . , c ^ £ Const(fe) and y G k{t) of Dy + fy = YlZ^i ^i9i, q = yh G k{t) and q is a solution of m
dnhDq + {dnhf - d^Dh) q = Y^ Ci{dnh'^gi) •
(7.2)
i=l
Conversely, for any solution c i , . . . , c ^ G Const(A:) and q E k{t) y = q/h is a solution of Dy -\- fy = Y^^i ^i9i-
of
(7.2),
Proof. Let c i , . . . , c ^ G Const(A:) and y G k{t) be a solution of Dy -\- fy = g^ and let q — yh. q G k{t) by Theorem 7.1.1, and Dq+(f~~ ^
—
]q = hDy + yDh^
hfy - yDh = h{Dy + fy) =
/
hj^agi. 7= 1
Multiplying through by dnh yields dnhDq+{dnhf — dnDh)q = dnh'^ Y^iLi ^i9i^ so g is a solution of (7.2). Conversely, the same calculation shows t h a t for any solution c i , . . . , c ^ G Const(/c) and q e k{t) of (7.2), y = q/h is a solution of Dy + fy=-YT=i^i9i' n The above theorem and corollary give us an algorithm t h a t reduces a given parametric Risch differential equation to one over 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 *) G k{t) with / weakly (* Given a derivation D on k[t] and f^gi,...,gm normalized with respect to t, return the tuple (a,5, G^i,. . . , Gm^h) such that a,h e k[t], b G k{t), Gi,...,Gm G k{t), and for any solution c i , . . . ,Cm G Const(/c) and y G k{t) oiDy + fy^ YH=I ^^^^' Q = yh G k{t) satisfies aDq i- bq = ^^iCiGi. *) (dn,ds) min(0,mini 0 and p G <Sf, then z/p(g) > m.iii{0,mini n for some n < 0, replacing q by /ip"" in (7.3) yields a{p''Dh + np^'-^hDp) + fe/iK = X]c^^i i=l
hence
aDh -f ( 6 + n a ^ J ^ = ^^i
{diP"'') •
('^•4)
Furthermore, h G A:(t) since g G fc(t), and h G Op since i^p(g) > n. Thus we are reduced to finding the solutions c i , . . . , c^ G Const(fc) and h G k{t) H Op of (7.4). Note that b + naDp/p G A:(t) since 6 G Ä:(t), a G Ä:[t] and p £ S. The eventual power of p in the denominator of 5 + naDp/p can be cleared by multiplying (6.7) by p^ where N = max(0, ~z/p(6)), ensuring that the coefficients of the left hand side of (7.4) are also in k{t) H 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 i^p(g) in the potential cancellation case, i.e. Ppib) = 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 If Dt G k., then every squarefree polynomial is normal, so k{t) = k\t\., which means that a^b £ k\t\ and any solution in g G fc(t) of (7.3) must be in k\t]. T h e H y p e r e x p o n e n t i a l Case If Dt/t = T] £ k^ then k{t) = fc[t,t~-^], so we need to compute a lower bound on i^tiQ) where c i , . . . , c ^ G Const(fc) and q G k{t) is a solution of (7.3).
7.1 The Parametric Risch Differential Equation
221
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 ut{q) > min
0,5, min
{Pt{gi))
l min
0, min {iyt{gi)) l