6.32.9 Partial fraction expansion: partfrac cpartfrac
The partfrac and cpartfrac commands find the partial
fraction expansion of a rational function.
-
partfrac takes one argument:
rat, a rational function.
- partfrac(rat) returns the partial
fraction expansion of rat.
The partfrac command is equivalent to the convert
command (see Section 6.23.26) with parfrac (or
partfrac or fullparfrac) as option.
- cpartfrac(rat) behaves just like
partfrac, except that it always finds the partial fraction
expansion over ℂ.
Example.
Find the partial fraction expansion of:
over the real numbers.
Input (in real mode):
partfrac((x^5-2*x^3+1)/(x^4-2*x^3+2*x^2-2*x+1))
Output:
To find the partial fraction decomposition over the complex numbers,
you can either put Xcas in complex mode (see
Section 3.5.5) or use cpartfrac.
Input (in complex mode):
partfrac((x^5-2*x^3+1)/(x^4-2*x^3+2*x^2-2*x+1))
or, in real or complex mode:
cpartfrac((x^5-2*x^3+1)/(x^4-2*x^3+2*x^2-2*x+1))
Output: