PartialFractions[expr,x]
computes the partial fraction decomposition of the rational expression expr in x.
PartialFractions
PartialFractions[expr,x]
computes the partial fraction decomposition of the rational expression expr in x.
Details and Options
- Partial fraction decompositions, or partial fraction expansions, have applications in the integration of rational functions and other calculus operations.
- The partial fraction decomposition of a rational function
is an equivalent form consisting of a polynomial s(x) and a sum of terms of the form
, where the degree of u is less than j and (x-a)j is a divisor of q(x). The degree of s is equal to the degree of p minus the degree of q, or s=0 when that difference is negative. - PartialFractions takes the option Extension, which specifies what algebraic numbers to use for factoring q(x). The default setting is ExtensionAll, which factors over the roots of q.
- Use ExtensionReals to have denominators with complex conjugate roots paired to give powers of quadratic polynomials.
Examples
open all close allBasic Examples (4)
Compute a partial fraction decomposition of
:
PartialFractions[(1/x^2 - 1), x]Compute a partial fraction decomposition of
:
PartialFractions[(1/x^2 + 1), x]Partial fraction decomposition of a rational function:
ratfun = (x^3 + 7/x^3 + 3 x^2 - x - 3);PartialFractions[ratfun, x]Check that this is equivalent to the input:
Together[% - ratfun]Partial fraction decomposition involving a polynomial denominator that does not factor over the rationals:
ratfun = (19 + 5 x + x^2/12 + 4 x + 3 x^2 + x^3);PartialFractions[ratfun, x]Use ExtensionReals to put complex conjugate roots together into a quadratic denominator:
PartialFractions[ratfun, x, Extension -> Reals]Scope (2)
Compute a partial fraction decomposition of a rational function with a nonzero polynomial part:
PartialFractions[(25 + 19 x + 6 x^2 + x^3/6 + 5 x + x^2), x]ratfun = (x ^ 7 - x ^ 6 + x ^ 3 - 5x + 3) / (x ^ 5 - 7x ^ 4 + 24x ^ 3 - 48x ^ 2 + 95x - 65);Rewrite it as a sum of partial fractions over the reals:
PartialFractions[ratfun, x, Extension -> Reals]This is the same as specifying the "Decomposition" in PartialFractionElements:
PartialFractionElements[ratfun, x, "Decomposition", Extension -> Reals]PartialFractionElements[ratfun, x, "PolynomialPart", Extension -> Reals]PartialFractionElements[ratfun, x, "FractionalPart", Extension -> Reals]Options (1)
Extension (1)
ratfun = (x ^ 7 - x ^ 6 + x ^ 3 - 5x + 3) / (x ^ 6 + 3x ^ 5 + 6x ^ 3 - 39x ^ 2 - 105x + 70);Compute its partial fraction decomposition:
PartialFractions[ratfun, x]Compute the decomposition but not allowing the radicals
or
to be used:
PartialFractions[ratfun, x, Extension -> {I, Sqrt[7]}]Compute the decomposition but not allowing imaginary numbers or
:
PartialFractions[ratfun, x, Extension -> {Sqrt[5], Sqrt[17]}]Compute the decomposition allowing only real values:
PartialFractions[ratfun, x, Extension -> Reals]Applications (3)
Integrate a rational function:
ratfun = (x - 2) / (x ^ 3 + 3x ^ 2 + 4x + 12);
Integrate[ratfun, x]Now compute its partial fraction decomposition over the reals:
PartialFractions[ratfun, x, Extension -> Reals]Integrating term-wise shows where the terms from the integral arise:
Map[Integrate[#, x]&, %]//ExpandD[%, x] - ratfun//Simplifyratfun = x / (x - 2);Sum[ratfun, x]Now compute its partial fraction decomposition:
PartialFractions[ratfun, x]Summing term-wise shows where the individual terms arise:
Map[Sum[#, x]&, %]DifferenceDelta[%, x] - ratfunInverseLaplaceTransform of a rational function:
ratfun = x ^ 2 / (x ^ 2 + 3x + 2);InverseLaplaceTransform[ratfun, x, s]//ExpandNow compute its partial fraction decomposition:
PartialFractions[ratfun, x]Inverting term-wise shows where the terms from the sum arise:
Map[InverseLaplaceTransform[#, x, s]&, %]Properties & Relations (1)
ratfun = (x ^ 7 - x ^ 6 + x ^ 3 - 5x + 3) / (x ^ 6 + 3x ^ 5 + 6x ^ 3 - 39x ^ 2 - 105x + 70);Write it as a sum of partial fractions but allowing no extension field:
PartialFractions[ratfun, x, Extension -> None]Apart gives essentially the same result:
Apart[ratfun, x]PartialFractionElements with the "Decomposition" setting also gives the same result:
PartialFractionElements[ratfun, x, "Decomposition", Extension -> None]Possible Issues (1)
PartialFractions by default does a full factorization of the denominator and thus can give a result that uses Root objects:
PartialFractions[(3 x) / ((x ^ 5 - 3 * x - 1) ^ 2 * (x + 1) ^ 3), x]//QuietUse ExtensionNone to avoid this factorization:
PartialFractions[(3 x) / ((x ^ 5 - 3 * x - 1) ^ 2 * (x + 1) ^ 3), x, Extension -> None]Related Guides
History
Text
Wolfram Research (2026), PartialFractions, Wolfram Language function, https://reference.wolfram.com/language/ref/PartialFractions.html.
CMS
Wolfram Language. 2026. "PartialFractions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PartialFractions.html.
APA
Wolfram Language. (2026). PartialFractions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PartialFractions.html
BibTeX
@misc{reference.wolfram_2026_partialfractions, author="Wolfram Research", title="{PartialFractions}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/PartialFractions.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_partialfractions, organization={Wolfram Research}, title={PartialFractions}, year={2026}, url={https://reference.wolfram.com/language/ref/PartialFractions.html}, note=[Accessed: 12-June-2026]}