Integration by Partial Fractions
Rational functions, polynomial over polynomial, have a complete integration theory, and partial fractions is its engine. The insight: a complicated quotient like (3x + 5)/(x² − x − 6) is secretly a sum of simple ones each with a single linear factor downstairs:
p(x)/q(x) = A/(x − r₁) + B/(x − r₂) + ⋯
and each simple piece integrates instantly: ∫A/(x − r)dx = A·ln|x − r| + C. The method inverts what common denominators do, instead of combining fractions, it uncombines them. Three stages: make the fraction proper (divide if the numerator's degree is too big), factor the denominator, then find the constants. Every stage is algebra; the calculus at the end is one logarithm rule applied repeatedly.
How to Use This Calculator
Enter numerator and denominator (factored or expanded, both parse). The tool recovers the polynomial coefficients, divides first if the fraction is improper, finds the denominator's roots, and computes each constant by the residue formula A = p(r)/q′(r), the slick form of the cover-up method. You get the full decomposition, the term-by-term integral, and a numeric verification comparing the antiderivative against Simpson's rule on a test interval. Denominators must split into distinct real linear factors; repeated roots and irreducible quadratics are detected and explained rather than mishandled.
Worked Example
∫(3x + 5)/(x² − x − 6) dx. Factor: x² − x − 6 = (x − 3)(x + 2). Posit the decomposition (3x + 5)/((x − 3)(x + 2)) = A/(x − 3) + B/(x + 2). The cover-up method finds each constant by evaluation: cover (x − 3) and set x = 3 → A = (9 + 5)/(3 + 2) = 14/5; cover (x + 2) and set x = −2 → B = (−6 + 5)/(−2 − 3) = 1/5. Then:
∫ = (14/5)·ln|x − 3| + (1/5)·ln|x + 2| + C
Differentiate back and the logs return exactly the two simple fractions, which recombine to the original, the whole method verified in two lines. The second chip runs the most famous case: 1/(x² − 1) decomposes to ½[1/(x − 1) − 1/(x + 1)], integrating to ½ln|(x − 1)/(x + 1)|, a formula that appears verbatim in relativity (rapidity) and chemical kinetics.
The Residue Shortcut
The cover-up method has a calculus-flavored formulation this calculator uses directly: for a distinct root r of q, the constant is A = p(r)/q′(r). Why: near r, q(x) ≈ q′(r)(x − r), so p/q behaves like [p(r)/q′(r)]/(x − r), the constant is the strength of the blow-up at that root. (Readers headed toward complex analysis will recognize the residue of a simple pole; partial fractions is residue calculus's real-variable childhood.) The formula turns decomposition into evaluation: no systems of equations, no matching coefficients, one derivative and one substitution per root, which is why the calculator handles a cubic denominator (fourth chip) as easily as a quadratic.
Common Mistakes to Avoid
- Skipping the division when the fraction is improper. Degree of p ≥ degree of q (third chip) demands polynomial long division first; decomposing an improper fraction directly produces unsolvable constant-matching. The tool divides automatically and shows the split.
- Wrong template for repeated roots. (x − r)² needs A/(x − r) + B/(x − r)², two terms, and the second integrates to −B/(x − r), not a logarithm. This tool's distinct-root method flags such denominators instead of guessing.
- Forcing complex roots into linear terms. x² + 1 doesn't factor over the reals; its term is (Ax + B)/(x² + 1), integrating to logarithms plus arctangent. The calculator detects irreducible quadratics and points to the arctan route.
- Dropping absolute values in the logs. ∫dx/(x − 3) = ln|x − 3|: on the interval x < 3 the plain log is undefined while the integral certainly isn't. The bars aren't decoration, they're the difference between an antiderivative and half of one.
Real-World Applications
Partial fractions is the daily bread of engineering mathematics because the inverse Laplace transform runs on it: transfer functions of circuits, control loops, and mechanical systems are rational functions of s, and recovering the time-domain response means decomposing them exactly as this page does, each simple pole A/(s − r) becoming a mode Ae^(rt). A control engineer reading "poles" off a denominator is doing partial fractions by eye, and stability analysis is the observation that the r's real parts set whether those exponential modes decay.
The logistic differential equation of population biology and epidemiology separates into ∫dy/[y(1 − y)], the second chip's structure, and partial fractions turns it into the two logs that produce the S-curve formula. Chemical kinetics' second-order reactions integrate 1/[(a − x)(b − x)] the same way; pharmacokinetics decomposes multi-compartment models into sums of exponentials via the same residue arithmetic; and computer algebra systems implement precisely this algorithm (division, factoring, residues) as their complete decision procedure for rational integrals, the rare corner of integration that is fully mechanized, which is why it rewards being learned as an algorithm rather than a trick.
Frequently Asked Questions
Why does every simple fraction integrate to a logarithm?
Because A/(x − r) is A·(derivative of (x − r))/(x − r), the pattern u′/u whose antiderivative is ln|u|. The whole method is engineering the integrand into a sum of u′/u shapes; the u-substitution behind it is one shift per root.
How does the calculator factor the denominator?
Numerically: it recovers the polynomial's coefficients by sampling, then finds all roots simultaneously (a Durand–Kerner iteration), keeping the result only when the roots are real and distinct to floating-point tolerance. Factored input like (x−1)(x+2)(x−3) is handled the same way, it's parsed, sampled, and re-factored.
What if the denominator has an irreducible quadratic factor?
Its partial-fraction term is (Ax + B)/(x² + bx + c), integrating to a log (from the Ax part, matching the quadratic's derivative) plus an arctangent (from the constant part, after completing the square). The tool flags these denominators; the arctan route is the standard continuation.
Do the constants always exist and come out unique?
Yes, for a proper fraction with q factored into distinct linear factors, the decomposition exists and is unique (a linear-algebra fact: the simple fractions form a basis). That's why cover-up, residue evaluation, and coefficient-matching always agree: they're computing the same unique answer three ways.
How is this related to telescoping series?
Directly: 1/[n(n+1)] = 1/n − 1/(n+1) is a partial fraction decomposition, and summing it telescopes, the discrete twin of integrating to a difference of logs. Several convergence classics in the series tools are partial fractions in disguise.
Why does my definite integral across a root come out wrong?
Because the integrand has a vertical asymptote there, the integral is improper and may diverge; crossing the singularity naively with F(b) − F(a) is invalid. Integrate on intervals avoiding the roots (as this tool's verification deliberately does), or analyze the improper integral limit by limit.