Tutorials › Calculus II › Decomposing And Integrating A Mixed-Factor Rational Function

Partial Fractions Foundations · Tutorial 200 of 998

Decomposing And Integrating A Mixed-Factor Rational Function

Build a mixed partial-fraction decomposition from its denominator factors, solve its coefficients, and integrate the resulting logarithmic, reciprocal, and arctangent terms.

Beginner 9 min read

What You'll Learn

  • Set up the partial-fraction terms required by repeated linear and irreducible quadratic factors.
  • Clear denominators to turn a decomposition into a polynomial identity.
  • Find coefficients using substitutions and coefficient comparison.
  • Integrate the resulting linear-factor and quadratic-factor terms.
  • Check a decomposition by recombining it and check an antiderivative by differentiation.

From a Mixed Denominator to an Integral

A rational function can be difficult to integrate in its original form even when its denominator factors into familiar pieces. Partial fractions replace it with a sum of simpler terms, each matched to one denominator factor. When a linear factor is repeated and an irreducible quadratic factor is also present, the decomposition must include terms for every power of each factor.

Here we work with proper rational functions: the numerator has lower degree than the denominator. We factor the denominator over the real numbers, construct the required decomposition, determine its coefficients, and integrate term by term. We will check both the decomposition and the resulting antiderivative.

Definition: A rational function \(P(x)/D(x)\) is proper if \(P\) and \(D\) are polynomials and \(\deg P<\deg D\). A real quadratic is irreducible over the reals if it has no real roots. The partial-fraction form for a repeated linear factor \((x-a)^m\) and a repeated irreducible quadratic factor \(Q(x)^n\) includes one term for every power: \(A_j/(x-a)^j\) for \(1\le j\le m\), and \((C_jx+D_j)/Q(x)^j\) for \(1\le j\le n\).

The numerator over a quadratic factor is linear, not just constant: its degree must be less than the degree of the quadratic. The decomposition’s coefficients are constants, and some may be zero. After finding them, integrate the terms separately. Linear factors produce logarithms or reciprocal powers; quadratic terms may produce logarithms and arctangents, depending on their numerators.

Why Clearing the Denominator Works

Suppose a proposed decomposition is an identity of rational functions wherever the denominators are nonzero. Multiplying both sides by their common denominator gives a polynomial equation. Conversely, if that polynomial equation holds, dividing by the common denominator recovers the rational-function identity at every point where the original denominator is nonzero.

This gives a practical coefficient-solving method: clear denominators, expand, and match coefficients of equal powers of \(x\). Substituting a root of a factor can also isolate a coefficient. In particular, if the linear factor is repeated, substitution at its root isolates the coefficient of the highest reciprocal power. These are ways of solving the same polynomial identity, not extra assumptions about the function.

Key justification: Two polynomials that agree for every \(x\) where the denominator is nonzero agree as polynomials: their difference has infinitely many roots, so it must be the zero polynomial. Therefore matching all coefficients proves the decomposition, rather than merely checking a selection of numerical values.

Worked Decomposition and Integration

Worked Example: A Repeated Linear Factor and a Quadratic

Integrate the proper rational function

$$ \int \frac{5x^3-5x^2-3x+1}{(x-1)^2(x^2+1)}\,dx. $$

The numerator has degree \(3\), while the denominator has degree \(4\), so the function is proper. Since \(x^2+1\) has no real roots, use the form

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

Multiply by \((x-1)^2(x^2+1)\):

$$ 5x^3-5x^2-3x+1 = A(x-1)(x^2+1)+B(x^2+1)+(Cx+D)(x-1)^2. $$

Set \(x=1\). The terms with \(A,C,D\) vanish, giving \(-2=2B\), so \(B=-1\). Expanding the remaining identity gives the coefficient equations

$$ A+C=5,\qquad -A+B+D-2C=-5,\qquad A+C-2D=-3,\qquad -A+B+D=1. $$

Using \(B=-1\), the constant equation gives \(-A-1+D=1\), hence \(D-A=2\). The cubic equation gives \(C=5-A\). Substitution in the linear equation gives \(A+(5-A)-2D=-3\), so \(D=4\), then \(A=2\) and \(C=3\). The quadratic equation checks: \(-2-1+4-6=-5\).

