M
Math Coach Amy
Amy Ferguson Moncure

Calculus BC · Unit 6

Partial Fractions and Completing the Square

Divide first when you need to, split distinct linear factors, and finish a solid quadratic with an arctangent.

Jump to section:

\(\dfrac{px+q}{(x-a)(x-b)}=\dfrac{A}{x-a}+\dfrac{B}{x-b}\)

What to Remember

Divide when the top is at least as tall as the bottom

If the numerator’s degree is greater than or equal to the denominator’s degree, divide first.

Write the integrand as a polynomial plus a proper fraction.

Distinct linear factors split

\(\dfrac{px+q}{(x-a)(x-b)}=\dfrac{A}{x-a}+\dfrac{B}{x-b}\)

Cover one factor, or substitute the root, to find each constant.

Complete the square for a quadratic that does not factor

\(x^2+bx+c=(x+\tfrac{b}{2})^2+\text{a positive number}\) leads to an arctangent, or to a logarithm if the numerator matches the derivative.

Split a numerator that is almost a derivative

Write the numerator as a multiple of the derivative of the denominator, plus a constant leftover. Integrate the two pieces separately.

Level 1

Easy

One division, or two linear factors with easy constants.

Example
Find \(\int \dfrac{x^2+3x+5}{x+1}\,dx\).

The top has higher degree, so divide.

\((x+1)(x+2)=x^2+3x+2\)

\(x^2+3x+5=(x+1)(x+2)+3\)

\(\dfrac{x^2+3x+5}{x+1}=x+2+\dfrac{3}{x+1}\)

\(\dfrac{x^2}{2}+2x+3\ln|x+1|+C\)

Answer: \(\dfrac{x^2}{2}+2x+3\ln|x+1|+C\)

1
Find \(\int \dfrac{5}{(x-2)(x+3)}\,dx\).
Show Answer

\(\dfrac{5}{(x-2)(x+3)}=\dfrac{A}{x-2}+\dfrac{B}{x+3}\)

\(5=A(x+3)+B(x-2)\)

At \(x=2\): \(5=5A\), so \(A=1\).

At \(x=-3\): \(5=-5B\), so \(B=-1\).

\(\ln|x-2|-\ln|x+3|+C\)

Answer: \(\ln\left|\dfrac{x-2}{x+3}\right|+C\)

2
Find \(\int \dfrac{1}{x(x+1)}\,dx\).
Show Answer

\(\dfrac{1}{x(x+1)}=\dfrac{A}{x}+\dfrac{B}{x+1}\)

\(1=A(x+1)+Bx\)

At \(x=0\), \(A=1\). At \(x=-1\), \(B=-1\).

\(\ln|x|-\ln|x+1|+C\)

Answer: \(\ln\left|\dfrac{x}{x+1}\right|+C\)

3
Find \(\int \dfrac{1}{x^2+4x+5}\,dx\).
Show Answer

\(x^2+4x+5=(x+2)^2+1\)

\(u=x+2\)

\(\int \dfrac{1}{u^2+1}\,du\)

\(\arctan(x+2)+C\)

Answer: \(\arctan(x+2)+C\)

4
Find \(\int \dfrac{x+2}{x+4}\,dx\).
Show Answer

\(x+2=(x+4)-2\)

\(\dfrac{x+2}{x+4}=1-\dfrac{2}{x+4}\)

\(x-2\ln|x+4|+C\)

Answer: \(x-2\ln|x+4|+C\)

5
Write \(\dfrac{2x+1}{(x-1)(x+2)}\) as a sum of two proper fractions. Do not integrate yet.
Show Answer

\(2x+1=A(x+2)+B(x-1)\)

At \(x=1\): \(3=3A\), so \(A=1\).

At \(x=-2\): \(-3=-3B\), so \(B=1\).

\(\dfrac{1}{x-1}+\dfrac{1}{x+2}\)

Answer: \(\dfrac{1}{x-1}+\dfrac{1}{x+2}\)

Level 2

Medium

Integrate the split, or scale the arctangent.

Example
Find \(\int \dfrac{2x+1}{(x-1)(x+2)}\,dx\).

From the cover-up step, the split is \(\dfrac{1}{x-1}+\dfrac{1}{x+2}\).

\(\int \dfrac{1}{x-1}\,dx=\ln|x-1|\)

\(\int \dfrac{1}{x+2}\,dx=\ln|x+2|\)

\(\ln|x-1|+\ln|x+2|+C\)

Answer: \(\ln|(x-1)(x+2)|+C\)

1
Find \(\int \dfrac{1}{x^2+2x+5}\,dx\).
Show Answer

\(x^2+2x+5=(x+1)^2+4\)

\(u=x+1\)

\(\int \dfrac{1}{u^2+4}\,du\)

\(\dfrac{1}{2}\arctan\dfrac{u}{2}+C\)

\(\dfrac{1}{2}\arctan\dfrac{x+1}{2}+C\)

Answer: \(\dfrac{1}{2}\arctan\dfrac{x+1}{2}+C\)

2
Find \(\int \dfrac{x+1}{x^2+2x+5}\,dx\).
Show Answer

The numerator is half the derivative of the denominator.

Derivative of the bottom: \(2x+2=2(x+1)\).

\(\dfrac{1}{2}\int \dfrac{2x+2}{x^2+2x+5}\,dx\)

