Module rational

Module rational 

Source
Expand description

Rational function integration using Hermite reduction algorithm

Implements the Hermite reduction method for integrating rational functions. This is a core component of the Risch algorithm for symbolic integration.

§Mathematical Background

For a rational function R(x) = P(x)/Q(x), the integral decomposes as:

∫ R(x) dx = polynomial_part + ∑ cᵢ ln|qᵢ(x)| + ∫ remaining_rational

where:

  • polynomial_part comes from polynomial long division if deg(P) ≥ deg(Q)
  • logarithmic terms arise from square-free factorization of denominator
  • remaining_rational is a proper rational function with square-free denominator

§Algorithm Steps

  1. Polynomial Division: If deg(P) ≥ deg(Q), divide to get quotient + remainder
  2. Square-Free Factorization: Factor Q = q₁·q₂²·q₃³·… into square-free parts
  3. Hermite Reduction: Extract logarithmic terms using GCD operations
  4. Partial Fractions: Decompose remaining rational part

§References

  • Bronstein, M. (2005). Symbolic Integration I: Transcendental Functions
  • Geddes, K. et al. (1992). Algorithms for Computer Algebra

Structs§

RationalIntegral
Result of rational function integration

Functions§

assemble_integral
Assemble final integral expression from RationalIntegral
integrate_rational
Integrate a rational function P(x)/Q(x)