Partial Fraction Decomposition Calculator

See how a rational function breaks into simpler fractions. Inspect exact coefficients, original domain exclusions and the contribution of each term.

See how the fractions fit together.

Break a rational function into exact contributions. Follow the algebra, check the original domain, and explore how the terms shape the graph.

Exact decomposition verified; 2 fraction terms. Original domain fully enumerated.

Try an editable example

Your rational function

Use x, powers, parentheses and exact fractional or decimal coefficients.

Expanded or multiplied polynomial expressions are accepted. The denominator must not be zero.

The result uses exact rational coefficients. Harder automatic searches can stop with an explicit unresolved factor; hints must reconstruct the original denominator exactly.

Factor hints

These drafts are retained. Choose Verified factor hints to use them in the calculation.

Explore a point and a window

Enter a rational constant expression, such as 3/2. Original exclusions still apply.

Each graph limit is between −1,000,000 and 1,000,000, with a span of at least 0.000001. The graph samples 401 x values; exact identities and domain restrictions remain available separately.

Your exact decomposition

Exact identity verified

Every coefficient equation and the reconstructed numerator agree exactly. Equality holds wherever the original denominator is nonzero.

Selectable exact expression(2)/(x - 2) + (1)/(x + 1)

Explore the graph

(2)/(x - 2)

Function and selected contribution

The solid blue line is the whole function. The dashed purple line shows the selected contribution. Gaps preserve the original exclusions and the limits of this viewing window.

Function value
-10-50510
Rational function and selected contributionBlue solid function. Purple dashed selected contribution. Gray dashed vertical lines indicate poles; open blue circles indicate removable holes. Exact values, restrictions and every sample are available in the accompanying tables and report. This is a finite sampled view.
-5-5/205/25

x

  • Whole function
  • Selected contribution
  • Pole
  • Hole
  • This is a finite sampled view; very small features or changes between samples may not be visible.
  • Values outside the entered y window are retained in the data and are not connected across the clipped region.

Inspect the entered x

The original value and decomposition sum agree exactly.
Entered x
0
Original numerator
0
Original denominator
-2
Original function
0
Simplified expression
0
Polynomial part
0
Contribution term-1
-1
Contribution term-2
1
Decomposed sum
0
Exact difference
0

Keep the original domain

Original domain: (x^2 - x - 2) != 0

All real exclusions of the original denominator are listed, including canceled factors.

Original real exclusions
Excluded xBehaviorOriginal / canceled / remaining orderLimit at a hole
2Pole1 / 0 / 1Not a finite hole limit
-1Pole1 / 0 / 1Not a finite hole limit

Follow the exact algebra

Division, cancellation and exact identities
Exact polynomial ledger
QuantityPolynomialDegree
Original numerator3*x1
Original denominatorx^2 - x - 22
Canceled greatest common divisor10
Reduced numerator3*x1
Reduced denominatorx^2 - x - 22
Polynomial quotient0Zero polynomial
Original-division remainder3*x1
Reduced-division remainder3*x1
Division reconstruction3*x1
Division residual0Zero polynomial
Decomposition reconstruction3*x1
Decomposition residual0Zero polynomial
Factors and their multiplicities
Normalized rational factors
FactorDegreeOriginalCanceledRemainingDiscriminantReal roots
x - 21101Linear factor1
x + 11101Linear factor1
Every partial-fraction term · 2
Complete partial-fraction terms
TermNumeratorFactorPowerExpanded denominator
term-12factor-11x - 2
term-21factor-21x + 1

Zero numerators remain in this ledger so every required factor power can be checked.

Coefficient equations and exact solution

Match coefficients of equal powers of x after putting every term over the common denominator. The columns below are the unknown numerator coefficients.

Original coefficient system
Power of xterm-1: coefficient of x^0term-2: coefficient of x^0Right-hand side
01-20
1113
Solved numerator coefficients
UnknownTermNumerator powerExact value
term-1: coefficient of x^0term-102
term-2: coefficient of x^0term-201
Reduced matrix and residual checks
Reduced augmented matrix
Rowterm-1: coefficient of x^0term-2: coefficient of x^0Right-hand sideOriginal equation residual
11020
20110
Factor-search details

Reduced denominator

Factorization complete. Scalar: 1.

Verified residual: 1

0 trial-divisor checks; 0 candidate divisions.

Canceled factor

Factorization complete. Scalar: 1.

Verified residual: 1

0 trial-divisor checks; 0 candidate divisions.

Graph sample values · 401

These samples support the plotted lines. They do not prove every feature between samples. All samples are included in the report.