\(\dfrac{1}{2}\ln(x^2+2x+5)+C\)

Answer: \(\dfrac{1}{2}\ln(x^2+2x+5)+C\)

3
Find \(\int \dfrac{x^2}{x+2}\,dx\).
Show Answer

\(x^2=(x+2)(x-2)+4\)

\(\dfrac{x^2}{x+2}=x-2+\dfrac{4}{x+2}\)

\(\dfrac{x^2}{2}-2x+4\ln|x+2|+C\)

Answer: \(\dfrac{x^2}{2}-2x+4\ln|x+2|+C\)

4
Find \(\int \dfrac{3x}{(x-2)(x+1)}\,dx\).
Show Answer

\(3x=A(x+1)+B(x-2)\)

At \(x=2\): \(6=3A\), so \(A=2\).

At \(x=-1\): \(-3=-3B\), so \(B=1\).

\(2\ln|x-2|+\ln|x+1|+C\)

Answer: \(\ln\left|(x-2)^2(x+1)\right|+C\)

5
Evaluate \(\int_2^4 \dfrac{1}{x(x+2)}\,dx\).
Show Answer

\(\dfrac{1}{x(x+2)}=\dfrac{1/2}{x}-\dfrac{1/2}{x+2}\)

Check: \(\dfrac{1}{2}\cdot\dfrac{(x+2)-x}{x(x+2)}=\dfrac{1}{x(x+2)}\).

\(\dfrac{1}{2}\left[\ln x-\ln(x+2)\right]_2^4\)

At 4: \(\ln\dfrac{4}{6}=\ln\dfrac{2}{3}\).

At 2: \(\ln\dfrac{2}{4}=\ln\dfrac{1}{2}\).

\(\dfrac{1}{2}\left(\ln\dfrac{2}{3}-\ln\dfrac{1}{2}\right)\)

\(\dfrac{1}{2}\ln\dfrac{4}{3}\)

Answer: \(\dfrac{1}{2}\ln\dfrac{4}{3}\)

Level 3

Hard

A leftover constant after the logarithm piece, or a denominator with no real roots.

Example
Find \(\int \dfrac{2x+3}{x^2+2x+5}\,dx\).

Derivative of the bottom: \(2x+2\).

\(2x+3=(2x+2)+1\)

\(\int \dfrac{2x+2}{x^2+2x+5}\,dx=\ln(x^2+2x+5)\)

The leftover is \(\int \dfrac{1}{(x+1)^2+4}\,dx\).

\(\dfrac{1}{2}\arctan\dfrac{x+1}{2}\)

\(\ln(x^2+2x+5)+\dfrac{1}{2}\arctan\dfrac{x+1}{2}+C\)

Answer: \(\ln(x^2+2x+5)+\dfrac{1}{2}\arctan\dfrac{x+1}{2}+C\)

1
Find \(\int \dfrac{4x-2}{x^2-x-2}\,dx\).
Show Answer

\(x^2-x-2=(x-2)(x+1)\)

\(4x-2=A(x+1)+B(x-2)\)

At \(x=2\): \(6=3A\), so \(A=2\).

At \(x=-1\): \(-6=-3B\), so \(B=2\).

\(2\ln|x-2|+2\ln|x+1|+C\)

Answer: \(2\ln|(x-2)(x+1)|+C\)

2
Find \(\int \dfrac{x^2+1}{x^2+4}\,dx\).
Show Answer

\(x^2+1=(x^2+4)-3\)

\(\dfrac{x^2+1}{x^2+4}=1-\dfrac{3}{x^2+4}\)

\(x-\dfrac{3}{2}\arctan\dfrac{x}{2}+C\)

Answer: \(x-\dfrac{3}{2}\arctan\dfrac{x}{2}+C\)

3
Evaluate \(\int_0^1 \dfrac{1}{x^2+2x+2}\,dx\).
Show Answer

\(x^2+2x+2=(x+1)^2+1\)

\(\left[\arctan(x+1)\right]_0^1\)

\(\arctan 2-\arctan 1\)

\(\arctan 2-\dfrac{\pi}{4}\)

Answer: \(\arctan 2-\dfrac{\pi}{4}\)

4
Which first step fits \(\int \dfrac{x+1}{x^2+4x+5}\,dx\)?
A. complete the square, then split the numerator
B. partial fractions into linear factors
C. integration by parts with \(u=x+1\)
D. a basic power rule
Show Answer

The denominator \((x+2)^2+1\) has no real linear factors.

Its derivative is \(2x+4\), while the numerator is \(x+1=(x+2)-1\).

Split into a logarithm piece and an arctangent piece.

Answer: A. complete the square, then split the numerator

5
Find \(\int \dfrac{x+1}{x^2+4x+5}\,dx\).
Show Answer

\(x^2+4x+5=(x+2)^2+1\)

\(x+1=(x+2)-1\)

Logarithm piece: \(\dfrac{1}{2}\ln(x^2+4x+5)\).

Leftover: \(-\int \dfrac{1}{(x+2)^2+1}\,dx\).

\(\dfrac{1}{2}\ln(x^2+4x+5)-\arctan(x+2)+C\)

Answer: \(\dfrac{1}{2}\ln(x^2+4x+5)-\arctan(x+2)+C\)

Need help with partial fractions?

Book a Session with Amy