partfrac
Partial fraction decomposition of a rational expression.
Category: Mathematics > Formula Manipulation and Simplification
Syntax
R = partfrac(f)
Decomposes f in its default variable.
R = partfrac(f, x)
Decomposes with respect to x.
Description
The denominator is factored and the fraction is split into one term per factor, with its multiplicity. The technique is the basis for integrating rational functions and for inverting Laplace and Z-transforms by table lookup.
Input arguments
f- Rational expression.
x- Variable of the decomposition.
Output arguments
R- Sum of fractions with simple denominators, plus a polynomial part if the degree of the numerator is not smaller.
Example
Proper and improper fractions
syms x
partfrac((x + 3)/((x - 1)*(x + 2)))
partfrac(x^3/(x^2 - 1))
Output
ans = 4/(3*(x - 1)) - 1/(3*(x + 2))
ans = x + 1/(2*(x - 1)) + 1/(2*(x + 1))