Polynomial and fractional part: propfrac

### 5.32.8 Polynomial and fractional part: propfrac

The propfrac command rewrites a rational function as a polynomial plus a rational function whose numerator has smaller degree than the numberator; namely, it writes A(x)/B(x) (after reduction), as:

Q(x)+ |
R(x)
B(x)
| where R(x)=0 or 0≤ degree(R(x))< degree(B(x))

(See also Section 5.7.2.)

- propfrac takes one argument:
  rat, a rational function.
- propfrac(rat) returns the sum of a polynomial and rational function which add to rat, and with the degree of the numerator of the rational function less that the degree of the denominator.

#### Example

Input:

propfrac((5*x+3)*(x-1)/(x+2))

Output:

5 x−12+ |
21
x+2