Study Guide

Integration with long division and completing the square

AP Calculus ABΒ· AP Calculus AB CED β€” Integration and Accumulation of ChangeΒ· 14 min read

1. Integration of Improper Rational Functions via Long Divisionβ˜…β˜…β˜†β˜†β˜†β± 4 min

🚫 No Calculator

For a rational function , if the degree of the numerator is greater than or equal to the degree of the denominator , the function is called improper. Improper rationals cannot be integrated directly with basic rules, so we use polynomial long division to rewrite them into a form we can integrate.

N(x)D(x)=Q(x)+R(x)D(x),deg⁑(R(x))<deg⁑(D(x))\frac{N(x)}{D(x)} = Q(x) + \frac{R(x)}{D(x)}, \quad \deg(R(x)) < \deg(D(x))

Where is the quotient polynomial and is the remainder. By linearity of integration, we can integrate each term separately using rules you already know.

πŸ“ Worked Example

Evaluate the indefinite integral

  1. 1

    Check degrees: numerator degree is 3, denominator degree is 1. Since , the integrand is improper, so long division is required.

  2. 2

    Divide by : , multiply , subtract to get . Next, , multiply , subtract to get . Next, , multiply , subtract to get remainder . Result:

  3. 3
    x3βˆ’2x2+3xβˆ’4x+1=x2βˆ’3x+6βˆ’10x+1\frac{x^3 - 2x^2 + 3x - 4}{x + 1} = x^2 - 3x + 6 - \frac{10}{x+1}
  4. 4

    Split the integral by linearity of integration:

  5. 5
    ∫(x2βˆ’3x+6βˆ’10x+1)dx=∫x2dxβˆ’3∫xdx+6∫1dxβˆ’10∫1x+1dx\int \left(x^2 - 3x + 6 - \frac{10}{x+1}\right) dx = \int x^2 dx - 3\int x dx + 6\int 1 dx - 10\int \frac{1}{x+1} dx
  6. 6

    Integrate term-by-term to get the final antiderivative:

  7. 7
    x33βˆ’3x22+6xβˆ’10ln⁑∣x+1∣+C\frac{x^3}{3} - \frac{3x^2}{2} + 6x - 10\ln|x+1| + C

2. Completing the Square for Irreducible Quadraticsβ˜…β˜…β˜…β˜†β˜†β± 5 min

🚫 No Calculator

When you have a proper rational function with a quadratic denominator, first calculate the discriminant . If the discriminant is negative, the quadratic is irreducible (cannot be factored over the reals), so we use completing the square to rewrite it to match the inverse tangent antiderivative form.

  1. Factor the leading coefficient out of the first two terms:

  2. Add and subtract inside the parentheses:

  3. Simplify the constant term: , where and

∫1u2+a2du=1aarctan⁑(ua)+C\int \frac{1}{u^2 + a^2} du = \frac{1}{a} \arctan\left(\frac{u}{a}\right) + C
πŸ“ Worked Example

Evaluate the indefinite integral

  1. 1

    Check the discriminant of the denominator: , so the quadratic is irreducible, complete the square.

  2. 2

    Complete the square on the denominator:

  3. 3
    x2+4x+8=(x2+4x+4)+(8βˆ’4)=(x+2)2+22x^2 + 4x + 8 = (x^2 + 4x + 4) + (8 - 4) = (x + 2)^2 + 2^2
  4. 4

    The derivative of the denominator is , so rewrite the numerator as , then split the integral:

  5. 5
    ∫(x+2)+3(x+2)2+4dx=∫x+2(x+2)2+4dx+3∫1(x+2)2+4dx\int \frac{(x+2) + 3}{(x+2)^2 + 4} dx = \int \frac{x+2}{(x+2)^2 + 4} dx + 3\int \frac{1}{(x+2)^2 + 4} dx
  6. 6

    Integrate the first term with substitution: the quadratic is always positive, so we drop the absolute value, giving .

  7. 7

    Integrate the second term using the inverse tangent rule:

  8. 8
    3∫1w2+22dw=32arctan⁑(x+22)+C23\int \frac{1}{w^2 + 2^2} dw = \frac{3}{2}\arctan\left(\frac{x+2}{2}\right) + C_2
  9. 9

    Combine terms to get the final antiderivative:

  10. 10
    12ln⁑(x2+4x+8)+32arctan⁑(x+22)+C\frac{1}{2}\ln(x^2 + 4x + 8) + \frac{3}{2}\arctan\left(\frac{x+2}{2}\right) + C

