partfrac
Partial fraction decomposition
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
partfrac(f
, <x
>) partfrac(f
,x
,options
)
partfrac(f, x)
returns the partial fraction
decomposition of the rational expression f
with
respect to the variable x
.
Consider the rational expression with
polynomials g, p, q,
such that degree (p) < degree(q)
.
Factor of the denominator into nonconstant and pairwise coprime polynomials q_{i} with integer exponents e_{i}:
The partial fraction decomposition based on this factorization is a representation
where p_{i, j} are
polynomials, such that degree(p_{i,j})
< degree(q_{i})
. In particular, p_{i, j} are
constants if q_{i} is
a linear polynomial.
partfrac
uses factors q_{i} found
by the factor
function.
This function finds factorization over the field implied by the coefficients
of the denominator. See Example 2.
If f
has only one indeterminate, and you
do not use options, then you can omit the second argument x
in
a call to partfrac
. Otherwise, specify the indeterminate
as a second parameter.
partfrac
can also find partial fraction decomposition
with respect to expressions instead of variables. See Example 3.
The option Full
invokes a full factorization
of the denominator into linear factors. The MaxDegree
option
determines whether partial fraction decomposition is a symbolic sum
of RootOf
terms
or an expression in radicals. In general, roots belonging to an irreducible
factor of the denominator of degree five or larger cannot be expressed
in terms of radicals. See Example 6.
Find partial fraction decomposition of the following expressions. You can omit specifying a variable because these rational expressions are univariate.
partfrac(x^2/(x^3  3*x + 2))
partfrac(23 + (x^4 + x^3)/(x^3  3*x + 2))
partfrac(x^3/(x^2 + 3*I*x  2))
Find partial fraction decomposition of the following expression
containing two variables, x
and y
.
For multivariate expressions, specify the variable with respect to
which you compute the partial fraction decomposition.
f := x^2/(x^2  y^2): partfrac(f, x), partfrac(f, y)
delete f:
Find the partial fraction decomposition of this expression.
partfrac(1/(x^2  2), x)
The denominator x^{2}  2 does not factor over the rational numbers.
factor(x^2  2)
Extend the coefficient field used by factor
and partfrac
by
using the Adjoin
option.
partfrac(1/(x^2  2), x, Adjoin = [sqrt(2)])
Find the partial fraction decomposition with respect to an expression,
such as sin(x)
.
partfrac(1/(sin(x)^4  sin(x)^2 + sin(x)  1), sin(x))
Return a list consisting of the numerators and denominators
of the partial fraction decomposition by using the List
option.
partfrac(x^2/(x^3  3*x + 2), x, List)
Find the partial fraction decomposition using numeric factorization
over the field real numbers, R_
.
partfrac(1/(x^3  2), x, Domain = R_)
Find the partial fraction decomposition of the same expression
using numeric factorization over the field complex numbers, C_
.
partfrac(1/(x^3  2), x, Domain = C_)
Find the partial fraction decomposition factoring the denominator
into linear factors symbolically. For this, use the Full
option.
partfrac(1/(x^3 + x  2), x, Full)
For irreducible denominators of the third and higher degrees, the partial fraction decomposition is a symbolic sum of the roots.
S:= partfrac(1/(x^3 + x  3), x, Full)
MuPAD^{®} uses the freeze
function
to keep the result in the form of an unevaluated symbolic sum. To
evaluate this symbolic sum, use unfreeze
. Evaluating this symbolic sum
simplifies it back to the original input.
unfreeze(S); delete S:

Rational
expression in 

Indeterminate: typically, an identifier or an indexed identifier 

Factor the denominator completely into linear factors, and find the partial fraction decomposition with respect to that factorization. 

Return a list consisting of the numerators and denominators of the partial fraction decomposition. 

Option, specified as Adjoin only the coefficients of the denominator with the algebraic
degree not exceeding 

Option, specified as Factor the denominator over the smallest field containing the
rational numbers, all coefficients of the denominator, and the elements
of 

Option, specified as Factor the denominator over the domain 

Option, specified as When building the resulting expression, insert 
f