+ All Categories
Home > Documents > Calculus Hmmt

Calculus Hmmt

Date post: 10-Apr-2018
Category:
Upload: aayush-visa
View: 215 times
Download: 0 times
Share this document with a friend

of 94

Transcript
  • 8/8/2019 Calculus Hmmt

    1/94

    Symbolic Integration

    B J R N T E R E L I U S

    Master of Science ThesisStockholm, Sweden 2009

  • 8/8/2019 Calculus Hmmt

    2/94

    Symbolic Integration

    B J R N T E R E L I U S

    Masters Thesis in Computer Science (30 ECTS credits)at the School of Engineering Physics

    Royal Institute of Technology year 2009

    Supervisor at CSC was Inge FrickExaminer was Johan Hstad

    TRITA-CSC-E 2009:095ISRN-KTH/CSC/E--09/095--SE

    ISSN-1653-5715

    Royal Institute of Technology

    School of Computer Science and Communication

    KTH CSCSE-100 44 Stockholm, Sweden

    URL: www.csc.kth.se

  • 8/8/2019 Calculus Hmmt

    3/94

    Abstract

    Symbolic integration is the problem of expressing an in-definite integral

    f of a given function f as a finite com-

    bination g of elementary functions, or more generally, todetermine whether a certain class of functions contains anelement g such that g = f.

    In the first part of this thesis, we compare different al-gorithms for symbolic integration. Specifically, we reviewthe integration rules taught in calculus courses and howthey can be used systematically to create a reasonable, butsomewhat limited, integration method. Then we presentthe differential algebra required to prove the transcenden-

    tal cases of Rischs algorithm. Rischs algorithm decides ifthe integral of an elementary function is elementary and ifso computes it. The presentation is mostly self-containedand, we hope, simpler than previous descriptions of the al-gorithm. Finally, we describe Risch-Normans algorithmwhich, although it is not a decision procedure, works wellin practice and is considerably simpler than the full Rischalgorithm.

    In the second part of this thesis, we briefly discuss animplementation of a computer algebra system and some ofthe experiences it has given us. We also demonstrate animplementation of the rule-based approach and how it can

    be used, not only to compute integrals, but also to generatereadable derivations of the results.

  • 8/8/2019 Calculus Hmmt

    4/94

    Sammanfattning

    Symbolisk integration

    Symbolisk integration r problemet att uttrycka en obe-stmd integral

    f av en given funktion f som en nd-

    lig kombination g av elementra funktioner, eller mera all-mnt, att avgra huruvida en viss klass av funktioner inne-hller ett element g sdant att g = f.

    I den frsta delen av det hr arbetet jmfr vi olika al-goritmer fr symbolisk integration. Mer specifikt pminnervi om de integrationsregler som lrs ut i kurser i integral-

    kalkyl och hur de kan anvndas fr att skapa en rimlig, omn ngot begrnsad, integrationsmetod. Drefter presente-rar vi en den differentialalgebra som behvs fr att bevisade transcendenta fallen i Rischs algoritm. Rischs algoritmavgr om integralen av en elementr funktion r elemen-tr och berknar i s fall denna. Presentationen r i stortsett fristende och frhoppningsvis enklare n tidigare be-skrivningar. Slutligen beskriver vi Risch-Normans algoritmsom, trots att den inte kan avgra om en integral r ele-mentr, ofta fungerar i praktiken. Den r ocks vsentligtenklare n Rischs algoritm.

    I den andra delen av rapporten diskuterar vi en im-plementation av ett datoralgebrasystem samt ngra av deerfarenheter det givit oss. Vi demonstrerar ocks en im-plementation av metoden med integrationsregler samt hurden kan anvndas, inte bara fr att berkna integraler, utanocks fr att generera lsbara hrledningar av resultaten.

  • 8/8/2019 Calculus Hmmt

    5/94

    Contents

    1 Introduction 1

    1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.1 The mathematical history . . . . . . . . . . . . . . . . . . . . 21.1.2 The computational history . . . . . . . . . . . . . . . . . . . 3

    2 Elementary techniques 5

    2.1 Polynomials and rational functions . . . . . . . . . . . . . . . . . . . 52.2 Description of a heuristic algorithm . . . . . . . . . . . . . . . . . . . 5

    2.2.1 Linearity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2.2 Simple substitutions . . . . . . . . . . . . . . . . . . . . . . . 62.2.3 Special forms . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2.4 Other transformations . . . . . . . . . . . . . . . . . . . . . . 7

    2.3 Uses for heuristic algorithms . . . . . . . . . . . . . . . . . . . . . . . 9

    3 Integration of rational functions 11

    3.1 The naive method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Hermites method for determining the rational part . . . . . . . . . . 123.3 Rothstein - Tragers method for the logarithmic part . . . . . . . . . 12

    3.3.1 The Lazard - Rioboo - Trager improvement . . . . . . . . . . 15

    4 Liouvilles theorem 17

    4.1 Differential algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.2 Liouvilles theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    4.2.1 Transcendental extensions . . . . . . . . . . . . . . . . . . . . 21

    4.2.2 Algebraic extensions . . . . . . . . . . . . . . . . . . . . . . . 244.2.3 Strong form of Liouvilles theorem . . . . . . . . . . . . . . . 26

    4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    5 Rischs algorithm 29

    5.1 Logarithmic extensions . . . . . . . . . . . . . . . . . . . . . . . . . . 295.1.1 Polynomial part . . . . . . . . . . . . . . . . . . . . . . . . . 305.1.2 Rational part . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.1.3 Logarithmic part . . . . . . . . . . . . . . . . . . . . . . . . . 32

    5.2 Exponential extensions . . . . . . . . . . . . . . . . . . . . . . . . . . 33

  • 8/8/2019 Calculus Hmmt

    6/94

    5.2.1 Polynomial part . . . . . . . . . . . . . . . . . . . . . . . . . 35

    5.2.2 Rational part . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.2.3 Logarithmic part . . . . . . . . . . . . . . . . . . . . . . . . . 37

    6 The Risch differential equation 39

    6.1 Canonical representation . . . . . . . . . . . . . . . . . . . . . . . . . 396.2 The denominator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.3 Degree bounds for the numerator . . . . . . . . . . . . . . . . . . . . 45

    6.3.1 The base case . . . . . . . . . . . . . . . . . . . . . . . . . . . 456.3.2 Logarithmic extensions . . . . . . . . . . . . . . . . . . . . . 466.3.3 Exponential extensions . . . . . . . . . . . . . . . . . . . . . . 47

    6.4 The SPDE algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    6.5 The final solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    7 Risch-Normans parallel algorithm 51

    7.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517.2 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

    8 Implementation of an algebra system 55

    8.1 Existing systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558.2 Representation of expressions . . . . . . . . . . . . . . . . . . . . . . 568.3 Automatic simplification . . . . . . . . . . . . . . . . . . . . . . . . . 588.4 General implementation suggestions . . . . . . . . . . . . . . . . . . 59

    8.4.1 Automatic memory management . . . . . . . . . . . . . . . . 608.4.2 Algorithm selection . . . . . . . . . . . . . . . . . . . . . . . . 608.4.3 Regression testing . . . . . . . . . . . . . . . . . . . . . . . . 608.4.4 Programming by contract . . . . . . . . . . . . . . . . . . . . 62

    9 Results 63

    9.1 Some simple examples . . . . . . . . . . . . . . . . . . . . . . . . . . 639.2 Generating hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649.3 Generating complete solutions . . . . . . . . . . . . . . . . . . . . . . 659.4 Integrals which remain unevaluated . . . . . . . . . . . . . . . . . . . 67

    10 Discussion 69

    10.1 Extensions of Rischs algorithm . . . . . . . . . . . . . . . . . . . . . 6910.2 Concerning the complexity of integration . . . . . . . . . . . . . . . 7010.3 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    10.3.1 A simpler proof of the Lazard-Rioboo-Trager formula . . . . 7110.3.2 Symbolic integration in numerical computations . . . . . . . 7110.3.3 Symbolic integration in education . . . . . . . . . . . . . . . 7110.3.4 Improvements of the implementation . . . . . . . . . . . . . . 72

    10.4 C onclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

    Bibliography 75

  • 8/8/2019 Calculus Hmmt

    7/94

    Appendices 76

    A Partial fractions decomposition 77

    B Square-free factorization 79

    C Greatest common divisors and the resultant 81

  • 8/8/2019 Calculus Hmmt

    8/94

    Acknowledgements

    I would like to thank Dr. Inge Frick for supervising this project, which has takenmuch more time than I originally anticipated. As Inge Frick himself wrote one ofthe first computer algebra systems for tensor manipulations, I should have payedmore attention to his advice concerning the time an implementation would take.Nevertheless, implementing a computer algebra system has been very instructiveand I am grateful for having had the freedom to explore some interesting areas ofcomputer algebra.

    I am also very grateful to Stiftelsen Frans von Sydows Hjlpfond for providing mewith generous grants during much of my studies at the Royal Institute of Technology.Last, but certainly not least, I would like to thank my family for the support they

    have given me while I was working on this thesis.

  • 8/8/2019 Calculus Hmmt

    9/94

    Chapter 1

    Introduction

    Symbolic integration is the problem of finding a formula g(x) for the indefiniteintegral of a given function f(x). That is, to find g(x) such that

    g(x) =

    f(x)dx

    or equivalently g(x) = f(x). From a mathematical perspective, we could just defineg(x) as

    g(x) =

    xa

    f(t)dt

    for some arbitrary a. Clearly this is not very useful, as we have only replaced anindefinite integral whose properties we do not know with a function g(x) whoseproperties we also do not know. Furthermore, determining the properties of g(x) is

    just as difficult as determining the properties of the integral itself. What we want todo is to express the integral using only a prescribed class of well-known functions.

    Many people immediately think of Taylor- or Fourier series as a suitable classof functions in connection with algorithmic integration, and indeed the integrationproblem becomes easy with this representation. Using a series solution, however,causes other problems that one would likely avoid if one represented the integraldifferently. For example, the series will fail to converge outside its radius of conver-gence and even when it converges it may converge too slowly to be practical even

    for numerical evaluation. It is also very difficult to see whether the series can beexpressed as a product or composition of previously studied functions or series.

    In symbolic integration one seeks a finite expression for the integral. To distin-guish from series solutions, the name integration in finite terms is sometimes usedinstead of symbolic integration.

    Definition 1.1 Symbolic integration is the problem of expressing an indefinite in-tegral

    f of a given function f as a finite combination g of elementary functions,

    or more generally, to determine whether a certain class of functions contains anelement g such that g = f.

    1

  • 8/8/2019 Calculus Hmmt

    10/94

    CHAPTER 1. INTRODUCTION

    In the remainder of this thesis we will study the problem of integrating ele-

    mentary transcendental functions whose integrals are also elementary. We will alsosee examples of elementary functions whose integrals are not elementary and thuscannot be integrated in this sense.

    1.1 History

    1.1.1 The mathematical history

    The problems of symbolically computing derivatives and indefinite integrals hasbeen studied ever since Newton and Leibniz invented calculus and discovered the

    fundamental theorem in the late 17th century, thereby relating the two concepts.The symbolic differentiation problem is easy to solve thanks to the product rule andchain rule. The lack of any corresponding rules relating the integral of a product tothe integrals of the factors, or the integral of a composition to the integrals of itsparts, makes the integration problem much more difficult. The conventional use ofintegration rules and special tricks does not explain why some functions cannot beintegrated in finite terms while similar integrands can be integrated easily, even byelementary methods.

    The systematic study of when an integral can be expressed in finite terms beganin the early 19th century. In 1820, Laplace remarked that the integral of a functioncannot contain other radicals than those in the function, or in his own words

    lintgrale dune fonction diffrentielle ne peut contenir dautres quan-tits radicaux que celle qui entrent dans cette fonction

    About a decade later, Liouville stated and proved a stronger and more precise theo-rem which roughly states that if the integral of an elementary function is elementary,then it can be expressed using only functions that appear in the integrand and alinear combination of logarithms of such functions. This theorem is now known asLiouvilles theorem or Liouvilles principle.

    In 1845 the Russian mathematician Ostrogradsky discovered a method for com-puting the rational part of the integral of a rational function, but his discovery did

    not become widely known outside of Russia. In 1872 Hermite found a different andin some ways simpler method for computing the rational part of the integral.

    Some of the first books on the general integration problem were written byMordukhai-Boltovskoi in 1910 and 1913, and Hardy in 1916. Hardy [16] describedmethods for integrating certain types of functions, but he did not believe that therecould be a decision procedure for the general case of integrating elementary functionsor even the case of algebraic function, as indicated by the following statement.

    But no method has been devised as yet by which we can always de-termine in a finite number of steps whether a given elliptic integral is

    2

  • 8/8/2019 Calculus Hmmt

    11/94

    1.1. HISTORY

    pseudo-elliptic, and integrate it if it is, and there is reason to suppose

    that no such method can be given.1

    Possibly because he did not consider the case of purely transcendental integrands,Hardy regarded integrating transcendental functions as a fundamentally more dif-ficult problem than that of integrating algebraical functions.

    The theory of integration of transcendental functions is naturally muchless complete than that of the integration of rational or even of alge-braical functions. It is obvious from the nature of the case that thismust be so, . . .

    This remark is interesting because modern texts on the subject take the oppositeview, usually only outlining integration of algebraic functions if not omitting itentirely.

    In the mid 20th century, mathematicians applied new techniques from abstractalgebra to the problem of integration in finite terms. The integration problem wasrephrased as a problem of differential algebra by Ritt in the 1940s, and Liouvillestheorem was generalized to its modern form by Ostrowski. Recently there have beensome extensions of Liouvilles theorem for integration in terms of non-elementaryfunctions [1, 25], but they are somewhat complicated and beyond the scope of thistext.

    1.1.2 The computational historyThe idea of symbolic computation in general originated at least as early as in the1840s when Lady Augusta Ada King, Countess of Lovelace, translated an article onBabbages Analytical Engine. In her extensive annotations to the text, she wrote:

    Many people not conversant with mathematical studies imagine thatbecause the business of the engine is to give its results in numericalnotation, the nature of its processes must consequently be arithmeticaland numerical, rather than algebraical and analytical. This is an error.The engine can arrange and combine its numerical quantities exactly as ifthey were letters or any other general symbols; and in fact it might bring

    out its results in algebraical notation were provisions made accordingly.

    Little more than this observation was done until computers became available in the1940s and 1950s. The effort to automate not only numerical calculations but alsosymbolic ones, gave some of its first results in 1953 with the first symbolic differ-entiation programs written by Nolam and Kahrimanian. Since integration is muchmore difficult than differentiation, the first practical symbolic integrators did not

    1 An elliptic integral is an integral of the formR(x,

    P(x))dx where R(x, y) is a rational

    function and P(x) a polynomial of degree three or four. Hardy calls an elliptic integral pseudo-elliptic if it can be integrated in finite terms.

    3

  • 8/8/2019 Calculus Hmmt

    12/94

    CHAPTER 1. INTRODUCTION

    appear until the 1960s when Slagle and Moses wrote SAINT and SIN respectively.

    These programs proceeded along the same line of thought as humans do, essentiallytrying to rewrite the integrand using substitutions and other transformations untilit reached a form with a known method of solution. Despite their heuristic approachthey achieved rather good result, outperforming an average student in both speedand rate of success.

    In 1969, Risch [24] used Liouvilles theorem to outline an algorithm that findsan elementary expression for the integral of an elementary functions if one exists, orotherwise proves that the integral is non-elementary. Subsequent work has focusedon improving the efficiency of the algorithm and to solve the subproblems left openby Risch.

    At the 1976 SYMSAC conference, Risch and Norman presented another algo-

    rithm for integration in finite terms based on Liouvilles theorem. Unlike Rischsoriginal algorithm, it can fail to compute an elementary integral even when one ex-ists but has the advantage of being easier to implement. In practice, it successfullycomputes many integrals and for that reason it is often used prior to the full Rischintegration algorithm.

    Trager and Rothstein, in 1976 and 1977 respectively, discovered an algorithmfor computing the logarithmic part of the integral of a rational function using theminimal number of algebraic extensions. Lazard and Rioboo later discovered2 animprovement of Rothstein-Tragers algorithm that entirely avoids using algebraicextensions in the intermediate computations.

    In 1981, Davenport gave an algorithm for integrands containing a single algebraic

    extension only depending on x, but it turned out to be impractical. A simplermethod was invented by Trager in 1984. The full problem of mixed algebraic andtranscendental extensions was solved by Bronstein in 1990.

    2The improvement had previously been discovered by Trager, but he did not publish his result.

    4

  • 8/8/2019 Calculus Hmmt

    13/94

    Chapter 2

    Elementary techniques

    2.1 Polynomials and rational functions

    Polynomials are trivial to integrate by using the linearity of the integral and therule

    xndx =xn+1

    n + 1

    Implementations mostly differ in low level details such as how they represent poly-nomials. One should notice, however, that some polynomials are better integratedin other ways. A typical example of such a polynomial would be x(x2 + 1)1000.

    Rational functions are considerably more difficult to integrate. The method for

    calculating integrals of rational functions taught in most calculus courses is to factorthe denominator completely and use the factorization to compute a partial fractionexpansion of the integrand, cf. appendix A. The numerators in the partial fractionexpansion will be constants and the denominators will be powers of linear factors.Once a complete partial fractions expansion is known, it is easy to evaluate theintegral term by term using

    1

    (x i)j dx =log(x i) if j = 1,1

    (1j)(xi)j1otherwise.

    More elaborate methods exist, of which some will be presented in chapter 3.

    2.2 Description of a heuristic algorithm

    We will now discuss a more systematic version of the integration rules used incalculus courses.

    2.2.1 Linearity

    The first step in the heuristic integration algorithm is to use the linearity of theintegral to distribute the integration over sums, and to pull out any factors that are

    5

  • 8/8/2019 Calculus Hmmt

    14/94

    CHAPTER 2. ELEMENTARY TECHNIQUES

    free of the integration variable. Using the linearity early simplifies the later rules

    since we then only have to consider products and compositions of functions.Although distributing the integral over sums might seem like a harmless sim-

    plification, doing so will in some cases replace an integral that can be expressed infinite terms with two or more integrals that cannot. For example, it is easy to seethat

    (2x + 2)ex2+2x+1dx = ex

    2+2x+1

    On the other hand

    (2x + 2)ex2+2x+1dx = 2 ex

    2+2x+1dx + 2 xex2+2x+1dx

    = 2

    e(x+1)

    2

    dx + 2

    xe(x+1)

    2

    dx

    where we know (and will also prove in section 4.3) that

    e(x+1)2

    dx is not elementary.It follows that the other term,

    xex

    2+2x+1dx, cannot be elementary either since

    xex

    2+2x+1dx =ex

    2+2x+1

    2

    e(x+1)2

    dx

    2.2.2 Simple substitutions

    After the use of linearity, we try different simple substitutions, also known as thederivative-divides method or the inverse chain rule. Here we try substituting eachsubexpression in turn for a new variable. In other words, we try the rule

    f(g(x))dx =

    f(g(x))

    g(x)dg

    for all possible choices ofg appearing in the expression. If some f(g(x))g(x) depend only

    on g(x) and not directly on x, we consider it a successful substitution and proceed

    by integrating f(g(x))g(x) with respect to g. Finally, we substitute g = g(x) back into

    the integral.

    The effectiveness of this method should not be underestimated as it greatlyreduces the number of integrals that the system must know. In particular, this ruleallows us to integrate f(ax + b) whenever we know how to integrate f(x).

    2.2.3 Special forms

    After the use of linearity, the integrand is matched to a list of special forms. Thisincludes all elementary functions along with a number of composite types listed intables 2.1-2.3, where P(x) denotes a polynomial in x and R(x) denotes a rationalfunction in x.

    6

  • 8/8/2019 Calculus Hmmt

    15/94

    2.2. DESCRIPTION OF A HEURISTIC ALGORITHM

    Integrand Method

    P(x) Integration of a polynomial is trivialR(x) Any method described in chapter 3x1

    x1dx = log |x|

    xa

    xadx = xa+1/(a + 1) if a = 1ex

    exdx = ex

    log x

    log xdx = x log x xsin x

    sin xdx = cos x

    cos x

    cos xdx = sin x

    Table 2.1. Basic integrands

    Integrand Method

    R(ex) Substitute t = ex to get a rational functionP(sin(x), cos(x)) Use formulas for

    sinn(x)cosm(x)dx

    R(sin(x), cos(x)) Substitute t = tan(x/2) to get a rational functionP(x) exp(x) Integration by parts reduces the degree of P(x)P(x)sin(x) Integration by parts reduces the degree of P(x)P(x) cos(x) Integration by parts reduces the degree of P(x)P(x)log(x) Integration by parts gives a rational integrandP(x) arcsin(x) Integration by parts gives an algebraic integrandP(x) arccos(x) Integration by parts gives an algebraic integrand

    P(x) arctan(x) Integration by parts gives a rational integrandTable 2.2. Transcendental integrands

    Integrand Method

    R(x, n

    ax+bcx+d ) Substitute t =

    n

    ax+bcx+d to get a rational integrand

    R(x,

    a2 x2) Substitute x = a sin t to get a trigonometric integrandR(x,

    x2 + a2) Substitute x = a tan t to get a trigonometric integrand

    R(x,

    x2 a2) Substitute x = a cosh t to get a hyperbolic integrandR(x,

    ax2 + bx + c) Complete the square by substituting t = x + b2a

    Table 2 .3. Algebraic integrands

    2.2.4 Other transformations

    As a last resort, we expand the integral by distributing products over sums. Wehave delayed this both because distributing will often cause an expression swell,but also and more importantly, because we will be more likely to use the linearityto replace a relatively simple integral with two that can not be integrated in finite

    7

  • 8/8/2019 Calculus Hmmt

    16/94

    CHAPTER 2. ELEMENTARY TECHNIQUES

    terms as the example in section 2.2.1.

    We can also apply other transformations and simplifications to the integrandto reduce the number of functions that appear in the integrand. For example, thefollowing identities can be used to remove products of trigonometric functions.

    sin(mx)sin(nx) =cos((m n)x) cos((m + n)x)

    2

    sin(mx)cos(nx) =sin((m n)x) + sin((m + n)x)

    2

    cos(mx)cos(nx) =cos((m n)x) + cos((m + n)x)

    2

    Similarly, one can convert products of trigonometric and exponential functions tocomplex exponentials with the following.

    sin(x) =1

    csc(x)=

    eix eix2i

    cos(x) =1

    sec(x)=

    eix + eix

    2

    tan(x) =1

    cot(x)=

    eix eixieix + ieix

    If hyperbolic functions are not converted to exponentials as part of the automaticsimplification, it may be useful to do so during integration. The formulas for con-verting hyperbolic functions are of course analogous to the ones above.

    The tables of integrands and methods in the previous sections was chosen suchthat once a rule is applied, it will eventually lead to an elementary expression forthe integral. Thus, there is no problem with non-terminating rewrite sequences ortrouble caused by choosing the wrong rule when several apply. However, many ofthe substitutions can be helpful even when this cannot be guaranteed, if treated

    with some care. For example, the substitution t = n

    ax+bcx+d transforms

    f(x, n

    ax + b

    cx + d)dx =

    f(

    dtn ba ctn , t)

    dx

    dtdt

    Although it is not certain that the latter is an easier problem, it will often be thecase, so it makes sense to try this transformation even when f is not a rationalfunction.

    It is also possible to let the users define their own functions and integrationrules, in which case they could be applied last to avoid any interference with thebuilt-in rules.

    8

  • 8/8/2019 Calculus Hmmt

    17/94

    2.3. USES FOR HEURISTIC ALGORITHMS

    2.3 Uses for heuristic algorithms

    There are several reasons for using a heuristic, rule-based method despite the exis-tence of definitive decision procedures like Rischs algorithm.

    1. Heuristic methods are often more efficient for simple problems. To quoteGeddes et al. [12], the heuristic methods solve a trivial problem in trivialtime, a highly desirable feature. For this reason, heuristics are actually triedin computer algebra systems such as Maple prior to using an algorithmicapproach.

    2. The Risch algorithm will usually use only exponentials and logarithms to ex-press the result, even when it could be expressed in a simpler way for exampleby using inverse trigonometric functions. It is possible to convert the complexexponentials and logarithms to trigonometric functions, or to extend Rischsalgorithm to work directly with these functions but doing so would complicatealready complicated code. Heuristic methods, on the other hand, will usuallyexpress the integral in a similar way to what a human would do.

    3. Heuristics are considerably easier to understand and implement, requiringnothing beyond introductory calculus. Rischs algorithm on the other handrequires a great deal of abstract algebra and algebraic algorithms. As a con-sequence, it is simple to extend the heuristic by adding new rules. ExtendingRischs algorithm to include new classes of functions requires significant de-

    velopments of the underlying mathematics. Such extensions are at the frontof current research.

    There is one additional reason for using heuristic rules rather than Rischs al-gorithm, and that is the ability to generate an understandable derivation of theresult. It is relatively simple to modify a rule-based integration procedure to printthe rules it uses to compute the integral, and to include some additional explana-tions if necessary. By design, the heuristic will try the same rules as a human, sothe proof will look similar to what a human would produce.

    In theory it is also possible to modify Rischs algorithm to generate a proof,but the proof will not be comprehensible to most humans as it relies heavily on

    Liouvilles theorem.

    9

  • 8/8/2019 Calculus Hmmt

    18/94

  • 8/8/2019 Calculus Hmmt

    19/94

    Chapter 3

    Integration of rational functions

    It turns out that integrating rational functions are of fundamental importance to anyintegration algorithm. Not only are the rational functions a common and interestingclass of functions, but many other types of integrals can also be reduced to integralsof rational functions by applying suitable substitutions. This was the idea behindmany of the rules in the previous chapter.

    3.1 The naive method

    We begin by showing that the naive method taught in calculus courses is correct,and at least in theory capable of integrating any rational function p

    q.

    By the fundamental theorem of algebra we know that the denominator q canbe written as a product of linear factors

    ki=1 q

    eii . As appendix A shows, we can

    use partial fraction decomposition to express pq

    ask

    i=1

    eij=1

    rij

    qji

    , where all rij are

    constants. Without loss of generality, we can assume that the factors are monic.This allows us to express the integral as follows

    rij

    qji=

    rij log(qi) if j = 1,rij

    (1j)qj1i

    otherwise.

    This proves the following simple theorem which can be interpreted as a specialcase of Liouvilles theorem (4.16).

    Theorem 3.1 Let f Q(x). Thenf is elementary andf = v0 +

    ni=1

    ci log vi

    where all ci Q, and all vi Q(x), Here Q denotes the algebraic closure of therational numbers, i.e. the algebraic numbers.

    From a computational point of view, this method is not satisfactory. First,although the factorization exists, we cannot in general represent the factors of a

    11

  • 8/8/2019 Calculus Hmmt

    20/94

    CHAPTER 3. INTEGRATION OF RATIONAL FUNCTIONS

    5th or higher degree polynomial using nested radicals. (This is the well-known

    Abel-Ruffini theorem). Secondly, even when we can represent the factors, it isstill difficult to actually compute the factorization. In other words, we should tryto avoid factoring as long as possible. The following sections will discuss bettermethods for integrating rational functions.

    3.2 Hermites method for determining the rational part

    If we are to integrate a rational function we can use the division algorithm to splitthe integrand into a polynomial and a proper fraction. The polynomial part istrivial to integrate so we will concentrate on the fraction.

    After performing a square-free factorization (cf. appendix B) of the denominatorfollowed by a partial fraction decomposition, the fractions will be of the form qi/r

    ii

    where qi and ri are polynomials in x, deg(qi) < deg(ri) and ri is square-free.We integrate each such fraction in turn. To increase readability, we omit the

    subscript in the remainder of the section, letting r denote one of the square-free riand q denote the corresponding qi. The condition that r is square-free implies thatgcd(r, r) = 1, so the extended euclidean algorithm computes polynomials a and b,such that

    ar + br = 1

    We can use this to reduce the degree of the denominator, as shown in the following

    computation

    q

    ri=

    q(ar + br)

    ri=

    qa

    ri1+

    qbr

    ri

    =

    qa

    ri1 qb

    (i 1)ri1 +

    (qb)

    (i 1)ri1

    = qb(i 1)ri1 +

    (i 1)qa + (qb)

    (i 1)ri1

    which holds for any i > 1. When i = 1 we use Rothstein-Tragers method describedin the next section.

    3.3 Rothstein - Tragers method for the logarithmic part

    In the previous section we removed any repeated factors from the denominator, sohere we assume that the integrand q/r is a proper fraction where r is square-freeand monic. Let the factorization of r be

    r =n

    i=1

    (x ai)

    12

  • 8/8/2019 Calculus Hmmt

    21/94

    3.3. ROTHSTEIN - TRAGERS METHOD FOR THE LOGARITHMIC PART

    where all ai are different. As we saw in section 3.1, this integral is just a sum of

    logarithms of the factors of r, i.e.q

    r=

    ni=1

    ci log(x ai)

    Notice that in some cases it may not be necessary to factor the denominatorcompletely. For example,

    2x/(x2 2)dx = log(x2 2) can be computed and

    expressed without introducing the extraneous algebraic extension

    2 by factoringx22 = (x+2)(x2). The problem of expressing an integral using the minimalnumber of algebraic extensions was solved independently by Rothstein and Trager.

    Let

    q

    r=

    ni=1

    ci log(vi)

    be the expression of the integral using the fewest possible algebraic extensions. Thevi are square-free and we can also assume that they are relatively prime withoutintroducing new algebraic extensions, since

    c1 logpq + c2 log qr = c1 logp + (c1 + c2)log q + c2 log r

    Lemma 3.2 Let

    qr

    =

    ni=1 ci log(vi) where r is a monic polynomial and the vi

    are monic, square-free and relatively prime polynomials. Then

    r =n

    j=1

    vj and q =n

    i=1

    civi

    j=i

    vj

    Proof Differentiating and cross-multiplying the denominators gives

    qn

    j=1

    vj = rn

    i=1

    civi

    j=i

    vj

    Notice that vi has no factor in common with vi (since the vi are square-free) and no

    factor in common with

    j=i vj (since they are relatively prime). Hence vj dividesevery term in the sum on the right hand side except the one where i = j, so itcannot be a factor of the sum. Instead, vi must be a factor of r for all i, so

    vi | r.

    Conversely, r is a factor of the right hand side but has no factor in common with q,so r | vi. Since r and all vi are monic, we can conclude that r = vi as desired.The expression for q then follows immediately.

    At this point, it might be a good idea to recall that for all a,b,n

    gcd(a + nb,b) = gcd(a, b)

    13

  • 8/8/2019 Calculus Hmmt

    22/94

    CHAPTER 3. INTEGRATION OF RATIONAL FUNCTIONS

    This theorem is used repeatedly in the following computation.

    gcd(q clr, vk) = gcd(n

    i=1

    civi

    j=i

    vj

    cl n

    i=1

    vi

    j=i

    vj

    , vk)

    = gcd(ckvk

    j=k

    vj clvk

    j=k

    vj , vk)

    = gcd((ck cl) vk

    j=k

    vj , vk)

    =

    gcd(0, vk) = vk if k = l

    1 otherwise

    The last equality uses the fact that vk has no factor in common with either vk orj=k vj , and ck = cl if k = l. Once we know the ci, we can use the computations

    above to obtain the vi by

    gcd(q cir, r) = gcd(q cir,n

    j=1

    vj )

    =n

    j=1

    gcd(q cir, vj )

    = vi

    Notice that greatest common divisors and derivatives are computed using only ra-tional operations, so they do not introduce any new algebraic extensions.To obtain the ci, we observe that they are precisely the numbers such that

    gcd(q cir, r) = 1, or equivalently, numbers such that deg(gcd(q cir, r)) > 0.According to theorem C.7 in the appendix, resx(q cir, r) = 0 if and only ifdeg(gcd(q cir, r)) > 0, so it suffices to compute resx(q cr, r) and find the roots.The degree ofresx(qcr, r) as a polynomial in c can not exceed the degree ofr as apolynomial in x, but factoring the resultant may be easier since it can have repeatedfactors. Repeated factors can be found quickly using the square-free factorizationdescribed in appendix B. This proves the following theorem.

    Theorem 3.3 Let p, q

    Q[x] be relatively prime polynomials such that q is monic

    and square-free. Let S be the set of distinct zeros to resx(q cr, r). Thenp

    q=cS

    c log(gcd(q cr, r))

    is the expression for the integral which uses the fewest possible algebraic extensionsofQ.

    We will finish the section with an example by Tobey of a rational function whosedenominator is difficult to factor while the integral only requires a single algebraicextension of degree 2.

    14

  • 8/8/2019 Calculus Hmmt

    23/94

    3.3. ROTHSTEIN - TRAGERS METHOD FOR THE LOGARITHMIC PART

    Example 3.4

    Compute the integral

    7x13 + 10x8 + 4x7 7x6 4x3 4x2 + 3x + 3

    x14 2x8 2x7 2x4 4x3 x2 + 2x + 1 dx

    In this example,

    q = 7x13 + 10x8 + 4x7 7x6 4x3 4x2 + 3x + 3r = x14 2x8 2x7 2x4 4x3 x2 + 2x + 1

    so

    resx(q cr, r) = 2377439676624535552c14 + 16642077736371748864c13

    45765713775022309376c12

    + 58247272077301121024c11

    23922986746034388992c10 17682207594894983168c9+ 15861980342479323136c8 + 3417569535147769856c7

    3965495085619830784c6 1105137974680936448c5+ 373796667906787328c4 + 227528406551957504c3

    + 44693079858420224c2 + 4063007259856384c + 145107402137728

    = 145107402137728

    4c2 4c 17

    The resultant has only two distinct roots c1 = (1 +

    2)/2 and c2 = (1

    2)/2.

    Computing the greatest common divisors gives

    gcd(q c1r, r) = x7

    2x2 (1 + 2)x 1gcd(q c2r, r) = x7 +

    2x2 (1 2)x 1

    and thus the integral

    q

    rdx =

    (1 +

    2)

    2log(x7

    2x2 (1 +

    2)x 1)

    +(1 2)

    2log(x7 +

    2x2 (1 2)x 1)

    3.3.1 The Lazard - Rioboo - Trager improvement

    Although the Rothstein-Trager algorithm can save us some factoring and does suc-ceed in expressing the integral using a minimal number of algebraic extensions, theimprovement comes at the cost of several gcd computations over algebraic numberfields. As these gcd computations tend to be expensive (both in terms of run-ning time and programming time), we would like some other way of evaluatinggcd(q(x), p(x) q(x)). Such a method was discovered and published in 1990 byLazard and Rioboo [18] who also remarked that the method had been discovered in-dependently (but not published) by Trager while implementing the Rothstein-Trager

    15

  • 8/8/2019 Calculus Hmmt

    24/94

    CHAPTER 3. INTEGRATION OF RATIONAL FUNCTIONS

    algorithm in Axiom. Lazard and Rioboos statement and proof is not entirely clear

    and, according to Mulders [22], the wrong interpretation was used by Geddes et al.[12] and also implemented in Axiom 2.0.

    Theorem 3.5 Let q(x) and r(x) be relatively prime polynomials with degp(x) 0. Then p() F[] and

    degp() =

    n 1 if cn is constant,n otherwise.

    Proof

    p() = n

    i=0cii

    =

    ni=0

    cii + icii1

    =

    n1i=0

    ci + (i + 1)ci+1

    i + cnn

    It is obvious that degp() = n if and only if cn is non-constant. We must showthat cn1 + ncn

    = 0 if cn is constant. Therefore suppose that cn is constant andcn1 + ncn

    = 0. Then (ncn + cn1) = ncn + ncn

    + cn1 = 0 contradicting theassumption that the extension had no new constants.

    Theorem 4.13 LetF() be a differential extension field ofF with the same field ofconstants, where is exponential overF. Let p() F[] be a polynomial of degreen > 0. Then p()

    F[] and degp() = n

    Proof

    p() =

    n

    i=0

    cii

    =

    ni=0

    ci

    i + icii1

    =

    ni=0

    ci + iciu

    i

    shows that p() F[]. We must show that cn + ncnu = 0. But if cn + ncnu = 0,then (cn

    n) = (cn + ncnu) n = 0, so cn

    n is a constant. This contradicts theassumption that the extension had no new constants.

    20

  • 8/8/2019 Calculus Hmmt

    29/94

    4.2. LIOUVILLES THEOREM

    Definition 4.14 A field E is an elementary extension of F if it is a differential

    field extension ofF and there exists a finite tower of fields

    F = E0 E1 . . . Ek1 Ek = E

    such that eachEi = Ei1(i) where i is algebraic, logarithmic or exponential overEi1.

    Definition 4.15 LetE be a differential extension field of F. An element E issaid to be elementary overF if F() is an elementary extension field over F.

    4.2 Liouvilles theorem

    We saw in the chapter on integration of rational functions that if f Q(x), thenf = v0 +

    ni=1 ci log vi where ci are constants in Q and vi Q(x). (As usual,

    F is the algebraic closure of F.) We shall now see how this generalizes to largerdifferential fields.

    Theorem 4.16 (Liouville)LetF be a differential field, and let f F. If f is in an elementary extensionEofF with the same field of constants K, then

    f = v0 +n

    i=1

    ci log vi

    where all ci K, and all vi F

    ProofLet E = F(1, 2, . . . , k) be a field containing the integral. We will use induc-tion on the number of extensions to prove the theorem. The case of no extensions isobvious, since then

    f = v0 where v0 F. We now want to prove that the theorem

    is true for i + 1 extensions, given that it is true for i extensions.Obviously, f F(1), so by the induction assumption

    f = v0(1) +n

    i=0

    ci log vi(1)

    where the v0, v1, . . . , vn are rational functions in 1. What remains is proving thatthe vi are free of 1. To improve readability, we will omit the subscript and denote1 just by . We now have three cases depending on whether is algebraic, atranscendental logarithm or a transcendental exponential.

    4.2.1 Transcendental extensions

    If is transcendental over the field F, then F[] is an euclidean domain and thereforealso a unique factorization domain. This allows us to treat elements ofF[] and F()

    21

  • 8/8/2019 Calculus Hmmt

    30/94

    CHAPTER 4. LIOUVILLES THEOREM

    as polynomials or rational functions in , and to use well known algorithms such as

    the euclidean algorithm and partial fraction decomposition.By using the logarithm rules

    log(f g) = log f + log g

    log(f /g) = log f log gwe can assume that v1, . . . , vn are irreducible polynomials in F[]. Unless vi isindependent of, we can also factor out the leading coefficient, to make the polyno-mial monic. Furthermore, if two of the logarithms are equal, we can rewrite themas a single term by combining the coefficients. Hence we may safely assume thatv1, . . . , vn are all distinct.

    The element v0

    is a rational expression in F(). We can use the euclideanalgorithm to separate v0 into a polynomial part and a proper fraction. After apartial fraction expansion,

    v0 = r0() +k

    i=1

    eij=1

    rij ()

    qi()j

    where r0, rij , qi F[], deg(rij ) < deg(qi) and qi irreducible. Here we can alsoassume that the denominators are monic.

    Since

    f = v0() +n

    i=1 ci log vi(), it follows that

    f = r0

    () +k

    i=1

    ei

    j=1

    rij ()qi()j

    jrij ()qi()

    qi()j+1+

    n

    i=0

    ci

    vi()

    vi()

    The important point of this equation is that the left hand side is free of . Aftermultiplying both sides of this equation by

    d() = lcm(q1()e1+1, . . . , qk()

    ek+1, v1(), . . . , vn())

    we obtain a polynomial equation in F[]

    d()f = r0()d() +

    ki=1

    eij=1

    rij ()

    d()

    qi()j jrij ()qi()

    d()

    qi()j+1

    +

    ni=0

    civ

    i()d()

    vi()(4.1)

    Logarithmic extensions

    If is a transcendental logarithm, then by recalling that qi() is monic and usingtheorem 4.12 we see that deg(qi()

    ) < deg(qi()). Since qi() is irreducible, thismeans that qi()

    and qi() have no common factor.

    For any qi, it is easy to see that all terms in 4.1 exceptekriek ()qi()

    d()

    qi()ek+1

    are

    divisible by qi(), and hence qi() must divideekriek()qi()

    d()

    qi()ek+1

    too. But we have

    22

  • 8/8/2019 Calculus Hmmt

    31/94

    4.2. LIOUVILLES THEOREM

    established that qi() is relatively prime to rij () and qi(), so qi() divides

    d()qi()

    ek+1.

    This is only possible if qi() F.Let us consider the term r0() next. If deg(r0()

    ) > 0 then the right hand sideof equation 4.1 would have a higher degree than the left hand side. This is clearlya contradiction, so deg(r0()

    ) = 0 and by theorem 4.12 either deg(r0()) = 0 ordeg(r0()) = 1 with the coefficient of being a constant. In the latter case, wecan move the -term into the sum

    ni=0 ci log vi since is itself a logarithm and the

    coefficient is constant. Without loss of generality, we assume that r0 is free of .If we insert what we have determined so far into equation 4.1, we arrive at

    fn

    i=1

    vi() = v0

    ni=1

    vi() +n

    i=1

    civi()

    n

    i=1 vi()

    vi()

    where vi() divides all terms exceptvi()

    ni=1

    vi()vi()

    . To divide this term, vi() must

    divide vi(), which is only possible (recall theorem 4.12) if vi is free of .

    This proves that v0, v1, . . . , vn F, as desired.

    Exponential extensions

    Let be a transcendental exponential. As before, we obtain the polynomial equation4.1.

    Just like the logarithmic case, if deg(r0()) > 0 then the right hand side of

    this equation would have a higher degree than the left hand side. We deduce thatdeg(r0()

    ) = 0 and by theorem 4.13 deg(r0()) = 0.Unlike the logarithmic case, it is not easy to see whether qi() is a factor of

    qi(). For this we need an additional lemma:

    Lemma 4.17 For any p() F[], p() | p() if and only if p is of the form f nwith f F.Proof () It is clear that if p is of the form above, f n | (f + nf u) n = (f n).() On the other hand, if p() | p(), then p() = d()(p()). Comparing thedegrees (using theorem 4.13), we see that deg d() = 0. If p is not a monomial, ithas at least two non-zero terms an

    n and amm. These terms satisfy

    annd = (an + nanu

    )n

    ammd = (am + mamu)m

    Eliminating d givesamam

    an

    an= (n m)u

    This can be used to show thatanam

    nm

    =

    anam

    amana2m

    nm + (n m)u an

    amnm

    =

    amam

    an

    an (n m)u

    anam

    nm = 0

    23

  • 8/8/2019 Calculus Hmmt

    32/94

    CHAPTER 4. LIOUVILLES THEOREM

    contradicting the assumption that is a transcendental non-constant.

    Continuing with the exponential case of Liouvilles theorem, we see that qi()

    divides all terms in 4.1 exceptekriek ()qi()

    d()

    qi()ek+1

    . Since ri() is relatively prime to

    qi(), and d() contain no power of qi() greater than qi()ek+1, qi() must divide

    qi() to divide this term. By the lemma above, qi() must be a monomial to

    divide qi(). The assumption that qi() is monic and irreducible then implies that

    qi() = unless qi() F.Observe that when is exponential, we can assume that vi = because log =

    log(exp u) = u + c F. If we insert what we have determined so far into equation4.1, we obtain

    f d() = r0d() +e

    j=1

    r

    j d()j

    jrj d()j+1

    +

    ni=0

    ci vi()d()

    vi()

    = r0d() +e

    j=1

    (rj jrj u)d()j

    +n

    i=0

    civi()

    d()

    vi()

    where

    d() = lcm(e, v1(), . . . , vn()) = e

    ni=1

    vi

    Notice that divides the left hand side and all terms on the right hand side except(reereu

    )d()e

    . This is a contradiction, so no can appear in the rational part. Simi-

    larly, all terms except ci vi()

    d()vi() are divisible by vi(). Again, this is a contradiction,so all vi are free of .

    This proves that v0, v1, . . . , vn F, as desired.

    4.2.2 Algebraic extensions

    Finally, suppose that is algebraic over F, so there exists a polynomial p F[x]such that p() = 0. Now, with algebraic, F[] is no longer isomorphic to theordinary polynomial ring F[t] in the new variable t. It should come as no surprisethat the proof of the algebraic case of Liouvilles theorem is fundamentally differentfrom the transcendental cases above.

    Definition 4.18 Let be algebraic over a field F. The monic polynomial of leastdegree such that p() = 0 is called the minimal polynomial of overF.

    It is not difficult to see that the minimal polynomial is unique. If there weretwo monic polynomials of least degree such that p() = q() = 0, then p(t) q(t)would be a a polynomial of lower degree but still satisfy p() q() = 0.

    Lemma 4.19 Let be algebraic over a fieldF, and let p(t) be the minimal polyno-mial of. ThenF() is isomorphic to F[t]/ p(t), where p(t) is the ideal generatedby p(t).

    24

  • 8/8/2019 Calculus Hmmt

    33/94

    4.2. LIOUVILLES THEOREM

    Proof Define a map : F[t]/

    p(t)

    F(), by ([q(t)]) = q() where [q(t)] is

    the equivalence class of q(t) mod p(t). It is obviously a field homomorphism. It issurjective because im is a field containing both F and , and F() is defined as thesmallest such field. It is injective because q() = r() = q() r() = 0 so isa zero of q(t) r(t). Then p(t) | q(t) r(t) since p(t) is the minimal polynomial of, so [q(t)] = [r(t)].

    Definition 4.20 Let p be the minimal polynomial of . The roots of p (in thealgebraic closure F) are called the conjugates of .

    Definition 4.21 LetF() be an algebraic extension of F and let the conjugates of be

    {0

    , 1

    , . . . , k}

    . We define the norm N : F()

    F and trace T r : F()

    F ofan element v() inF() by

    N(v()) =k

    i=0

    v(i)

    T r(v()) =k

    i=0

    v(i)

    We are now ready to continue with the proof of Liouvilles theorem. By theinduction hypothesis

    f = v0

    () +n

    i=0

    ci

    log vi()

    so

    f = v0() +

    ni=0

    civi()

    vi()

    where it remains to prove that the vi are free of .Let {0, 1, . . . , k} be the set of conjugates of . Since all F(j ) are isomorphic

    to F[t]/ p(t), it follows that

    f = v0(j ) +

    ni=0

    civi(j )

    vi(j )

    for all j. Summing the equations over all conjugates gives

    (k + 1)f =k

    j=0

    v0(j )

    +n

    i=0

    civi(j )

    vi(j )

    =

    =k

    j=0

    v0(j ) +

    ni=0

    civi(j )

    j=i vi(j )kj=0 vi(j )

    =

    = T r(v0()) +

    ni=0

    ciN(vi())

    N(vi())

    25

  • 8/8/2019 Calculus Hmmt

    34/94

    CHAPTER 4. LIOUVILLES THEOREM

    so f = T r(v0())

    k + 1+

    ni=0

    cik + 1

    log N(vi())

    is another expression for the integral which does not use any algebraic extensionsofF. This concludes the proof of Liouvilles theorem.

    4.2.3 Strong form of Liouvilles theorem

    The proof of Liouvilles theorem in the previous section depended on the assumptionthat the constant subfield of E containing the integral was equal to the constantsubfield ofF. It is however possible to remove this restriction on the constants toobtain the following theorem.

    Theorem 4.22 LetF be a differential field containing the integrand f and letK bethe subfield of constants inF. If

    f is in an elementary extensionE ofF, then

    f = v0 +

    ni=1

    ci log vi

    for some v0 F, ci K, and vi F(c1, c2, . . . , cn).

    For a proof, see for example [4].

    4.3 Examples

    We will now give an example of how Liouvilles theorem can be used to prove thata function defined as an integral is non-elementary.

    Example 4.23 The function

    ex2

    dx is not elementary.

    Proof The integrand = ex2

    is in the field Q(x, ). Suppose there is an elementaryexpression for

    . Then according to Liouvilles theorem

    =p

    q+

    n

    i=1

    ci log(vi)

    where p, q and all vi are polynomials in Q(x)[]. Differentiating and cross-multiplyingthe denominators gives

    q2

    j

    vj = (pq pq)

    j

    vj + q2

    ni=1

    civi

    j=i

    vj

    where we can assume without loss of generality that all vi are distinct and relativelyprime. Since log = x2 Q(x), we can also assume that no vi is divisible by .Observe that for any k, all terms above except ckv

    k

    j=k vj are divisible by vk. To

    26

  • 8/8/2019 Calculus Hmmt

    35/94

    4.3. EXAMPLES

    divide this last term we would require that vk divides vk which according to lemma

    4.17 is only possible if vk = f m. By the assumption, this is not the case, so all viare free of .

    Next, observe that q2 must divide (pq pq)j vj which implies that q2 divides(pq pq). As before, q | q implies that q = f m for some f Q(x), k N. Hence,the quotient p/q can be written as a linear combination of (positive and negative)powers of , viz.

    p =p

    q=

    degpi=0

    pif

    ideg q =degpdeg q

    i=deg q

    pii

    p

    =degpdeg q

    i=deg q pi

    i

    =

    degpdeg q

    i=deg q (p

    i + 2ixpi)

    i

    Replacing p/q by p in the expression for the integral gives

    = p +n

    i=1

    civivi

    from which one can immediately see that p and thus p must be a polynomial inQ(x)[] of degree one. To satisfy the equation

    = p0 + (p1 + 2xp1) +

    n

    i=1

    civi

    vi

    p1 must be a solution to the differential equation p1 + 2xp1 = 1 in Q(x) and the

    other terms must cancel.Let s(x)/t(x) be a solution to y + 2xy = 1 with s, t Q[x]. After cross-

    multiplying the denominators to get s(x)t(x) s(x)t(x) + 2xs(x)t(x) = t(x)2, wesee that t(x) must divide t(x). This is impossible unless t is a constant, in whichcase we should be looking for solutions in Q[x] to y + 2xy = 1. It is, however,clear that the equation can not have polynomial solutions since deg(y + 2xy) =1 + deg(y) > deg(1).

    27

  • 8/8/2019 Calculus Hmmt

    36/94

  • 8/8/2019 Calculus Hmmt

    37/94

    Chapter 5

    Rischs algorithm

    This chapter will describe the proof of the following theorem:

    Theorem 5.1 (Risch, 1969)Letf be a function inF = K(x, 1, . . . , n) where K is the field of constants inF andeach i is a transcendental logarithm or exponential over K(x, 1, . . . , i1). Thenthere exists an algorithm which either computes

    f as an elementary function over

    F if it exists, or proves that

    f is not elementary overF

    The proof is by induction on n, the number of transcendental extensions. Thebase case of the induction, n = 0, is integration of rational functions discussed

    in chapter 3. Assuming that the theorem holds for the field K(x, 1, . . . , i1), wemust prove that it holds for K(x, 1, . . . , i) too. For brevity, we will drop thesubscript and denote i by just . We now have two cases depending on whether is logarithmic or exponential.

    Although the proofs are more complicated, the integration methods will ulti-mately turn out to be similar to the ones described in chapter 3, with the exceptionthat integration of a polynomial in is non-trivial.

    5.1 Logarithmic extensions

    Let be a logarithm and f F() We can express f as a p +q

    r where p,q,r F[],and deg(q) < deg(r).We begin with a decomposition lemma from Davenport et al. [10].

    Lemma 5.2 If

    f is elementary, then

    p andq

    rare elementary too, so we can

    integrate the polynomial part p, and rational part qr

    separately.

    Proof By Liouvilles principle, if

    f is elementary then

    f = v0 +

    ni=1

    ci log vi

    29

  • 8/8/2019 Calculus Hmmt

    38/94

    CHAPTER 5. RISCHS ALGORITHM

    so

    f = p + qr

    = v0 +n

    i=1

    ci vi

    vi=

    p + qr

    +

    ni=1

    ci vi

    vi

    Some of the vi are polynomials dependent on and some are independent of .Well assume that the ones independent of are v1, v2, . . . , vk. Using lemma 4.12,we see that the derivative of the polynomial p is a polynomial, and the derivativeof the proper fraction q/r is a proper fraction. Recall that the decomposition intoa polynomial part and a proper fraction is unique and apply this to the equationabove.

    p = p +k

    i=1

    civivi

    qr

    =

    qr

    +n

    i=k+1

    civivi

    Integrating these equations givesp = p +

    ki=1

    ci log vi

    q

    r=

    q

    r+

    ni=k+1

    ci log vi

    so both integrals are elementary as well.

    5.1.1 Polynomial part

    Let p =

    aii and p =

    bi

    i. The decomposition lemma above implies that

    deg(p)i=0

    aii =

    deg(p)i=0

    bi + (i + 1)bi+1

    i +n

    i=k+1

    civivi

    Comparing the degrees, we see that deg(p) = deg(p) unless deg(p) = deg(p) + 1and the leading coefficient in deg(p) is a constant. Equating the coefficients givesai = b

    i + (i + 1)bi+1

    for all i > 0, so

    bi =

    ai (i + 1)bi+1

    + di

    where di is a constant. The value of the constant di+1 is determined by the conditionthat

    bi =

    ai (i + 1)bi+1

    + di =

    =

    ai (i + 1)(bi+1 di+1 + di+1)

    + di =

    =

    ai (i + 1)(bi+1 di+1)

    (i + 1)di+1 + di30

  • 8/8/2019 Calculus Hmmt

    39/94

    5.1. LOGARITHMIC EXTENSIONS

    should be free of . Notice that bi+1

    di+1 is precisely the integral appearing in the

    equation for bi+1. We can thus compute the bi starting with the leading coefficientand working our way down to b1. When we equate the coefficients of terms of degreezero, we get

    a0 = b0 + b1

    +n

    i=k

    civivi

    so

    b0 +n

    i=k

    ci log vi =

    a0 b1

    + d0

    where the last constant d0, which is not determined by any condition, is the constantof integration.

    If some integral in the computation of the bi involves extensions ofF other than, then the integral of the polynomial part cannot be elementary.

    5.1.2 Rational part

    The previous section treated the polynomial part of the integrand, so in this sectionwe assume that the integrand is a proper fraction q/r where q and r are polynomialsin . After performing a square-free factorization of the denominator, followed by apartial fraction decomposition, the fractions will be of the form qi/r

    ii where qi and

    ri are polynomials, deg(qi) < deg(ri) and the ri are square-free. We integrate eachsuch fraction in turn.

    Lemma 5.3 Letr F[] be a monic square-free polynomial. Then gcd(r, ddx

    r) = 1.

    Proof Let r have the factorization

    r =n

    i=0

    ( ai)

    in F[] where all ai are distinct. Then the derivative of r with respect to x is

    r =n

    i=0

    ( ai)i=j

    ( aj )

    All terms on the right hand side except one are divisible by aj , but as thelast term is not divisible by aj , the left hand side of the equation cannot beeither. Thus the only possible factors of r does not divide r, and we can deducethat gcd(r, r) = 1.

    Corollary 5.4 Letr F[] be a monic square-free polynomial, i.e. under the sameconditions as the lemma above, then there exist polynomials a, b F[] such thatar + br = 1.

    31

  • 8/8/2019 Calculus Hmmt

    40/94

    CHAPTER 5. RISCHS ALGORITHM

    Proof F[] is an euclidean domain, so the extended euclidean algorithm gives a

    and b as desired.

    Returning to the problem of finding the rational part, we get

    q

    rk=

    q(ar + br)

    rk=

    qa

    rk1+

    qbr

    rk

    =

    qa

    rk1 qb

    (k 1)rk1 +

    (qb)

    (k 1)rk1

    = qb(k 1)rk1 +

    (k 1)qa + (qb)

    (k 1)rk1

    This reduces the degree of the denominator, so we can repeat this step until k = 1.As we shall see, we have fully determined the rational part of the integral when thedenominator no longer has any repeated factors.

    5.1.3 Logarithmic part

    In the previous section we removed any repeated factors from the denominator, sohere we assume that the integrand is q/r where r is square-free and monic.

    Lemma 5.5 Let qr

    be a proper fraction inF() such that the denominator is square- free. Without loss of generality we can assume thatr is monic, so it has the fac-torization r = ni=1(

    ai) (in F[]) where all ai are different. Then if qr iselementary,

    q

    r=

    ni=1

    ci log( ai)

    Proof From Liouvilles theorem we know thatq

    r=

    q

    r+

    ni=1

    ci log(vi)

    or equivalentlyq

    r=

    qr rqr2

    +n

    i=1

    civiv

    i

    As we did in the proof of Liouvilles theorem, we can assume that the vi are distinct,irreducible, monic polynomials, so after cross-multiplication we get the polynomialequation

    qr2j

    vj = (qr rq)r

    j

    vj +n

    i=1

    cirr2vi

    j=i

    vj

    As we can see, r2 divides all terms except (qr rq)rj vj . The polynomial rdoes not divide qr rq since it does not divide r and is relatively prime to q.Furthermore, it can only divide

    j vj once, as all vi are irreducible and distinct.

    32

  • 8/8/2019 Calculus Hmmt

    41/94

    5.2. EXPONENTIAL EXTENSIONS

    Since r is square-free by assumption, r can divide r at most once, so it must be

    the case that r | j vj and r | r. But this means that r3 divides all terms except(qr rq)rj vj and since r can divide j vj only once, r2 must divide r. This isa contradiction, so there cannot be any proper rational part. Thus

    q

    r=

    ni=1

    ci log(vi)

    q

    r=

    ni=1

    civivi

    and

    qj

    vj = rn

    i=1civ

    i

    j=i

    vjSince every factor of r divides the right hand side, it must divide some vi on theleft hand side too. The vi are irreducible, so every factor of r must in fact be equalto some vi. Conversely, every vi divides all terms in the sum except civ

    i

    j=i vj , so

    it must divide r instead. We can conclude that the vi are precisely the factors of r.

    If we cancel r =

    j vj from the last equation in the proof, we obtain

    q =n

    i=1

    ci(

    ai)

    j=i

    (

    aj )

    which we can use to identify the ci with appropriate coefficients in q. When deter-mining the ci, we should remember that they must be constants if the integral iselementary.

    The problem with this approach is that it requires a complete factorization ofr. Just like the case with rational functions in chapter 3, we can use the Rothstein-Trager method or the Lazard-Rioboo-Trager method to compute the integral usingthe minimal number of algebraic extensions.

    Example 5.6 The logarithmic integral

    1log x dx is not elementary.

    Proof Let denote log x and notice that the integrand 1 is a proper fraction withsquare-free denominator. It follows from the previous lemma that if the integral iselementary, it must be of the form c log . However, (c log ) = c 1

    x= 1

    for every

    constant c, so the integral can not be elementary.

    5.2 Exponential extensions

    If is exponential rather than logarithmic, the only major difference is that thepolynomial part is more complicated to integrate. For reasons that will become

    33

  • 8/8/2019 Calculus Hmmt

    42/94

    CHAPTER 5. RISCHS ALGORITHM

    clear in the proofs, we express the integrand f

    F() as p + q

    rwhere p

    F[, 1],

    q, r F[], deg(q) < deg(r) and does not divide r. The effect of this representationis that we will handle negative powers of in the polynomial part. We will again usea decomposition lemma, similar to the one from Davenport et al. [10], to integratethe p and q

    rseparately.

    Lemma 5.7 If

    f is elementary, then

    p andq

    rare elementary too, so we can

    integrate the polynomial part p and rational part qr

    separately.

    Proof By Liouvilles principle, if

    f is elementary then

    f = v0 +

    ni=1 ci log vi

    so

    f = p +q

    r= v0 +

    ni=1

    civivi

    =

    p +

    q

    r

    +

    ni=1

    civivi

    where p+ qr

    is an expression for v0 such that p F[, 1], q, r F[], deg(q) < deg(r)and does not divide r.

    Some of the vi in the logarithms are polynomials that depend on and someare independent of . Assume without loss of generality that v1, v2, . . . , vk areindependent of , and that vk+1, vk+2, . . . , vn are monic and not divisible by .

    Unlike the logarithmic case, deg(vi) = deg(vi), sov

    ivi is not a proper fraction. Toremedy the situation, notice that

    vivi

    niu = vi niuvi

    vi

    is a proper fraction if ni is the degree of vi and u is the inner derivative of . Thus

    p +q

    r=

    p +

    q

    r

    +

    ki=1

    civivi

    +n

    i=k+1

    civi niuvi

    vi+

    ni=k+1

    ciniu

    Using lemma 4.13, one can see that the derivative of p is a polynomial in F[, 1],

    and the derivative of q/r is a proper fraction such that does not divide the de-nominator. Identifying polynomial parts (in F[, 1]) and proper fractions withdenominators not divisible by gives

    p = p +k

    i=1

    civivi

    +n

    i=k+1

    ciniu

    q

    r=

    q

    r

    +

    ni=k+1

    civi niuvi

    vi

    34

  • 8/8/2019 Calculus Hmmt

    43/94

    5.2. EXPONENTIAL EXTENSIONS

    Integrating these equations gives

    p = p +

    ki=1

    ci log vi +n

    i=k+1

    ciniu

    q

    r=

    q

    r+

    ni=k+1

    ci(log vi niu)

    so both these integrals are elementary as well.

    5.2.1 Polynomial part

    Let p =

    aii and p =

    bii where the index i may take on both positive andnegative values. Equating terms of the same degree in the decomposition lemmaabove gives

    a0 = b0 +

    ki=1

    civivi

    +n

    i=k+1

    ciniu

    aii =

    bi

    i

    = (bi + ibiu)i if i = 0

    It is easy to integrate the first equation to get

    b0 =

    a0 k

    i=1

    ci log vi n

    i=k+1

    ciniu

    where the vi and ci (for 1 i k) are to be chosen in such a way as to cancel anylogarithmic extension in

    a0.

    To compute the coefficients bi, we have to solve differential equations of the form

    bi + iubi = ai

    known as Rischs differential equation. The problem of solving Rischs differentialequation will be discussed further in chapter 6.

    5.2.2 Rational part

    We now turn to the problem of integrating a proper fraction q/r where q and r arepolynomials in with deg(q) < deg(r). Like before, the idea is to use Hermitesreduction to simplify the integrand, but to do so we need the denominator to satisfygcd(r, r) = 1. When the denominator was a polynomial in either x or a logarithm, it was sufficient to make the denominator square-free. Unfortunately, it is not assimple when is an exponential. For example, this fails for the simple polynomial, as gcd(, ) = gcd(, u) = . The way to avoid this problem is to not only doa square-free factorization, but also factor out the largest power of appearing in

    35

  • 8/8/2019 Calculus Hmmt

    44/94

    CHAPTER 5. RISCHS ALGORITHM

    the denominator. After this factorization and a partial fraction decomposition, the

    fractions will be of the form qi/rii where qi and ri are polynomials, deg(qi) < deg(ri)and ri is monic, square-free and either equal to , or not divisible by .

    Lemma 5.8 Let r F[] be a monic, square-free polynomial of positive degree,such that r. Then

    gcd(r, r) = 1

    Proof Let the factorization of r in F[] be

    r =n

    i=0

    ( ai)

    where all ai are distinct and non-zero. Then the derivative of r with respect to x is

    r =n

    i=0

    ( ai)i=j

    ( aj )

    All terms on the right hand side, except the one where i = j, are divisible by aj .The only way this last term term can be divisible by aj is if aj | ajAccording to lemma 4.17, this can only happen if aj is zero which contradicts theassumption. Since none of the factors ofr divide r, we can deduce that gcd(r, r) =1.

    Corollary 5.9 Let r F[] be a monic square-free polynomial not divisible by ,i.e. under the same conditions as the lemma above, then there exist polynomialsa, b F[] such that ar + br = 1.

    Proof F[] is an euclidean domain, so the extended euclidean algorithm gives aand b as desired.

    Returning to the problem of finding the rational part, we get

    q

    rk=

    q(ar + br)rk

    =

    qark1

    +

    qbrrk

    =

    qa

    rk1 qb

    (k 1)rk1 +

    (qb)

    (k 1)rk1

    = qb(k 1)rk1 +

    (k 1)qa + (qb)

    (k 1)rk1

    This reduces the degree of the denominator, so we can repeat this step until k = 1.As we shall see, we have fully determined the rational part of the integral when thedenominator no longer has any repeated factors.

    36

  • 8/8/2019 Calculus Hmmt

    45/94

    5.2. EXPONENTIAL EXTENSIONS

    5.2.3 Logarithmic part

    In the previous section we removed any repeated factors from the denominator, sohere we assume that the integrand is q/r where r is square-free and monic.

    Lemma 5.10 Let qr

    be a proper fraction in F() such that the denominator issquare-free, and not divisible by . Without loss of generality we can assume thatr is monic, so it has the factorization r =

    ni=1( ai) (in F[]) where all ai are

    different. Then ifq

    ris elementary,

    q

    r=

    ni=1

    ci log( ai)

    Proof From Liouvilles theorem we know thatq

    r=

    q

    r+

    ni=1

    ci log(vi)

    or equivalentlyq

    r=

    qr rqr2

    +n

    i=1

    civivi

    As we did in the proof of Liouvilles theorem, we can assume that the vi are distinct,irreducible, monic polynomials, so after cross-multiplication we get the polynomialequation

    qr2j

    vj = (qr rq)r

    j

    vj +n

    i=1

    cirr2vi

    j=i

    vj

    As we can see, r2 divides all terms except (qr rq)rj vj . The polynomial r doesnot divide qr rq since it does not divide either of r and q (recall lemma 4.17).Furthermore, it can only divide

    j vj once, as all vi are irreducible and distinct.

    Since r is square-free by assumption, r can divide r at most once, so it must bethe case that r | j vj and r | r. But this means that r3 divides all terms except(qr rq)rj vj and since r can divide j vj only once, r2 must divide r. Thiscontradicts the assumption that r is square-free, so there cannot be any proper

    rational part. Thus q

    r=

    ni=1

    ci log(vi)

    q

    r=

    ni=1

    civivi

    and

    q

    j

    vj = rn

    i=1

    civi

    j=i

    vj

    37

  • 8/8/2019 Calculus Hmmt

    46/94

    CHAPTER 5. RISCHS ALGORITHM

    Since every factor of r divides the right hand side, it must divide some vi on the

    left hand side too. The vi are irreducible, so every factor of r must in fact be equalto some vi. Conversely, every vi divides all terms in the sum except civ

    i

    j=i vj , so

    it must divide r instead. We can conclude that the vi are precisely the factors of r.

    Just as for the logarithmic extensions, we can obtain the coefficients ci by solvingthe linear system

    q =n

    i=1

    ci( ai)

    j=i

    ( aj )

    but using this approach requires the full factorization of r. As before, we can use

    the Rothstein-Trager method or the Lazard-Rioboo-Trager method to avoid thisproblem.

    38

  • 8/8/2019 Calculus Hmmt

    47/94

    Chapter 6

    The Risch differential equation

    The previous chapter reduced the problem of integrating a polynomial of an ex-ponential to solving a certain differential equation known as the Risch differentialequation. The goal of this chapter will be to solve that equation, i.e. find a solutiony F() to

    y + f y = g

    if one exists. The description given here is the one of Bronstein [3, 4], who gave adirect formula for the denominator of y.

    6.1 Canonical representation

    Definition 6.1 LetF be a differential field and transcendental over F such that F[]. A polynomial p F[] is called normal if gcd(p,p) = 1, and special ifgcd(p,p) = p.

    Theorem 6.2 Let be transcendental overF and p F[].1. If is logarithmic, then p normal p square-free.2. If is exponential, then p normal p square-free and p.

    Proof This is an immediate consequence of lemma 4.12 and 4.13.

    Definition 6.3 Let F be the set of elements in F() whose denominators arespecial, i.e. F[] if is a logarithm, andF[, 1] if is exponential.

    Definition 6.4 We define the canonical representation of f as a quotient p/q withp F , q F[], such that

    1. p and q are relatively prime

    2. q is monic

    39

  • 8/8/2019 Calculus Hmmt

    48/94

    CHAPTER 6. THE RISCH DIFFERENTIAL EQUATION

    3. all irreducible factors of q are normal

    The first two conditions in definition 6.4 are the usual conditions on a canonicalrepresentation of a fraction. The third condition means precisely that q if isexponential.

    Definition 6.5 An element f F() is weakly normalized with respect to if

    f = v0 +n

    i=1

    ci log vi

    for some v0 F(), v1 . . . vn F[] and constants ci Z+.

    Lemma 6.6 Letf, g F(). Iff is elementary overF(), there exists f , g F()with f weakly normalized, such that

    y + f y = g z + f z = gwhere z = py for some p F[].

    Proof We are done if f already is weakly normalized. According to Liouvillestheorem,

    f = v0 +n

    i=1

    ci log vi

    where v0 F(), v1 . . . vn F[]. The only way f can fail to be weakly normalizedis when some of the constants are positive integers. Suppose that c1 . . . ck are thepositive integer coefficients and let

    p =k

    i=1

    vcii

    f = f p

    p

    g = pg

    Then

    z + f z = py + py + (f p

    p)py = p(y + f y) = g

    where f is weakly normalized since

    f =

    f logp = v0 +

    ni=1

    ci log vi k

    i=1

    ci log vi = v0 +n

    i=k+1

    ci log vi

    and none of the coefficients ck+1 . . . cn is a positive integer.

    40

  • 8/8/2019 Calculus Hmmt

    49/94

    6.2. THE DENOMINATOR

    6.2 The denominator

    This section will give a formula for the denominator of y and a new differentialequation aq + bq = c for the numerator of y.

    Definition 6.7 Let F be a field and p F[] be irreducible. Any element f F()\{0} can be written uniquely as

    f = pnq

    r

    where n Z, p q, p r, gcd(q, r) = 1 and r monic. We define a p-adic valuationp of f by

    p(f) = n

    Lemma 6.8 Let p be irreducible inF[], a, b F[] and f, g F().

    1. p(f g) = p(f) + p(g)

    2. p(f + g) min(p(f), p(g)) with equality if p(f) = p(g)

    3. p(gcd(f, g)) = min(p(f), p(g))

    4. IfF has characteristic 0 and p(f) = 0, then p( dfd ) = p(f) 1

    Proof The proofs are straightforward.

    1. Let f and g have the canonical representations

    f = pnfqfrf

    and pngqgrg

    f g = pnfqfrf

    pngqgrg

    = pnf+ngqfqgrfrg

    where qfqg and rfrg are relatively prime to p, so p(f g) = p(f) + p(g).

    2. Without loss of generality we can assume that min(p(f), p(g)) = p(f).Then

    f + g = pnfqfrf

    + pngqgrg

    = pnfqfrg + rfqgp

    ngnf

    rfrg

    and rfrg are relatively prime to p. If ng = nf, then qfrg + rfqgpngnf isalso relatively prime to p, but in general it could be divisible by p. Hencep(f + g) min(p(f), p(g)).

    3. Iff and g are polynomials, gcd(f, g) = gcd(pnfqf, pngqg) = p

    min(nf,ng) gcd(qf, qg)so p(gcd(f, g)) = min(p(f), p(g)).

    41

  • 8/8/2019 Calculus Hmmt

    50/94

    CHAPTER 6. THE RISCH DIFFERENTIAL EQUATION

    4. Let denote differentiation with respect to . If f = pnq/r and n

    = 0, then

    df

    d= npn1(p)

    q

    r+ pn

    (q)r qrr2

    = pn1n(p)qr + p(q)r pqr

    r2

    where both numerator and denominator are relatively prime to p. Hencep(

    dfd

    ) = p(f) 1.

    Lemma 6.9 Let p be a normal irreducible polynomial in F[]. If f is weakly nor-malized with respect to and p(y) < 0 then

    p(y + f y) = p(y) + min(

    1, p(f))

    Proof Express y as pnq/r where p does not divide q or r. The derivative y is

    y = pn1npqr + pqr + pqr

    r2

    where p does not divide the denominator r2. Furthermore, p cannot divide thenumerator npqr + pqr + pqr since n = 0, p qr and we assume that p is normal,so p p. We can conclude that p(y

    ) = p(y) 1.If p(f) = 1, then p(y) = p(f y) so

    p(y + f y) = min(p(y

    ), p(f y)) = min(p(y) 1, p(f) + p(y)) =

    = p(y) + min(1, p(f))as desired.

    On the other hand, if p(f) = 1 we let f = p1s/t, so

    y + f y = pn1npqr + pqr + pqr

    r2+ pn1

    qs

    rt= pn1

    npqrt + pqrt + pqrt + qrs

    r2t

    Clearly p does not divide the denominator and to divide the numerator it wouldhave to divide npt + s. Let u F[] be such that npt + s = pu. Then

    f =

    p1

    s

    t=

    p1

    pu nptt

    =

    u

    t n

    p

    p=

    u

    t n log(p)

    would have logarithmic parts with positive integer coefficients, contradicting theassumption that f is weakly normalized.

    Theorem 6.10 (Bronstein)Let y be the solution of y + f y = g in F(), where f is weakly normalized withrespect to . Let the canonical representations of f, g and y be

    f =A

    D, g =

    B

    Eand y =

    Q

    T

    and let G = gcd(D, E). Then

    42

  • 8/8/2019 Calculus Hmmt

    51/94

    6.2. THE DENOMINATOR

    1. The denominator of y is

    T =gcd

    E, dEd

    gcd

    G, dG

    d

    2. If y + f y = g has a solution in F(), then E | DT2 and the numerator Q

    satisfies the equation

    DT Q + (AT DT)Q = BDT2

    E

    Proof

    1. We want to show that Q = T y

    F

    by showing that p(Q)

    0 for any

    normal irreducible p F[]. If p(y) 0, then p(Q) = p(T) + p(y) 0 andwe are done. Otherwise p(y) < 0 and we have two cases depending on thesign of p(f). Notice that p(g) = p(y

    + f y) = p(y) + min(1, p(f)) < 0,so p(E) = p(g) > 0.If p(f) 0, then p(G) = p(gcd(D, E)) = min(p(D), p(E))) = p(D) = 0so

    p(T) = p(gcd(E,dE

    d)) p(gcd(G, dG

    d)) = p(gcd(E,

    dE

    d)) = p(E) 1

    p(Q) = p(T) + p(y) = p(E) 1 + p(y) = p(g) 1 + p(g) + 1 = 0On the other hand if p(f) < 0, then p(G) = min(p(D), p(E)) = p(D)

    since p(E) = p(g) = p(y + f y) = p(y) p(f) = p(y) + p(D) >p(D). In this case,

    p(Q) = p(T) + p(y) = (p(E) 1) (p(G) 1) + p(g) p(f) == p(g) + p(f) + p(g) p(f) = 0

    We also want to show that T is the least possible denominator, or in otherwords, that yT/p F for any normal p dividing T. We have already estab-lished that p(yT) = 0 when p(y) < 0 which would imply that p(yT/p) =1. Now suppose that p(y) 0. Since p divides T it must divide E too,so min(p(y

    ), p(f y)) = p(y + f y) = p(g) = p(E) < 0. p(y) can-

    not be negative if p(y) 0, so it must be that p(f y) = p(f) + p(y) =p(g). But we also know that p(T) = (p(E) 1) (p(G) 1) = p(E) min(p(D), p(E)) > 0, so p(g) = p(E) > p(D) = p(f). Adding thetwo expressions p(f) + p(y) = p(g) and p(f) < p(g) gives p(y) < 0contradicting our assumption.

    2. Recall that Q = T y, A = f D and g = B/E.

    DT Q + (AT DT)Q = DT(Ty + T y) + (f DT DT)T y =

    = DT(T y + T f y) = DT2g =BDT2

    E

    43

  • 8/8/2019 Calculus Hmmt

    52/94

    CHAPTER 6. THE RISCH DIFFERENTIAL EQUATION

    Since DT Q+(AT

    DT)Q

    F

    , it follows that BDT2/E

    F

    . If = 1

    or is logarithmic, then F = F[] and gcd(B, E) = 1, so E must divideDT2. If is exponential, there is an integer n such that nBDT2 F[] andgcd(, E) = gcd(B, E) = 1, so E must divide DT2.

    If = 1 or is logarithmic over F, then F = F[], so all the coefficients aswell as the solution Q F[]. If is exponential over F, then F = F[, 1], sothe solution Q is of the form q/m for some q F[]. We have to find m and q.Notice that DT F[]. If k | DT, we can divide all three coefficients by k, sofrom now on we assume that DT.

    Theorem 6.11 Let = exp(u) be exponential overF and letm be a positive integersuch that q = Qm F[]. Then there are a,b,c F[] such that

    aq + bq = c

    Proof Choose a = DT, b = AT DT muDT, c = mBDT2/Eaq + bq = DT(mumQ + mQ) + (AT DT muDT)mQ =

    =

    muDT Q + DT Q + (AT DT)Q muDT Q m = BDT2E

    m = c

    The coefficients belong to F

    , but can be put in F[] by multiplying all of them

    by a suitable power of .

    While it is clear that there exists an m such that q = Qm F[], we have yetto describe how to find it.

    Lemma 6.12 Let = exp(u) be exponential overF and let k,l ,m be the smallestpossible natural numbers such that q = mQ, a = DT, b = k(AT DT) and c =lBDT2/E belong to F[]. Thenm = lk unless bothk = 0 andb0

    a0= mulog(f)

    for some f F and m Z+.

    Proof The equation DT Q + (AT DT)Q = BDT2/E impliesa(mm1q + mq) + bkqm = (mauq + aq)m + bqmk = cl

    If k > 0, then mk is the lowest exponent on the left hand side, so m + k = l. Ifk = 0, the left hand side is (mauq + aq + bq)m, so m = l (= l k) unless thecoefficient ma0uq0 + a0q0 + b0q0 = 0. This happens precisely if

    b0a0

    = mu q0

    q0

    44

  • 8/8/2019 Calculus Hmmt

    53/94

    6.3. DEGREE BOUNDS FOR THE NUMERATOR

    6.3 Degree bounds for the numerator

    The previous section reduced the Risch differential equation in F() to the equation

    aq + bq = c

    where a,b,c and q F[]. The next step is to find a bound for the exponents of that appear in q. To simplify the notation, deg(f) will be understood to meandeg(f) throughout this section. Similarly, lc(f) denotes the leading coefficient off when viewed as a polynomial in .

    6.3.1 The base case

    Lemma 6.13 Let be the variable x such that x = 1.

    1. If deg(a) > deg(b) + 1, then deg(q) = deg(c) deg(a) + 1

    2. If deg(a) < deg(b) + 1, then deg(q) = deg(c) deg(b)

    3. If deg(a) = deg(b) + 1, then deg(q) = deg(c) deg(b) unless

    lc(b)lc(a)

    = n

    for some n N, in which case deg(q) could equal n.

    Proof

    1. If deg(a) > deg(b) + 1, then deg(aq) > deg(bq) so deg(c) = deg(aq + bq) =deg(aq) = deg(a) + deg(q) 1.

    2. If deg(a) < deg(b) + 1, then deg(aq) < deg(bq) so deg(c) = deg(aq + bq) =deg(bq) = deg(b) + deg(q).

    3. If deg(a) = deg(b) + 1, then deg(aq) = deg(bq) so unless the leading termsof aq and bq cancel, we can conclude that deg(c) = deg(aq + bq) = deg(b) +deg(q). Let the leading term of q be qnx

    n. The leading terms cancel if andonly if lc(a)nqn + lc(b)qn = 0, i.e.

    lc(b)lc(a)

    = n

    45

  • 8/8/2019 Calculus Hmmt

    54/94

    CHAPTER 6. THE RISCH DIFFERENTIAL EQUATION

    6.3.2 Logarithmic extensions

    Lemma 6.14 Let = log(u) be transcendental over F and moreover suppose thatF() has no new constants.

    1. If deg(a) > deg(b) + 1, then deg(q) deg(c) deg(a) + 12. If deg(a) < deg(b), then deg(q) = deg(c) deg(b)3. If deg(a) = deg(b) + 1, then deg(q) deg(c) deg(a) + 1 unless

    lc(b)lc(a)

    = f + n

    for some f F and n N, in which case the deg(q) could equal n.4. If deg(a) = deg(b), then deg(q) = deg(c) deg(b) unless

    lc(b)lc(a)

    =qnqn

    andlc(lc(b)a lc(a)b)

    lc(a)2= f + n

    for some qn, f F and n N, in which case deg(q) could equal n.

    Proof Recall 4.12, so deg(q) 1 deg(q) deg(q)1. If deg(a) > deg(b) + 1, then deg(aq) > deg(bq) so deg(c) = deg(aq + bq) =

    deg(aq) = deg(a) + deg(q)

    deg(a) + deg(q)

    1.

    2. If deg(a) < deg(b), then deg(aq) < deg(bq) so deg(c) = deg(aq + bq) =deg(bq) = deg(b) + deg(q).

    3. If the leading coefficient ofq is non-constant, then deg(a) = deg(b) + 1 impliesdeg(aq) > deg(bq), so deg(c) = deg(aq + bq) = deg(aq) = deg(a) + deg(q).Otherwise deg(aq) = deg(bq) so unless the leading terms of aq and bq cancel,we can conclude that deg(c) = deg(aq + bq) = deg(aq) = deg(a)+deg(q) 1.Let the leading term of q be qn

    n. The leading terms cancel if and only iflc(a)(qn1 + nqn

    ) + lc(b)qn = 0, i.e.

    lc(b)

    lc(a) =q

    n1+ nqn

    qn =q

    n1qn + n

    =q

    n1qn

    + n

    4. If the leading coefficient of q is a constant, then deg(a) = deg(b) impliesdeg(aq) < deg(bq), so deg(c) = deg(aq + bq) = deg(bq) = deg(a) + deg(q).Otherwise deg(aq) = deg(bq) so unless the leading terms of aq and bq cancel,we can conclude that deg(aq + bq) = deg(a) + deg(q). Let the leading termof q be qn

    n. The leading terms cancel if and only if lc(a)qn +lc(b)qn = 0, i.e.

    lc(b)lc(a)

    =qnqn

    46

  • 8/8/2019 Calculus Hmmt

    55/94

  • 8/8/2019 Calculus Hmmt

    56/94

    CHAPTER 6. THE RISCH DIFFERENTIAL EQUATION

    3. Ifdeg(a) = deg(b), then deg(aq) = deg(bq) so unless the leading terms of aq

    and bq cancel, we can conclude that deg(c) = deg(aq + bq) = deg(b)+deg(q).Let the leading term of q be qn

    n. The leading terms cancel if and only iflc(a)(qn + nqnu

    ) + lc(b)qn = 0, i.e.

    lc(b)lc(a)

    =qn + nqnu

    qn=

    qnqn

    + nu

    6.4 The SPDE algorithm

    The next step is to reduce the equation aq + bq = c to one with a = 1. This is doneby Rothsteins SPDE (Special Polynomial Differential Equation) algorithm.

    Theorem 6.16 Let q F[] be a solution of aq + bq = c where a,b,c F[],deg(a) > 0 and gcd(a, b) = d where deg(d) > 0. Then d | c and

    aq + bq = c ad

    q +b

    dq =

    c

    d

    Proof Obvious.

    Theorem 6.17 Let q

    F[] be a solution of aq + bq = c where a,b,c

    F[],

    deg(a) > 0 and a relatively prime to b. Let n be an upper bound on the degree of q.Then there exists s, t F[] such that as + bt = c and

    aq + bq = c ah + (b + a)h = s t

    where h = (q t)/a, so deg(h) n deg(a).Proof The elements s, t F[] such that as + bt = c are given by the extendedeuclidean algorithm.

    ah + (b + a)h = a

    q t

    a

    + (b + a)

    q ta

    =

    = q

    t

    (q

    t)a

    a + b

    q

    t

    a + a (q

    t)

    a =

    = q + bq

    a t b t

    a=

    c

    a t c as

    a= s t

    Clearly deg(h) deg(q) deg(a) n deg(a).

    Theorem 6.16 will reduce the degree of a while 6.17 will transform the equationto a similar one but with a lower bound on the degree of q. The theorems canbe applied repeatedly


Recommended