### 10.1.5 Normal form for rational functions

The ratnormal command rewrites an expression using its irreducible representation. The expression is viewed as a multivariate rational function with coefficients in ℚ (or ℚ[i]). The variables are generalized identifiers which are assumed to be algebraically independent. Unlike with normal, an algebraic extension is considered as a generalized identifier. Therefore ratnormal is faster but might miss some simplifications if the expression contains radicals or algebraically dependent transcendental functions.

- ratnormal takes expr, an expression.
- ratnormal(expr) returns the irreducible representation of expr.

#### Examples

ratnormal((x^3-1)/(x^2-1))

x2+x+1
x+1

ratnormal((-2 x^3+3 x^2+5 x-6)/(x^2-2 x+1))

−2 x2+x+6
x−1