Thus the decomposition is

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

Integrate term by term. In the last term, split the numerator as \(3x+4=3x+4\): the \(3x\) part gives a logarithm, and the constant part gives an arctangent.

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

Therefore an antiderivative is

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

Check the decomposition: Combining its numerators over the common denominator gives \(2(x-1)(x^2+1)-(x^2+1)+(3x+4)(x-1)^2\). Expanding gives \(5x^3-5x^2-3x+1\), as required.

Check the antiderivative: Differentiating \(F\) gives \(2/(x-1)-1/(x-1)^2+3x/(x^2+1)+4/(x^2+1)\), exactly the decomposition.

A Shifted Quadratic Factor

Worked Example: Using a Shifted Variable

Integrate

$$ \int \frac{6x^3+38x^2+82x+63}{(x+2)^2(x^2+4x+5)}\,dx. $$

The denominator has degree \(4\), greater than the numerator’s degree \(3\). Set \(t=x+2\); then \(x=t-2\) and \(x^2+4x+5=t^2+1\). Substitution in the numerator gives \(6(t-2)^3+38(t-2)^2+82(t-2)+63=6t^3+2t^2+2t+3\). The decomposition in \(t\) has the form

$$ \frac{6t^3+2t^2+2t+3}{t^2(t^2+1)} = \frac{A}{t}+\frac{B}{t^2}+\frac{Ct+E}{t^2+1}. $$

Clearing the denominator gives \(6t^3+2t^2+2t+3=A t(t^2+1)+B(t^2+1)+(Ct+E)t^2\). Matching the coefficients of \(t^3,t^2,t,1\), in that order, gives \(A+C=6,\ B+E=2,\ A=2,\ B=3\). Thus \(A=2,\ B=3,\ C=4,\ E=-1\). Returning to \(x\),

$$ \frac{6x^3+38x^2+82x+63}{(x+2)^2(x^2+4x+5)} = \frac{2}{x+2}+\frac{3}{(x+2)^2}+\frac{4x+7}{x^2+4x+5}. $$

For the quadratic term, write \(4x+7=2(2x+4)-1\), where \(2x+4\) is the derivative of \(x^2+4x+5\). Also \(x^2+4x+5=(x+2)^2+1\). Hence

$$ \int \frac{4x+7}{x^2+4x+5}\,dx = 2\ln(x^2+4x+5)-\arctan(x+2). $$

The complete antiderivative is

$$ F(x)=2\ln|x+2|-\frac{3}{x+2} +2\ln(x^2+4x+5)-\arctan(x+2)+C. $$

Check the decomposition: In the variable \(t\), recombination gives \(2t(t^2+1)+3(t^2+1)+(4t-1)t^2=6t^3+2t^2+2t+3\). This is the transformed numerator, so the identity holds.

Check the antiderivative: Its derivative is \(2/(x+2)+3/(x+2)^2+(4x+7)/(x^2+4x+5)\). For the reciprocal term, \(\frac{d}{dx}[-3/(x+2)]=3/(x+2)^2\). The derivative matches the decomposition.

Adding a Simple Linear Factor

Worked Example: Three Types of Factors

Consider the integral

$$ \int\frac{6x^4-9x^3+x^2-7x+1}{(x-1)^2(x+1)(x^2+1)}\,dx. $$

The denominator has degree \(5\), and the numerator has degree \(4\). The denominator contains a repeated linear factor, a simple linear factor, and an irreducible quadratic. Use

$$ \frac{6x^4-9x^3+x^2-7x+1}{(x-1)^2(x+1)(x^2+1)} = \frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x+1}+\frac{Dx+E}{x^2+1}. $$

After clearing denominators,

$$ P(x)=A(x-1)(x+1)(x^2+1)+B(x+1)(x^2+1) +C(x-1)^2(x^2+1)+(Dx+E)(x-1)^2(x+1), $$

