Section9.29

]>
Book Contents Previous Section 9.28 Fraction Next Section 9.30 GeneralSparseTable Book Index

## 9.29 FullPartialFractionExpansion

The domain FullPartialFractionExpansion implements factor-free conversion of quotients to full partial fractions.

Our examples will all involve quotients of univariate polynomials with rational number coefficients.

Fx := FRAC UP(x, FRAC INT)

FractionUnivariatePolynomial(x,FractionInteger)

Type: Domain

Here is a simple-looking rational function.

f : Fx := 36 / (x**5-2*x**4-2*x**3+4*x**2+x-2)

36 x 5-2 x 4-2 x 3+4 x 2+x-2

Type: Fraction UnivariatePolynomial(x,Fraction Integer)

We use fullPartialFractionfullPartialFractionFullPartialFractionExpansion to convert it to an object of type FullPartialFractionExpansion.

g := fullPartialFraction f

4 x-2-4 x+1+∑%A 2-1=0-3%A-6(x-%A)2

Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))

Use a coercion to change it back into a quotient.

g :: Fx

36 x 5-2 x 4-2 x 3+4 x 2+x-2

Type: Fraction UnivariatePolynomial(x,Fraction Integer)

Full partial fractions differentiate faster than rational functions.

g5 := D(g, 5)

-480(x-2)6+480(x+1)6+∑%A 2-1=0 2160%A+4320(x-%A)7

Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
f5 := D(f, 5)

(-544320 x 10+4354560 x 9-14696640 x 8+28615680 x 7-40085280 x 6+46656000 x 5-39411360 x 4+18247680 x 3-5870880 x 2+3317760 x+246240)(x 20-12 x 19+53 x 18-76 x 17-159 x 16+676 x 15-391 x 14-1596 x 13+2527 x 12+1148 x 11-4977 x 10+1372 x 9+4907 x 8-3444 x 7-2381 x 6+2924 x 5+276 x 4-1184 x 3+208 x 2+192 x-64)

Type: Fraction UnivariatePolynomial(x,Fraction Integer)

We can check that the two forms represent the same function.

g5::Fx - f5

0

Type: Fraction UnivariatePolynomial(x,Fraction Integer)

Here are some examples that are more complicated.

f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3)

x 6-x 5 x 7-4 x 6+3 x 5+9 x 3-6 x 2-4 x-8

Type: Fraction UnivariatePolynomial(x,Fraction Integer)
g := fullPartialFraction f

1952 2401 x-2+464 343(x-2)2+32 49(x-2)3+∑%A 2+%A+1=0-179 2401%A+135 2401 x-%A+∑%A 2+%A+1=0 37 1029%A+20 1029(x-%A)2

Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
g :: Fx - f

0

Type: Fraction UnivariatePolynomial(x,Fraction Integer)
f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / (x**8-5*x**6+6*x**4+4*x**2-8)

2 x 7-7 x 5+26 x 3+8 x x 8-5 x 6+6 x 4+4 x 2-8

Type: Fraction UnivariatePolynomial(x,Fraction Integer)
g := fullPartialFraction f

∑%A 2-2=0 1 2 x-%A+∑%A 2-2=0 1(x-%A)3+∑%A 2+1=0 1 2 x-%A

Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
g :: Fx - f

0

Type: Fraction UnivariatePolynomial(x,Fraction Integer)
f:Fx := x**3 / (x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + 22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + 49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + 10*x**3 + 7*x**2 + 2*x + 1)

x 3(x 21+2 x 20+4 x 19+7 x 18+10 x 17+22 x 15+30 x 14+36 x 13+40 x 12+47 x 11+46 x 10+49 x 9+43 x 8+38 x 7+32 x 6+23 x 5+19 x 4+10 x 3+7 x 2+2 x+1)

Type: Fraction UnivariatePolynomial(x,Fraction Integer)
g := fullPartialFraction f

∑%A 2+1=0 1 2%A x-%A+∑%A 2+%A+1=0 1 9%A-19 27 x-%A+∑%A 2+%A+1=0 1 27%A-1 27(x-%A)2+∑%A 5+%A 2+1=0-96556567040 912390759099%A 4+420961732891 912390759099%A 3-59101056149 912390759099%A 2-373545875923 912390759099%A+529673492498 912390759099 x-%A+∑%A 5+%A 2+1=0-5580868 94070601%A 4-2024443 94070601%A 3+4321919 94070601%A 2-84614 1542141%A-5070620 94070601(x-%A)2+∑%A 5+%A 2+1=0 1610957 94070601%A 4+2763014 94070601%A 3-2016775 94070601%A 2+266953 94070601%A+4529359 94070601(x-%A)3

Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))

This verification takes much longer than the conversion to partial fractions.

g :: Fx - f

0

Type: Fraction UnivariatePolynomial(x,Fraction Integer)

For more information, see the paper: Bronstein, M and Salvy, B. ``Full Partial Fraction Decomposition of Rational Functions,'' Proceedings of ISSAC'93, Kiev, ACM Press. All see PartialFractionXmpPage for standard partial fraction decompositions.

Book Contents Previous Section 9.28 Fraction Next Section 9.30 GeneralSparseTable Book Index