01 / 21

Integration Techniques:
Long Division & Completing the Square

Master two powerful algebraic tools that transform difficult rational integrands into forms you can integrate directly.

AP Calculus AB

Why Do We Need Algebraic Manipulation?

Not every integral fits a basic formula. When you encounter a rational function where the degree of the numerator is greater than or equal to the degree of the denominator, or a quadratic in the denominator that isn't a perfect square, standard rules fail. You need to rewrite the integrand first.

Two Essential Techniques

Polynomial Long Division
Use when \(\deg(\text{numerator}) \geq \deg(\text{denominator})\). Divide to get a polynomial plus a proper fraction.
Completing the Square
Use when the denominator is an irreducible quadratic. Rewrite to match \(\arctan\) or \(\arcsin\) forms.

Decision Flowchart

Rational integrand?
\(\deg(\text{num}) \geq \deg(\text{den})\)?
Yes Long Division then integrate No Quadratic in denominator? Yes Complete the Square No Other technique

The Long Division Rule

After dividing, integrate term by term:

The Completing the Square Rule

This transforms denominators into forms matching these standard integrals:

Arctangent Form
\(\displaystyle\int\frac{du}{u^2+a^2}=\frac{1}{a}\arctan\!\frac{u}{a}+C\)
Arcsine Form
\(\displaystyle\int\frac{du}{\sqrt{a^2-u^2}}=\arcsin\!\frac{u}{a}+C\)

Long Division vs. Completing the Square

Long Division Completing the Square
Trigger \(\deg(\text{num}) \geq \deg(\text{den})\) Irreducible quadratic in denominator
Goal Reduce to proper fraction Match \(\arctan\)/\(\arcsin\) form
Output Polynomial + remainder fraction \((u \pm h)^2 + k^2\) form
Common results \(\ln|x|\), power rule \(\arctan\), \(\arcsin\)

Step-by-Step: Long Division

1
Compare degrees. If \(\deg(\text{numerator}) \geq \deg(\text{denominator})\), proceed.
2
Divide the leading term of the numerator by the leading term of the denominator.
3
Multiply the entire divisor by that result and subtract from the numerator.
4
Repeat until the remainder has degree less than the divisor.
5
Integrate each piece: the polynomial quotient term by term, plus the remainder fraction.

Step-by-Step: Completing the Square

1
Identify the quadratic \(ax^2 + bx + c\) in the denominator.
2
Factor out \(a\) from the first two terms: \(a(x^2 + \frac{b}{a}x) + c\).
3
Add and subtract \(\left(\frac{b}{2a}\right)^2\) inside the parentheses to form a perfect square.
4
Substitute \(u = x + \frac{b}{2a}\) and rewrite the integral.
5
Apply the \(\arctan\) or \(\arcsin\) formula to evaluate.

Example 1: Long Division

1
Divide: \(x^2 \div x = x\). Multiply: \(x(x+1) = x^2 + x\). Subtract: \((x^2+3)-(x^2+x) = -x+3\).
2
Continue: \(-x \div x = -1\). Multiply: \(-1(x+1) = -x-1\). Subtract: \((-x+3)-(-x-1) = 4\).
3
Result: \(\displaystyle\frac{x^2+3}{x+1} = x - 1 + \frac{4}{x+1}\)

Example 2: Cubic Over Linear

Performing long division of \(x^3 \div (x-2)\):

Example 3: Completing the Square

1
Complete the square: \(x^2 + 6x + 13 = (x+3)^2 + 4\)
2
Substitute: Let \(u = x + 3\), so \(du = dx\). The integral becomes \(\displaystyle\int \frac{du}{u^2 + 4}\).
3
Apply arctan formula with \(a = 2\):

Example 4: Numerator Adjustment

1
Complete the square: \(x^2 - 4x + 8 = (x-2)^2 + 4\)
2
Substitute: \(u = x - 2\), \(du = dx\). Integral becomes \(\displaystyle\int \frac{du}{u^2 + 4}\).
3
Result: \(\displaystyle\frac{1}{2}\arctan\!\frac{x-2}{2} + C\)

Example 5: Both Techniques Combined

1
Long division first (degrees are equal): \(\displaystyle\frac{x^2+1}{x^2+4x+8} = 1 + \frac{-4x - 7}{x^2+4x+8}\).
2
Complete the square on the denominator: \(x^2+4x+8 = (x+2)^2 + 4\).
3
Split the remainder: \(\displaystyle\frac{-4x-7}{(x+2)^2+4} = \frac{-4(x+2)+1}{(x+2)^2+4}\).
4
Integrate each piece: \(\displaystyle x - 2\ln\!\left[(x+2)^2+4\right] + \frac{1}{2}\arctan\!\frac{x+2}{2} + C\).

Common Mistakes

✕ Skipping Long Division
Attempting partial fractions or substitution on an improper rational function wastes time and leads to errors.
✕ Arithmetic Errors in CTS
Forgetting to subtract \(\left(\frac{b}{2a}\right)^2\) outside the squared term: you must both add and subtract it.
✕ Forgetting \(\frac{1}{a}\) in Arctan
Writing \(\arctan\frac{u}{a}\) without the \(\frac{1}{a}\) coefficient in front: the formula is \(\frac{1}{a}\arctan\frac{u}{a}\).

Summary of Integration Strategies

Integrand Form Technique Result Pattern
\(\frac{x^3+\cdots}{x+a}\) Long Division Polynomial + \(\ln|x+a|\)
\(\frac{1}{x^2+bx+c}\) Complete the Square \(\frac{1}{a}\arctan\frac{u}{a}\)
\(\frac{1}{\sqrt{c-x^2-bx}}\) Complete the Square \(\arcsin\frac{u}{a}\)
\(\frac{x^2+\cdots}{x^2+bx+c}\) Both: Divide then CTS Mixed: polynomial + \(\ln\) + \(\arctan\)

Question 1 of 5

What is the first step to evaluate \(\displaystyle\int \frac{x^2 + 5}{x - 1}\,dx\)?

Question 2 of 5

Completing the square on \(x^2 + 8x + 20\) gives:

Question 3 of 5

Evaluate \(\displaystyle\int \frac{x^2}{x + 3}\,dx\).

Question 4 of 5

What is \(\displaystyle\int \frac{dx}{x^2 + 2x + 5}\)?

Question 5 of 5

To evaluate \(\displaystyle\int \frac{x^2 + x + 1}{x^2 + 4}\,dx\), what should you do first?