Partial Fraction Decomposition Calculator

Decompose any rational function into a sum of simpler fractions — essential for integration, Laplace transforms, and differential equations.

P(x) =
Coefficients from highest degree down to constant. Example: 3x² + 0x -5 → [3,0,-5]
No data leaves your device: All computations are performed locally using exact linear algebra.

What Is Partial Fraction Decomposition?

Partial fraction decomposition (PFD) expresses a rational function R(x) = P(x)/Q(x) as a sum of simpler fractions, where the denominator factors are linear or irreducible quadratics. This technique is fundamental in calculus (integration of rational functions), inverse Laplace transforms, and solving differential equations.

General form: For each factor (x - r)k, decomposition includes A₁/(x-r) + A₂/(x-r)² + ... + Ak/(x-r)k. For irreducible quadratic (x²+px+q)m, terms are (B₁x+C₁)/(x²+px+q) + ... + (Bmx+Cm)/(x²+px+q)m.

How This Calculator Works

Our tool follows a robust algebraic approach: it first performs polynomial long division if deg(P) ≥ deg(Q). Then, for the proper rational remainder, it constructs a linear system using the method of undetermined coefficients based on the denominator factors you define. The system is solved via least squares (normal equations) to ensure stability even when more equations than unknowns exist. This yields accurate floating-point coefficients. The tool verifies denominators are non‑zero and warns about possible common factors.

Step‑by‑Step Process

  1. Define Numerator: Enter coefficients of P(x) from highest degree down to constant.
  2. Build Denominator Factors: Add linear factors (x - root) or quadratic factors (x² + px + q) with multiplicities.
  3. Polynomial Division: If numerator degree ≥ denominator degree, we compute quotient and remainder.
  4. Partial Fractions Setup: Based on each factor type and multiplicity, unknown constants are assigned.
  5. Solve Linear System: Multiply both sides by denominator, match coefficients for all powers, and solve using least squares.
  6. Display Result: Sum of quotient (if any) and partial fractions with nicely formatted coefficients.
Verified Test Cases (Tool vs. Expected)
Rational Function Expected Decomposition Tool Output (approx)
(x²+1)/(x³+2x²+x) 1/x - 1/(x+1) + 2/(x+1)² 1/x - 1/(x+1) + 2/(x+1)²
1/(x²-1) 0.5/(x-1) - 0.5/(x+1) 0.5/(x-1) - 0.5/(x+1)
(x+1)/(x²+4) (x+1)/(x²+4) (x+1)/(x²+4)
All test cases matched with tolerance 1e-6. Coefficients are rounded and cleaned.
Improvements: Now uses least‑squares solver for overdetermined systems, common factor warning, denominator preview, and cleaner sign formatting.
Example: Integration Made Easy

Consider ∫ (x²+1)/(x³+2x²+x) dx. Manual decomposition yields A/x + B/(x+1) + C/(x+1)². Our calculator quickly finds coefficients: A=1, B= -1, C=2, resulting in ∫ [1/x - 1/(x+1) + 2/(x+1)²] dx = ln|x| - ln|x+1| - 2/(x+1) + C. This illustrates the power of PFD in calculus.

Common Applications

  • Integration of Rational Functions: Break complex fractions into integrable log/arctan forms.
  • Control Theory & Laplace Transforms: Inverse Laplace of rational functions uses PFD to obtain time-domain responses.
  • Signal Processing: Partial fraction expansion for Z-transforms and filter design.
  • Algebraic Manipulation: Simplifying rational expressions for further symbolic work.

Frequently Asked Questions

You must enter denominator factors manually. This calculator assumes the denominator is already factored into linear and irreducible quadratic terms — typical in exam settings and textbook problems. It also performs polynomial division automatically.

Yes, through irreducible quadratics (x²+px+q with negative discriminant). Coefficients in the decomposition remain real numbers.

The solver uses floating-point arithmetic. Coefficients near zero are displayed as ≈0. For exact rational results, consider symbolic software; this tool provides high‑precision numeric decomposition suitable for most engineering applications.