5m left·0%
Reading Time: 5 min
Last Updated: March 17, 2026
Main Ideas: 3
Reading Time: 5 min
Last Updated: March 17, 2026
Main Ideas: 3

Topic 6.10 Notes – Integrating Functions Using Long Division and Completing the Square

Verified for 2027 AP® Calculus AB Exam
Read aloud
When the integrand looks messy, the calculus often isn’t the hard part. The algebra is. Long division and completing the square let you rearrange expressions into familiar antiderivative patterns.

Using Polynomial Long Division

You use long division when the integrand is a rational function
P(x)D(x) \frac{P(x)}{D(x)}
and the degree of the numerator is greater than or equal to the degree of the denominator.

That’s your signal that the fraction can be rewritten as:

polynomial+remainderD(x) \text{polynomial} + \frac{\text{remainder}}{D(x)}

Once it’s split, the integral becomes manageable.

What This Looks Like in Practice

Suppose you’re integrating:

∫x3+2x2−1x−1 dx \int \frac{x^3 + 2x^2 - 1}{x - 1} \, dx

The numerator has degree 3 and the denominator degree 1, so divide. Here’s the setup:

Polynomial long division of (x3+2x2−1)÷(x−1)(x^3 + 2x^2 - 1) \div (x - 1)

After dividing, you get:

x3+2x2−1x−1=x2+3x+3+2x−1 \frac{x^3 + 2x^2 - 1}{x - 1} = x^2 + 3x + 3 + \frac{2}{x - 1}

Now integrate term by term:

  • ∫x2dx=x33 \int x^2 dx = \frac{x^3}{3}
  • ∫3xdx=3x22 \int 3x dx = \frac{3x^2}{2}
  • ∫3dx=3x \int 3 dx = 3x
  • ∫2x−1dx=2ln⁡∣x−1∣ \int \frac{2}{x-1} dx = 2\ln|x-1|

Final answer:

x33+3x22+3x+2ln⁡∣x−1∣+C \frac{x^3}{3} + \frac{3x^2}{2} + 3x + 2\ln|x-1| + C

Notice how the leftover fraction almost always turns into a natural log term.

Things That Cost Points

  • Forgetting to divide when degrees are equal.
  • Dropping the absolute value in ln⁡∣x−1∣ \ln|x-1| .
  • Making small algebra mistakes during division.
  • Trying substitution before simplifying.

On multiple-choice, if answers look like “polynomial + ln term,” that’s often your clue long division was needed.

Completing the Square

This shows up when you see a quadratic that isn’t factorable or a perfect square, especially inside:

  • A denominator
  • A square root
  • Something that resembles an inverse trig pattern

The goal is to rewrite the quadratic so it matches a known inverse trig form.

The Two Forms You Want

From your formula sheet:

∫1x2+a2dx=1aarctan⁡(xa)+C \int \frac{1}{x^2 + a^2} dx = \frac{1}{a}\arctan\left(\frac{x}{a}\right) + C

∫1a2−x2dx=arcsin⁡(xa)+C \int \frac{1}{\sqrt{a^2 - x^2}} dx = \arcsin\left(\frac{x}{a}\right) + C

So you’re trying to turn a messy quadratic into:

  • (x−h)2+a2 (x-h)^2 + a^2 → arctan
  • a2−(x−h)2 a^2 - (x-h)^2 → arcsin

Example with Arctan

Consider:

∫1x2−6x+13dx \int \frac{1}{x^2 - 6x + 13} dx

Here’s the algebra visually, since this is where most mistakes happen:

Completing the square for x2−6x+13x^2 - 6x + 13

Half of −6 is −3. Square it to get 9.

x2−6x+13=(x2−6x+9)+4=(x−3)2+4 x^2 - 6x + 13 = (x^2 - 6x + 9) + 4 = (x - 3)^2 + 4

Now the integral becomes:

∫1(x−3)2+22dx \int \frac{1}{(x-3)^2 + 2^2} dx

This matches the arctan formula with:

  • a=2 a = 2
  • shift x−3 x-3

So the answer is:

12arctan⁡(x−32)+C \frac{1}{2}\arctan\left(\frac{x-3}{2}\right) + C

Definite Integrals

For definite integrals:

  • Do the algebra first.
  • Integrate fully.
  • Plug in bounds carefully.

No +C +C .

With inverse trig answers, use parentheses when evaluating bounds. Calculator sections often include these because evaluating arctan or arcsin numerically is expected.

Strategy Pattern You Should See

When stuck, ask:

  1. Is this a rational function with numerator degree ≥ denominator?
    → Long division.
  2. Is there a quadratic that won’t factor nicely?
    → Complete the square.
  3. Does the result resemble x2+a2 x^2 + a^2 or a2−x2 a^2 - x^2 ?
    → Inverse trig.

The calculus part is familiar. The rearranging is the skill.

Key Takeaways

If degree(numerator) ≥ degree(denominator), divide before integrating.
Long division usually leads to a polynomial plus a ln⁡∣g(x)∣ \ln|g(x)| term.
Completing the square rewrites quadratics into (x−h)2+a2 (x-h)^2 + a^2 or a2−(x−h)2 a^2 - (x-h)^2 .
∫1x2+a2dx=1aarctan⁡(xa)+C \int \frac{1}{x^2 + a^2}dx = \frac{1}{a}\arctan\left(\frac{x}{a}\right) + C .
Always use absolute value in natural log answers.
For definite integrals, no +C +C , and evaluate inverse trig carefully with parentheses.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining