wiki

Hermite reduction

Hermite reduction computes the rational part of the integral of a rational function[1][4]. For over a field of characteristic zero, the antiderivative of is a rational function plus a sum of constant multiples of logarithms, and the rational function comes entirely from the repeated factors of . Hermite's method extracts it using the square-free decomposition of and the extended Euclidean algorithm, never factoring into irreducibles, and leaves an integral with a square-free denominator. The logarithmic part of that remainder is then given by the Rothstein–Trager resultant[5][6]. The same reduction, applied in the top variable of a tower of extensions, is the first step of the Risch algorithm. Ostrogradsky found an equivalent method in 1845[2] and Hermite published his in 1872[1].

§ 01

Example

The denominator has a repeated factor . Hermite reduction produces the rational term and leaves an integrand whose denominator is square-free. The remainder integrates to logarithms over : .

§ 02

The reduction step

Divide first, so that ; the polynomial quotient integrates term by term. Write with square-free, and . Since is square-free, , so and the extended Euclidean algorithm gives and with[1][4]

and then

To check it, differentiate the first term:

Adding the integrand on the right, the terms cancel and what is left is . Each step lowers the power of by one. Taking from the square-free decomposition and repeating ends with a square-free denominator.

For : , , , . Solving gives and , and the step produces plus the integral of , as above.

§ 03

The split it computes

D = D₁ · D₂² · D₃³ · D₄⁴ (square-free decomposition, gcds only)D₁multiplicity 1D₂D₂multiplicity 2D₃D₃D₃multiplicity 3D₄D₄D₄D₄multiplicity 4D* = D₁D₂D₃D₄square-free, gives the logsD⁻ = D₂D₃²D₄³denominator of therational part∫ A/D = P/D⁻ + ∫ Q/D*
Hermite reduction splits the square-free decomposition of D. One copy of each factor, the square-free part D*, stays under the integral; the other copies form D⁻ = gcd(D, D′), the denominator of the rational part.

The result of the reduction is determined in advance. With and , there are unique polynomials and with and such that[2][3]

In terms of the square-free decomposition, and . Uniqueness holds because the integral of a fraction with square-free denominator has no rational part: a rational function whose derivative had only simple poles would have to be a polynomial.

Ostrogradsky and Horowitz compute and directly[2][3]. Differentiating the identity and clearing denominators gives

which is linear in the unknown coefficients of and , a system of equations in unknowns. Solving it by Gaussian elimination costs for , which is more than Hermite's sequence of Euclidean steps[4][8].

§ 04

Algorithm

Hermite's original method needs the square-free decomposition and a partial fraction split across its factors. A variant attributed by Bronstein to Mack reduces all the factors of the highest remaining multiplicity at once, using only and and a gcd per step, and each Diophantine equation it solves has size proportional to the part being reduced[4]. Writing and , each round takes and , the product of the factors of highest remaining multiplicity, solves

adds to the rational part, replaces by and by , and stops when is constant. The remaining integrand is with square-free.

Hermite reduction in this form, over the rationals.