where \(P(x)=6x^4-9x^3+x^2-7x+1\). At \(x=1\), \(P(1)=-8=4B\), so \(B=-2\). At \(x=-1\), \(P(-1)=24=8C\), so \(C=3\).

For the remaining coefficients, expand the terms involving \(A,D,E\), together with the known \(B,C\). Coefficient comparison gives

$$ A+D=3,\qquad E-D=-1,\qquad D+E=3. $$

The last two equations give \(D=2\) and \(E=1\); then \(A=1\). The constant coefficient also checks: \(-A+B+C+E=-1-2+3+1=1\). Therefore

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

Integrating each term gives

$$ F(x)=\ln|x-1|+\frac{2}{x-1}+3\ln|x+1| +\ln(x^2+1)+\arctan x+C. $$

Check the decomposition: Recombining the numerators produces \((x^4-1)-2(x^3+x^2+x+1)+3(x^4-2x^3+2x^2-2x+1)+(2x+1)(x^3-x^2-x+1)\). Adding like powers gives \(6x^4-9x^3+x^2-7x+1\).

Check the antiderivative: Differentiation gives \(1/(x-1)-2/(x-1)^2+3/(x+1)+(2x+1)/(x^2+1)\), the displayed decomposition.

Integration Rules and Their Conditions

The examples use standard antiderivatives. The logarithm rule applies to a nonzero linear expression on an interval where it does not vanish. For the positive quadratic \(x^2+1\), the logarithm and arctangent expressions are defined for all real \(x\). More generally, the domain of the original rational function excludes every real zero of its denominator, so an antiderivative is considered on an interval that does not cross such a zero.

$$ \int \frac{1}{x-a}\,dx=\ln|x-a|+C,\qquad \int \frac{1}{(x-a)^2}\,dx=-\frac{1}{x-a}+C, $$ $$ \int\frac{Q'(x)}{Q(x)}\,dx=\ln|Q(x)|+C,\qquad \int\frac{1}{(x-h)^2+s^2}\,dx =\frac{1}{s}\arctan\!\left(\frac{x-h}{s}\right)+C \quad(s>0). $$

In a quadratic numerator, first separate a multiple of the derivative of the denominator from the remaining constant. For example, in \(4x+7\) over \(x^2+4x+5\), the derivative is \(2x+4\), and \(4x+7=2(2x+4)-1\). This separation identifies the logarithmic part and leaves a constant-over-quadratic part for the arctangent.

Common Pitfall: Omitting a Repeated-Factor Term

A repeated factor requires terms for each of its powers. For \((x-1)^2\), writing only \(A/(x-1)\) is incomplete. In the first example, that omission would require the entire numerator to be expressible as \(A(x-1)(x^2+1)+(Cx+D)(x-1)^2\). Every term on the right is zero at \(x=1\), but the actual numerator at \(x=1\) is \(-2\). The proposed identity cannot hold.

The missing term \(B/(x-1)^2\) contributes \(B(x^2+1)\) after clearing denominators, which need not vanish at \(x=1\). The substitution then gives \(2B=-2\), so \(B=-1\). This concrete check explains why every power in the repeated factor must have its own term.

Why the Decomposition Is Useful

The decomposition turns one complicated fraction into terms whose antiderivatives are recognizable. Just as importantly, the polynomial identity gives a reliable check: recombination must recover the original numerator exactly. Differentiating the final expression gives a second, independent check that the integration was carried out correctly.

Takeaway: Factor the denominator, include terms for every power of each factor, clear denominators to solve for coefficients, and integrate the resulting terms on intervals that avoid the denominator’s real zeros.

Check Your Understanding

Use the factor structure and checks in this tutorial to answer the following questions.

  1. What terms belong in the decomposition for a denominator containing \((x-3)^2(x^2+4)^2\)?
  2. Why does multiplying a proposed decomposition by the common denominator produce a polynomial identity?
  3. For \(x^2+4x+5\), what is its derivative, and how can that help integrate a linear numerator over it?
  4. Why is a decomposition for a denominator containing \((x-1)^2\) incomplete if it includes only \(A/(x-1)\)?
  5. What two checks can be used after finding an antiderivative by partial fractions?

Test yourself: Calculus II final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon