hermite_reduction

Function hermite_reduction 

Source
pub fn hermite_reduction(
    expr: &Expression,
    _extensions: &[DifferentialExtension],
) -> Option<(Expression, Expression)>
Expand description

Hermite reduction: Separate polynomial and rational parts

Returns (rational_part, transcendental_part).

The rational part can be integrated directly, while the transcendental part requires RDE solving.

§Arguments

  • expr - The expression to reduce
  • extensions - The differential extension tower

§Examples

use mathhook_core::calculus::integrals::risch::hermite::hermite_reduction;
use mathhook_core::calculus::integrals::risch::differential_extension::{build_extension_tower, DifferentialExtension};
use mathhook_core::Expression;
use mathhook_core::symbol;

let x = symbol!(x);
let expr = Expression::div(Expression::integer(1), Expression::symbol(x.clone()));
let extensions = vec![DifferentialExtension::Rational];

let result = hermite_reduction(&expr, &extensions);
assert!(result.is_some());