(* Hermite reduction, in Mack's linear form (Bronstein, Algorithm 2.2.2):
returns the polynomial part q, the rational part g and a fraction a/ds
with integral(A/D) = integral(q) + g + integral(a/ds), where ds is
square-free and deg a < deg ds. g is returned as numerator and
denominator. *)
let hermite (a : t) (d : t) =
let q, a = divmod a d in
let dm = gcd d (deriv d) in
let ds = quo d dm in
let rec go a dm (gn, gd) =
if deg dm <= 0 then ((gn, gd), a)
else begin
let dm2 = gcd dm (deriv dm) in
let dms = quo dm dm2 in
(* solve b (-ds dm' / dm) + c dms = a *)
let b, c = diophantine (neg (quo (mul ds (deriv dm)) dm)) dms a in
let a' = sub c (quo (mul (deriv b) ds) dms) in
(* g <- g + b / dm *)
let gn' = add (mul gn dm) (mul b gd) and gd' = mul gd dm in
let h = gcd gn' gd' in
go a' dm2 (quo gn' h, quo gd' h)
end in
let g, a = go a dm ([||], one) in
(q, g, (a, ds))
let rec qpow c n = if n = 0 then Q.one else Q.mul c (qpow c (n - 1))

Two reductions, each checked by differentiating the rational part.

open Qpoly

Running it.

1 / (x^2 + 1)^2
rational part ((1/2)x)/(x^2 + 1)
remaining integral of (1/2)/(x^2 + 1)
derivative checks: true
(x^4 + 1) / ((x + 1)^3 (x^2 + 1)^2)
rational part (-(1/4)x^3 - (1/2)x^2 + (1/4)x)/(x^4 + 2x^3 + 2x^2 + 2x + 1)
remaining integral of (-(1/4)x + 3/4)/(x^3 + x^2 + x + 1)
derivative checks: true

Both agree with SymPy's ratint_ratpart. The second example has two repeated factors, of multiplicities 3 and 2; the remaining denominator is their product.

§ 05

No factorization needed

The reduction uses only arithmetic, gcds and the extended Euclidean algorithm in , so its output has coefficients in even when the factors of are irreducible over or have no roots in it[4]. For a denominator like , whose roots are the roots of an irreducible cubic, the rational part is computed without ever naming them.

The rational part of 1/(x³ + x + 1)³, then the Rothstein–Trager resultant of the remainder.

open Qpoly

Running it.

D = x^9 + 3x^7 + 3x^6 + 3x^5 + 6x^4 + 4x^3 + 3x^2 + 3x + 1
rational part (-(243/961)x^5 + (357/1922)x^4 - (405/961)x^3 - (315/1922)x^2 + (156/961)x - 224/961)/(x^6 + 2x^4 + 2x^3 + x^2 + 2x + 1)
remaining integral of (-(243/961)x + 357/961)/(x^3 + x + 1)
Rothstein-Trager R(z) = z^3 - (1104057/28629151)z - 84213/28629151
R has no rational roots: the logarithms need algebraic numbers

The rational part agrees with SymPy. The logarithmic part here needs the three roots of a cubic in , which are algebraic numbers of degree 3; the answer can be written as a sum over those roots without computing them.

§ 06

The logarithmic part

After reduction the integrand has square-free and . Over the algebraic closure it equals with residues at the roots of , so its integral is . Grouping the roots by residue gives the Rothstein–Trager theorem[5][6]: with

the distinct roots of are exactly the distinct residues, and

The logarithms are taken of the smallest possible arguments: the algebraic extension of needed is the one generated by the roots of , which is often much smaller than the splitting field of . Lazard and Rioboo, and independently Trager, showed that the gcds can be read off the subresultant sequence of and , avoiding computation with algebraic numbers entirely[7].

A full rational integrator: polynomial part, Hermite reduction and Rothstein–Trager, for cases where the residues are rational.

open Qpoly

Running it.

integral of (x^6 + 2x^4 - x^3 + 1)/(x^5 - 2x^4 + x^3)
= (1/2)x^2 + 2x + (-5x^2 + (3/2)x + 1/2)/(x^3 - x^2) + 2 log(x - 1) + 3 log(x)
integral of (x^2 + 3)/(x^4 + 4x^3 + 3x^2 - 4x - 4)
= (-7/3)/(x + 2) - 2 log(x + 1) + 2/9 log(x - 1) + 16/9 log(x + 2)

Both answers agree with SymPy's ratint.

§ 07

Complexity

For a denominator of degree , Hermite reduction in the form above uses operations in with classical arithmetic[4][8]. Over the coefficients of intermediate results grow, and Gerhard gave modular algorithms for square-free factorization and Hermite integration with nearly optimal running time in both the degree and the coefficient size[9].

§ 08

History

Ostrogradsky described the split into and a square-free remainder in 1845, computing and from a linear system[2]. Hermite gave the reduction by Euclidean steps in 1872[1]. Both methods returned in computer algebra: Horowitz analyzed the cost of both approaches for rational function integration in 1971[3], and Rothstein and Trager independently found the resultant that gives the logarithmic part without factoring in 1976[5][6]. Lazard and Rioboo gave the subresultant method for the logarithmic arguments in 1990[7]. Bronstein's book presents the modern forms of all these algorithms and their generalization to transcendental extensions, where they form the rational-function steps of the Risch algorithm[4].

see also

further reading

  1. [1]C. Hermite, “Sur l’intégration des fractions rationnelles”, Nouvelles Annales de Mathématiques, 2e série, 11 (1872).
  2. [2]M. V. Ostrogradsky, “De l’intégration des fractions rationnelles”, Bulletin de la classe physico-mathématique de l’Académie Impériale des Sciences de Saint-Pétersbourg 4 (1845).
  3. [3]E. Horowitz, “Algorithms for partial fraction decomposition and rational function integration”, SYMSAM (1971).
  4. [4]M. Bronstein, Symbolic Integration I: Transcendental Functions, ch. 2, Springer (2nd ed., 2005).
  5. [5]B. M. Trager, “Algebraic factoring and rational function integration”, SYMSAC (1976).
  6. [6]M. Rothstein, Aspects of Symbolic Integration and Simplification of Exponential and Primitive Functions, PhD thesis, University of Wisconsin–Madison (1976).
  7. [7]D. Lazard, R. Rioboo, “Integration of rational functions: rational computation of the logarithmic part”, Journal of Symbolic Computation 9 (1990).
  8. [8]J. von zur Gathen, J. Gerhard, Modern Computer Algebra, §22, Cambridge University Press (3rd ed., 2013).
  9. [9]J. Gerhard, “Fast modular algorithms for squarefree factorization and Hermite integration”, Applicable Algebra in Engineering, Communication and Computing 11 (2001).

last updated