Home › Calculators › Partial Fraction Decomposition Calculator

Partial Fraction Decomposition Calculator

Break a rational function P(x)/Q(x) into a sum of simple fractions. The calculator factors the denominator, writes the correct form for linear, repeated and irreducible quadratic factors, builds the coefficient equations and solves them exactly.

Last updated:

Examples:

Enter polynomials in x, expanded (x^3 - 3x - 2) or factored ((x+1)^2(x-2)). The denominator is factored over the rationals automatically.

Partial fraction decomposition
Factored denominator
Form to solve
Coefficients

Step by step

    Advertisement
    Advertisement

    How to use the Partial Fraction Decomposition Calculator

    1. Enter the numerator P(x), for example x^2 + 3x + 5.
    2. Enter the denominator Q(x), expanded or factored, for example (x + 1)^2 (x - 2).
    3. Press Decompose (the answer also updates as you type).
    4. Read the decomposition and the coefficient values A, B, C…
    5. Follow the steps from factoring to solving, then copy the answer.

    Which form to use for each factor

    Factor in the denominatorTerms in the decompositionUnknowns
    (x − a)A/(x − a)1
    (x − a)³A/(x − a) + B/(x − a)² + C/(x − a)³3
    (2x + 1)A/(2x + 1)1
    x² + 4 (irreducible)(Ax + B)/(x² + 4)2
    (x² + 4)²(Ax + B)/(x² + 4) + (Cx + D)/(x² + 4)²4
    x³ − 2 (no rational roots)(Ax² + Bx + C)/(x³ − 2)3

    The total number of unknowns always equals the degree of the denominator, which is why the coefficient system has exactly one solution.

    Worked example: (5x − 4)/(x² − x − 2)

    1. Factor: x² − x − 2 = (x − 2)(x + 1).
    2. Form: (5x − 4)/((x − 2)(x + 1)) = A/(x − 2) + B/(x + 1).
    3. Clear denominators: 5x − 4 = A(x + 1) + B(x − 2).
    4. Plug in roots: x = 2 gives 6 = 3A, so A = 2. x = −1 gives −9 = −3B, so B = 3.
    5. Answer: 2/(x − 2) + 3/(x + 1).

    Tips for getting it right

    • Check that the fraction is proper before setting up the form. If it is not, divide first.
    • Factor completely. A missed factor gives a system with no solution.
    • Include every power of a repeated factor, not just the highest one.
    • Mix methods: plugging in roots quickly gives the top-power coefficients of linear factors; matching coefficients finds the rest.
    • Verify by adding the pieces back over the common denominator. The calculator's check line does this for you.

    Frequently asked questions

    What is partial fraction decomposition?

    It rewrites a rational function P(x)/Q(x) as a sum of simpler fractions whose denominators are the factors of Q(x). For example, (5x − 4)/(x² − x − 2) = 2/(x − 2) + 3/(x + 1). The simpler pieces are much easier to integrate or to transform.

    What form do I use for each factor?

    A linear factor (ax + b) gets A/(ax + b). A repeated linear factor (ax + b)ⁿ gets one term for each power: A₁/(ax + b) + A₂/(ax + b)² + … + Aₙ/(ax + b)ⁿ. An irreducible quadratic (ax² + bx + c) gets (Bx + C)/(ax² + bx + c), and a repeated quadratic gets one such term for each power.

    What if the numerator's degree is too high?

    If deg P ≥ deg Q the fraction is improper. Divide first with polynomial long division to get a polynomial plus a proper fraction R(x)/Q(x), then decompose only the proper part. The calculator does this automatically.

    How are the coefficients found?

    Multiply both sides by the denominator, expand, and set the coefficients of each power of x equal, which gives a system of linear equations. For linear factors you can also plug in each root (the cover-up or Heaviside method), which makes all other terms vanish.

    What is an irreducible quadratic factor?

    A quadratic like x² + 1 or x² + 2x + 5 whose discriminant b² − 4ac is negative, so it cannot be factored into real linear factors. Its partial fraction needs a linear numerator Bx + C, not just a constant.

    Why is partial fraction decomposition used in calculus?

    Each simple fraction has a standard antiderivative: A/(x − a) integrates to A·ln|x − a|, A/(x − a)ⁿ to a power of (x − a), and (Bx + C)/(x² + bx + c) to a mix of a logarithm and an arctangent. It is also used for inverse Laplace transforms and for summing telescoping series.

    Does it work if the denominator has irrational roots?

    Factors are found over the rational numbers. A quadratic with irrational roots such as x² − 2 is kept as a quadratic factor with a (Bx + C) numerator, which is still a correct decomposition over the rationals.

    Are all the tools on FreeToolCabin tested for quality and accuracy?

    Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

    Related tools

    Rational Expressions CalculatorSimplify, add, subtract, multiply and divide rational expressions with excluded values.Polynomial Long Division CalculatorDivide polynomials with the full long division layout, quotient, remainder and steps.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Eigenvalue and Eigenvector CalculatorEigenvalues (real or complex), eigenvectors and the characteristic polynomial of a square matrix.Equation SolverSolve any equation for x: exact roots, complex roots, numeric answers, steps and a graph.Inequality CalculatorSolve linear, quadratic, rational and absolute value inequalities with steps and a number line.Inverse Function CalculatorFind the inverse f⁻¹(x) of a function with steps, domain restrictions and a graph.Laplace Transform CalculatorLaplace transform of f(t) with the table rule used for each term and the region of convergence.Limit CalculatorEvaluate limits at a point or at infinity, one-sided or two-sided, with steps, table and graph.Linear Interpolation CalculatorInterpolate or extrapolate y for any x from two points or a data table, with steps and a plot.Matrix Inverse CalculatorFind the inverse of a 2×2 to 8×8 matrix in exact fractions with Gauss–Jordan or adjugate steps.Partial Derivative CalculatorPartial derivatives ∂/∂x, ∂/∂y, second and mixed orders with steps, gradient and Hessian.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Taylor Series CalculatorTaylor and Maclaurin polynomials of any f(x) to order n, with exact coefficients and a graph.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.Extended Euclidean Algorithm CalculatorFind gcd(a, b) and Bézout coefficients x, y with the full step-by-step division table.Factor Tree GeneratorDraw the prime factor tree of any number as a printable diagram, with exponent form and steps.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.X and Y Intercept CalculatorFind the x- and y-intercepts of lines, curves and functions with steps and a graph.Line Intersection CalculatorFind where two lines cross from equations, points or slopes, with parallel checks and a graph.Linear Programming SolverSolve max/min linear programs with the simplex method: tableau steps and a 2-variable graph.Modular Exponentiation CalculatorCompute a^b mod m for huge numbers with square-and-multiply steps (BigInt).Modular Inverse CalculatorFind a⁻¹ mod m with the extended Euclidean algorithm, step by step, for huge numbers too.Nth Term CalculatorFind the nth term formula of a sequence: arithmetic, geometric, quadratic or cubic.Perpendicular Line CalculatorEquation of the perpendicular and parallel line through a point, with distance and a graph.Polar Graphing CalculatorGraph polar equations r = f(θ): roses, cardioids, spirals, with a θ range slider and PNG export.Polynomial CalculatorAdd, subtract, multiply, divide and evaluate polynomials; see roots, degree and a graph.Scale Factor CalculatorScale factor between similar figures, plus scaled lengths, areas (k²) and volumes (k³).
    See all 74 Algebra & Calculus Calculators →