1–25 of 401
Current graph samples
SamplexWhole functionSelected contributionGraph availability
1-5-15/28-2/7defined / defined
2-199/40-7960/14787-80/279defined / defined
3-99/20-5940/10981-40/139defined / defined
4-197/40-23640/43489-80/277defined / defined
5-49/10-490/897-20/69defined / defined
6-39/8-936/1705-16/55defined / defined
7-97/20-5820/10549-40/137defined / defined
8-193/40-7720/13923-80/273defined / defined
9-24/5-180/323-5/17defined / defined
10-191/40-22920/40921-80/271defined / defined
11-19/4-76/135-8/27defined / defined
12-189/40-22680/40081-80/269defined / defined
13-47/10-1410/2479-20/67defined / defined
14-187/40-7480/13083-80/267defined / defined
15-93/20-5580/9709-40/133defined / defined
16-37/8-888/1537-16/53defined / defined
17-23/5-115/198-10/33defined / defined
18-183/40-21960/37609-80/263defined / defined
19-91/20-5460/9301-40/131defined / defined
20-181/40-7240/12267-80/261defined / defined
21-9/2-54/91-4/13defined / defined
22-179/40-21480/36001-80/259defined / defined
23-89/20-1780/2967-40/129defined / defined
24-177/40-21240/35209-80/257defined / defined
25-22/5-165/272-5/16defined / defined

Save, inspect and reuse this problem

The report preserves exact algebra, original exclusions, the selected contribution and every graph sample. Geometry on screen is an approximate projection.

Restore saved inputs

Choose a saved JSON input or paste its complete text. Preview it first; the current problem changes only when you apply.

Calculation conventions and limits

Decomposition is over rational coefficients, with linear and irreducible quadratic blocks. A quadratic can have real irrational roots and remain one block. This is not a decomposition into every real or complex linear factor.

Numerator degree is at most 20 and denominator degree at most 12. Exact arithmetic and automatic factor search have finite resource limits. An unresolved search is reported explicitly; a displayed graph is a sampled view, not the algebraic proof.

Original denominator exclusions remain even after cancellation. If every real exclusion cannot be safely located or projected, the graph stays unavailable while a proven exact result can remain useful.

  • Exact decomposition over the rational field Q; quadratic factors need not be irreducible over the real numbers.
  • Original denominator exclusions remain in force after cancellation.
  • Automatic factor discovery has explicit finite work limits; verified supplied factors must reconstruct the original denominator.
  • The graph is a finite sampled view. Exact coefficient reconstruction is the identity proof.

How to use this calculator

  1. Enter Numerator P(x) and Denominator D(x), using the variable x. Polynomial expressions accept rational, decimal and scientific coefficients, parentheses, multiplication and nonnegative integer powers. The denominator must be a nonzero polynomial; functions such as sin(x) and division by a variable expression are outside this grammar.
  2. Choose Factorization method. Automatic factoring tries the declared bounded search. Verified factor hints uses Factor hint and Multiplicity rows that together reconstruct your original denominator. Hints assist factor discovery; they do not replace the denominator or turn an incorrect product into a valid result.
  3. Read the exact partial fractions, polynomial part and factor multiplicities. Open the coefficient equations and reconstruction ledger to see how each numerator coefficient is determined. If factoring remains incomplete, use the explanation and any known factors without treating them as a complete answer.
  4. Enable Inspect a point and enter Inspect at x. An original excluded point remains undefined even if cancellation gives a finite extension. Compare the original value, polynomial part and individual terms; ordinary defined points have an exact zero reconstruction residual.
  5. Enable Show graph and enter x minimum, x maximum, y minimum and y maximum. Use Selected contribution to compare a term or Polynomial part with the original function, or choose Whole function only. The finite sampled view does not infer behavior between samples; local inspection or window errors preserve valid algebra.
  6. Save inputs to preserve expressions, hints and disabled drafts. Paste reusable input or Choose input file, then Preview input before Apply preview. Download report for the complete current exact result, domain, inspection and graph data; repair or disable invalid active local controls before exporting.

The Formula

The mathematical logic powering this calculation is:

For entered polynomials P and nonzero D, first divide P = QD + R. Cancel the monic gcd G to obtain P′ = P/G and D′ = D/G, while retaining the original restriction D(x) ≠ 0. Decompose the proper remainder of P′/D′; an improper input also retains its polynomial part Q.
The supported exact factor blocks are monic linear polynomials and quadratics irreducible over rational coefficients. For a linear factor f of multiplicity m, include A₁/f + … + Aₘ/fᵐ. For a quadratic factor, include (A₁ + B₁x)/f + … + (Aₘ + Bₘx)/fᵐ. A positive nonsquare discriminant can have real irrational roots even though the quadratic stays intact over the rationals. Zero coefficients and terms remain in the coefficient ledger.
Multiply the proposed sum by D′ and equate coefficients. The model solves that exact rational system and reconstructs P′ coefficient by coefficient. Original division is checked separately. A sampled graph is an illustration, not proof of either identity.
Automatic factoring uses exact square-free decomposition, rational-root trials and bounded quadratic discovery. An accepted factor must divide exactly. Optional verified hints must reconstruct the original denominator, including multiplicities; nonmonic scalar content is inferred. Exhausting a search or encountering unsupported residual factors is reported explicitly, not labeled a complete decomposition.
Original real denominator zeros stay excluded. A root remaining in D′ is a pole; a fully canceled root is a removable hole with a separately identified extension value. Exact rational inspection distinguishes the original ratio from its simplified extension. The graph uses 401 rational x samples and splits both curves at every known original exclusion, including holes. Complete graphs require complete domain information and resolvable root positions.
The numerator degree is at most 20 and denominator degree at most 12. Exact rational sizes and arithmetic/search work are bounded; a numerical limit is not rounded into success. Active graph endpoints must be constant expressions within −1,000,000 to 1,000,000, with each span at least 0.000001. Long exact values remain available even when their decimal projection is unavailable.

Worked Example

If you input:

  • Numerator P(x): 3x
  • Denominator D(x): x^2 − x − 2
  • Factorization method: Automatic factoring
  • Inspect a point: Enabled
  • Inspect at x: 0
  • Show graph: Enabled
  • x minimum / x maximum: −5 / 5
  • y minimum / y maximum: −10 / 10

Result:

The denominator factors as (x − 2)(x + 1). The exact decomposition is 3x/(x² − x − 2) = 2/(x − 2) + 1/(x + 1), with polynomial part 0. Multiplying through gives 2(x + 1) + (x − 2) = 3x, so every reconstruction coefficient is exact. The original domain excludes x = −1 and x = 2, both simple poles. At x = 0, the terms are −1 and 1, their sum and the original function are 0, and the exact inspection residual is 0.

Frequently Asked Questions

Does this find partial fractions over the real or complex numbers?

The coefficient and factor domain is the rational numbers. A quadratic such as x² − 2 has no rational linear factors, so it remains a quadratic block, although its two real irrational roots still matter for the original domain and graph. This is not a promise to express every denominator as real or complex linear factors or to manipulate arbitrary algebraic coefficients.

Why do repeated factors need several fraction terms?

A factor of multiplicity m needs a numerator at every power from 1 through m. Linear factors use constant numerators; quadratic factors use numerators of degree at most one. Some coefficients may solve to exactly zero, and the ledger keeps them so that the complete coefficient system is visible.

What if automatic factoring cannot finish?

An incomplete search is reported separately from an invalid expression. The original division, gcd, known factors and unresolved polynomial remain available, but a partial term list is not presented as a complete decomposition. Verified hints can supply supported factors when their full product exactly matches the original denominator. A bounded unsuccessful search does not establish that every remaining polynomial is irreducible.

Why is a canceled denominator root still excluded?

The entered ratio P(x)/D(x) requires D(x) ≠ 0 before any simplification. If all denominator multiplicity at a root cancels, the simplified function may have a finite extension there, shown as a removable hole. If denominator multiplicity remains, it is still a pole. An unresolved canceled factor can leave the exact decomposition complete while the explicit domain list remains incomplete; the original restriction is always retained.

What is the difference between exact coefficients and the graph?

Coefficient equations, cancellation, reconstruction and rational-point inspection use exact fractions. The plot is a bounded numerical projection of 401 exact rational sample positions, split at original exclusions. Values outside the chosen y window remain in the data but are not clamped onto its border. Very close roots or unavailable projections can prevent a reliable graph while leaving the exact algebra useful.

Can I enter a numerator with higher degree than the denominator?

Yes, within the stated degree and work limits. Polynomial division first produces Q and a lower-degree remainder, then the proper rational part is decomposed. A nonzero constant denominator gives only a polynomial part, and a zero numerator is valid while retaining the original denominator's exclusions. The separate Polynomial Division Calculator provides a focused long or synthetic division workflow.

What happens to unfinished hints, inspection or graph values?

Raw drafts remain unchanged in the saved input. Automatic mode does not evaluate inactive hint contents, and disabled inspection or graph controls do not evaluate their numerical drafts, although structural size limits still apply. An invalid active local value keeps valid exact algebra and prevents a complete report until repaired or disabled. Import previews do not replace current work until you apply them.

Similar Calculators