3. Evaluating Definite Integralsβ˜…β˜…β˜…β˜†β˜†β± 3 min

🚫 No Calculator

Most AP exam questions on this topic ask for a definite integral, which combines the algebraic preprocessing above with the Fundamental Theorem of Calculus, Part 2 (FTC 2): , where is any antiderivative of . Always confirm the integrand is continuous over the entire interval of integration.

πŸ“ Worked Example

Evaluate the definite integral

  1. 1

    Check degrees: numerator degree 2 > denominator degree 1, so long division is required.

  2. 2

    Divide to get the simplified integrand:

  3. 3
    x2+2x+2x+1=x+1+1x+1\frac{x^2 + 2x + 2}{x + 1} = x + 1 + \frac{1}{x+1}
  4. 4

    Find the antiderivative (we can ignore the constant of integration for definite integrals):

  5. 5

    Apply FTC 2 and simplify known values:

  6. 6
    F(2)βˆ’F(0)=(42+2+ln⁑3)βˆ’(0+0+ln⁑1)=4+ln⁑3F(2) - F(0) = \left(\frac{4}{2} + 2 + \ln 3\right) - \left(0 + 0 + \ln 1\right) = 4 + \ln 3

4. AP-Style Concept Checkβ˜…β˜…β˜…β˜…β˜†β± 2 min

🚫 No Calculator

βœ“ Quick check

Test your understanding with these AP-style questions:

  1. Which of the following is the antiderivative of ?

    Reveal answer
    3 β€”

    Correct: After long division, the integrand simplifies to , which integrates to this result.

  2. What is the exact value of ?

    Reveal answer
    1 β€”

    Correct: After long division, completing the square, and applying FTC 2, the exact value is .

5. Common Pitfalls

Wrong move:

Forgetting to check numerator/denominator degrees, trying u-substitution directly on

Why:

Students rush into integration without checking the form, assuming all rational functions work with u-substitution

Correct move:

Always compare degrees first; if numerator degree β‰₯ denominator degree, do long division first

Wrong move:

Incorrectly completing the square for as instead of

Why:

Students forget to multiply the subtracted constant by the leading coefficient when moving it outside parentheses

Correct move:

After completing the square inside the parentheses, multiply the subtracted constant by the leading coefficient before adding to the trailing constant

Wrong move:

Splitting as instead of

Why:

Students do not match the numerator to the derivative of the denominator, leading to an unsolvable integral

Correct move:

Always rewrite the linear numerator as a multiple of the term from completing the square, plus a constant remainder

Wrong move:

Writing the antiderivative of as instead of

Why:

Students mix up derivative and integral rules for inverse tangent

Correct move:

Quickly differentiate your antiderivative to confirm it matches the original integrand

Wrong move:

Reversing bounds when applying FTC 2, calculating instead of

Why:

Students rush on exam day and misremember the order of subtraction

Correct move:

Always write 'F(upper) minus F(lower)' explicitly on your paper before calculating

6. Quick Reference Cheatsheet

Category

Formula/Rule

Notes

Improper Rational Division

Use when

Integral of

Keep absolute value unless argument is always positive

Completing the Square

Use for irreducible quadratics with negative discriminant

Inverse Tangent Integral

Use after completing the square for irreducible denominators

Split Linear Numerator

Rewrite to split into a log term and an arctan term

FTC for Definite Integrals

Always subtract lower bound from upper bound

Drop Absolute Value for Quadratics

Only valid if discriminant is negative (quadratic is always positive)

When this came up on past exams

AI-estimated based on syllabus patterns β€” cross-check with official past papers for accuracy. Use only as revision-focus signals.

  • 2022 Β· MCQ

    Evaluate integral via long division

  • 2023 Β· FRQ

    Definite integral of rational function

What's Next

This topic builds critical algebraic fluency for all integration problems involving rational functions, a core skill for AP Calculus AB. Mastery of long division and completing the square ensures you can rewrite any rational function that cannot be integrated as-written into a sum of simpler functions whose antiderivatives you already know. These skills are required for many higher-weighted topics on the AP exam, including differential equations, area between curves, and volumes of solids of revolution. Without solid command of these preprocessing steps, you will be unable to solve many accumulation, area, and differential equation problems that appear regularly on both multiple-choice and free-response sections.