Splitting a fraction into partial fractions rewrites one complicated rational function as a sum of simple fractions. Each simple piece has an antiderivative you already know: a term over a linear factor integrates to a logarithm, a term over a repeated linear factor integrates to a power, and a term over an irreducible quadratic integrates to a logarithm plus an arctangent. The hard integral disappears because the pieces are already easy.

This explainer pairs with the partial fraction decomposition calculator, which runs the same algebra on any rational function you type in. Zoom out on the calculus foundations pillar, or follow the AP Calculus AB bridge if integration techniques are the current step.

The intuition: reversing a step you already know

Adding fractions over a common denominator is routine: $1/(x+1) + 1/(x-1)$ becomes $2x/((x+1)(x-1))$ once you combine them. Partial fraction decomposition runs that step backward. Handed the combined fraction, you recover the two simple pieces that were added to make it.

That reversal only works because of a structural fact about real polynomials: any polynomial with real coefficients factors completely into linear factors and irreducible quadratic factors, possibly repeated. Those are the only two kinds of unbreakable pieces, so the list of possible denominators in the split is short and known in advance. A theorem then guarantees that matching constants exist for each piece. Showing that the constants exist is beyond what this page proves; OpenStax states the result for nonrepeated linear factors directly. What this page shows is how to find those constants once you trust that they exist, and why finding them is worth the trouble: each resulting term is something you can already integrate.

The template for each kind of factor is fixed. A linear factor $(x-r)$ contributes one constant over $(x-r)$. A linear factor raised to the $m$th power contributes $m$ separate constants, one for each power from $1$ up to $m$. An irreducible quadratic factor contributes a linear numerator $Bx+C$ over that quadratic, because a single constant cannot match every proper fraction with that denominator.

Worked example: distinct linear factors

Take $\dfrac{1}{x^2-1}$. The denominator factors as $(x-1)(x+1)$, both factors distinct and linear, so the template is

$$\frac{1}{x^2-1} = \frac{A}{x-1} + \frac{B}{x+1}.$$

Cover up $(x-1)$ and substitute $x=1$ into what remains: the numerator is $1$ and the other factor is $1+1=2$, so $A = 1/2$. Cover up $(x+1)$ and substitute $x=-1$: the numerator is $1$ and the other factor is $-1-1=-2$, so $B = -1/2$. The decomposition is

$$\frac{1}{x^2-1} = \frac{1/2}{x-1} - \frac{1/2}{x+1}.$$

Now the integral is two easy logarithms:

$$\int \frac{dx}{x^2-1} = \frac{1}{2}\ln|x-1| - \frac{1}{2}\ln|x+1| + C = \frac{1}{2}\ln\left|\frac{x-1}{x+1}\right| + C.$$

Check by differentiating: the derivative of the right side is $\dfrac{1}{2(x-1)} - \dfrac{1}{2(x+1)}$, which combines back to $\dfrac{(x+1)-(x-1)}{2(x-1)(x+1)} = \dfrac{1}{x^2-1}$. That matches the original integrand, away from $x=1$ and $x=-1$ where the original fraction was never defined.

Worked example: a repeated linear factor

Take $\dfrac{x+2}{(x-1)^2}$. The factor $(x-1)$ is repeated, so the template needs two terms, one for each power:

$$\frac{x+2}{(x-1)^2} = \frac{A}{x-1} + \frac{B}{(x-1)^2}.$$

Cover up $(x-1)^2$ and substitute $x=1$ into the numerator alone: $1+2=3$, so $B=3$. One substitution cannot find $A$, because covering up the full repeated factor hides it. Multiply the template out instead: $x+2 = A(x-1) + B$. Matching the coefficient of $x$ gives $A=1$, and the constant term then checks: $-A+B = -1+3 = 2$, which agrees. The decomposition is

$$\frac{x+2}{(x-1)^2} = \frac{1}{x-1} + \frac{3}{(x-1)^2}.$$

Integrating term by term, the first piece is a logarithm and the second is a power:

$$\int \frac{x+2}{(x-1)^2}\,dx = \ln|x-1| - \frac{3}{x-1} + C.$$

Differentiating the right side gives $\dfrac{1}{x-1} + \dfrac{3}{(x-1)^2}$, which is the decomposition you started from, so the check holds.

A calculator resting on blank graph paper beside a pencil and a cup of coffee, ready to check an algebra step.
Recombine the pieces by hand before you trust a screen. AI-generated image

Where the arctangent comes from

An irreducible quadratic factor, one with no rational root, keeps its whole denominator and takes a linear numerator $Bx+C$. For $\dfrac{1}{x(x^2+1)}$, the decomposition is $\dfrac{1}{x} - \dfrac{x}{x^2+1}$, and both pieces integrate to logarithms: $\ln|x| - \tfrac{1}{2}\ln(x^2+1) + C$. That example happens to carry no constant term over the quadratic, so no arctangent shows up.

A constant term over an irreducible quadratic does produce one. Split $\dfrac{1}{x^2+1}$ off on its own and its antiderivative is $\arctan(x) + C$, by the same rule OpenStax gives for $\int du/(u^2+a^2)$. When a worked decomposition leaves a term such as $\dfrac{1}{x^2+1}$ after the $x$ part is pulled out and integrated as a logarithm, that leftover constant piece is where the arctangent enters. The checkpoint below walks through a case where both a logarithm and an arctangent appear in the same answer.

Checkpoints

Checkpoint. Decompose $\dfrac{1}{(x-1)(x^2+1)}$ and integrate it, before reading on. The denominator has one linear factor and one irreducible quadratic factor, so the template is $\dfrac{A}{x-1} + \dfrac{Bx+C}{x^2+1}$.

Covering up $(x-1)$ at $x=1$ gives $A = 1/2$. Expanding the template and matching coefficients gives $B=-1/2$ and $C=-1/2$, so $\dfrac{1}{(x-1)(x^2+1)} = \dfrac{1/2}{x-1} - \dfrac{(x+1)/2}{x^2+1}$. Splitting that last term into an $x$ part and a constant part and integrating each piece gives

$$\int \frac{dx}{(x-1)(x^2+1)} = \frac{1}{2}\ln|x-1| - \frac{1}{4}\ln(x^2+1) - \frac{1}{2}\arctan(x) + C.$$

Differentiating that answer and combining the three terms over one denominator returns $\dfrac{1}{(x-1)(x^2+1)}$, the original integrand. If your decomposition differs, recombine your partial fractions over a common denominator and compare the numerator with $1$ before you trust either answer, including this one.

Checkpoint. Say, in one sentence, which kind of factor in a denominator produces a logarithm after integration, which kind produces a power, and which kind can produce an arctangent. If you cannot answer without looking back, reread the template paragraph above before opening the calculator.

Common mistakes

  • Decomposing an improper fraction without dividing first. Partial fractions only apply once the numerator has smaller degree than the denominator; OpenStax requires long division before the split whenever that is not already true.
  • Giving a repeated linear factor only one term. A factor $(x-r)^m$ needs $m$ separate constants, one for each power up to $m$, not one shared constant for the whole power.
  • Writing a plain constant over an irreducible quadratic factor instead of a linear numerator $Bx+C$. A single constant cannot match every proper fraction with that denominator.
  • Dropping the absolute value signs on a logarithm, or forgetting that a fraction with a constant numerator over $x^2+a^2$ integrates to an arctangent rather than another logarithm.
  • Treating a single numeric substitution as a complete proof. Cover up finds one constant at a time; a repeated or quadratic factor still needs coefficient matching, and the full check is recombining every term and comparing it with the original numerator.

Related reading

A telescoping sum uses the same split before the limit is taken: see sequences, series, and when infinite sums make sense, which decomposes $1/(n(n+2))$ by partial fractions. The logistic step in separable differential equations integrates $1/(y(2-y))$ the same way. The short definition is partial fraction decomposition in the glossary, and an inverse Laplace transform on the Laplace transform calculator is often this same split followed by a short table. The Riemann sum calculator estimates a definite integral directly with rectangles; it does not split a fraction first.

Type your own numerator and denominator and compare every step against the work above.

Open the partial fraction decomposition calculator

Citations and further reading

  • OpenStax, Calculus Volume 2, section 3.4, “Partial Fractions,” accessed 2 November 2026. openstax.org
  • MIT OpenCourseWare 18.01SC, Single Variable Calculus, Session 74, “Integration by Partial Fractions,” accessed 2 November 2026. ocw.mit.edu
  • Paul’s Online Math Notes, Calculus II, section 7.4, “Partial Fractions,” accessed 2 November 2026. tutorial.math.lamar.edu

Last reviewed: 2 November 2026.