SECTION 1
Historical Context & Motivation
Integration is often described as the inverse of differentiation, but in practice the two operations are far from symmetric. While differentiation follows straightforward, mechanical rules—product rule, chain rule, quotient rule—integration frequently demands algebraic ingenuity before any antidifferentiation can begin. Historically, mathematicians recognized that rational functions (ratios of polynomials) are among the most common integrands in science and engineering, yet many of them resist direct application of basic integration formulas. The challenge of evaluating these integrals drove the development of powerful algebraic preprocessing techniques, including polynomial long division and completing the square.
~250 CE • Diophantus & Rational Expressions
~825 CE • Al-Khwārizmī & Completing the Square
1668 • Mercator's Logarithmic Series
1690s • Leibniz & the Bernoullis Formalize Integration Techniques
The central question these techniques address is deceptively simple: How do we integrate a rational function whose numerator has degree greater than or equal to the denominator, or whose denominator is an irreducible quadratic? Neither the power rule nor the basic logarithmic or arctangent formulas apply directly in these cases. Long division and completing the square are the algebraic bridges that transform these integrals into forms we can evaluate with confidence.
SECTION 2
Core Principles & Definitions
Before diving into computation, it is essential to understand why these algebraic techniques are necessary and when each one applies. Both methods rest on a single strategic idea: rewrite the integrand so that every resulting term matches a known antiderivative formula. The key is recognizing which transformation to apply based on the structure of the rational expression.
Proper vs. Improper Rational Functions
Polynomial Long Division
Completing the Square
Target Antiderivative Forms
KEY TAKEAWAY
SECTION 3
Visual Explanation
Decision Flowchart: Which Technique to Apply
The flowchart above captures the essential decision logic. When you encounter an integral of the form ∫P(x)/Q(x) dx, your first diagnostic question is always about degree: if the numerator's degree meets or exceeds the denominator's, polynomial long division is mandatory. After division, or if the fraction is already proper, examine the denominator. A factorable denominator often leads to partial fractions (a topic for another lesson), but an irreducible quadratic denominator calls for completing the square to reveal an arctangent or logarithmic antiderivative.
SECTION 4
Mathematical Framework
Technique 1: Polynomial Long Division for Integration
When deg(P) ≥ deg(Q), we divide P(x) by Q(x) to obtain a polynomial quotient S(x) and a remainder R(x) with deg(R) < deg(Q). This decomposition is analogous to writing 7/3 as 2 + 1/3 in arithmetic—separating the 'whole' part from the fractional part.
LONG DIVISION DECOMPOSITION
where S(x) is the polynomial quotient, R(x) is the remainder with deg(R) < deg(Q), and R(x)/Q(x) is a proper fraction.
INTEGRATION AFTER DIVISION
The first integral is evaluated term by term using the power rule. The second integral, now a proper fraction, may yield to basic formulas, u-substitution, or completing the square.
Technique 2: Completing the Square for Integration
When the denominator is a quadratic expression that does not factor over the reals (its discriminant b² − 4ac < 0), completing the square transforms it into a sum-of-squares form. This is critical because the standard arctangent antiderivative formula requires the integrand to have the shape 1/(u² + a²).
COMPLETING THE SQUARE
Often written as a(x − h)² + k, where h = −b/(2a) and k = c − b²/(4a). The expression inside the brackets becomes a shifted perfect square plus a constant.
ARCTANGENT INTEGRAL FORMULA
This formula is the payoff of completing the square. After the algebraic transformation, u represents the shifted variable (x − h) and a² is the constant k/a from the completed-square form.
AP Exam Tip
SECTION 5
Detailed Breakdown of Each Technique
Long Division: Step-by-Step Procedure
- Step 1: Confirm that deg(P) ≥ deg(Q). If the fraction is already proper, skip to completing the square or another technique.
- Step 2: Divide the leading term of P(x) by the leading term of Q(x) to get the first term of the quotient S(x).
- Step 3: Multiply Q(x) by this term and subtract from P(x). The result is a new, lower-degree polynomial.
- Step 4: Repeat Steps 2–3 with the new polynomial until the remainder has degree strictly less than deg(Q).
- Step 5: Write the original fraction as S(x) + R(x)/Q(x) and integrate each piece separately.
Completing the Square: Step-by-Step Procedure
- Step 1: If a ≠ 1, factor a from the x² and x terms: a(x² + (b/a)x) + c.
- Step 2: Take half the coefficient of x, square it: (b/(2a))².
- Step 3: Add and subtract this value inside the parentheses, then group the perfect square trinomial.
- Step 4: Write the result as a(x + b/(2a))² + (c − b²/(4a)). Identify u = x + b/(2a) and a² = (c − b²/(4a))/a for the arctangent formula.
SECTION 6
Worked Examples
Example 1: Long Division then Integration
Evaluate ∫ (x³ + 2x² + 3x + 5)/(x² + 1) dx
- 1
Step 1 — Check Degrees
The numerator has degree 3 and the denominator has degree 2. Since 3 ≥ 2, the rational function is improper, so we must perform polynomial long division first. - 2
Step 2 — Perform Long Division
Divide x³ + 2x² + 3x + 5 by x² + 1. First, x³ ÷ x² = x. Multiply: x(x² + 1) = x³ + x. Subtract: (x³ + 2x² + 3x + 5) − (x³ + x) = 2x² + 2x + 5. Next, 2x² ÷ x² = 2. Multiply: 2(x² + 1) = 2x² + 2. Subtract: (2x² + 2x + 5) − (2x² + 2) = 2x + 3. Since deg(2x + 3) = 1 < 2 = deg(x² + 1), we stop.(x³ + 2x² + 3x + 5)/(x² + 1) = x + 2 + (2x + 3)/(x² + 1) - 3
Step 3 — Split the Integral
∫ (x³ + 2x² + 3x + 5)/(x² + 1) dx = ∫ (x + 2) dx + ∫ (2x + 3)/(x² + 1) dx. The first integral is straightforward. For the second, split the fraction: ∫ 2x/(x² + 1) dx + ∫ 3/(x² + 1) dx. - 4
Step 4 — Evaluate Each Piece
∫ (x + 2) dx = x²/2 + 2x. For ∫ 2x/(x² + 1) dx, use u-substitution with u = x² + 1, du = 2x dx, yielding ln|x² + 1| = ln(x² + 1) (since x² + 1 > 0). For ∫ 3/(x² + 1) dx, this matches the arctangent formula directly: 3 arctan(x). - 5
Step 5 — Combine
Combine all parts and append the constant of integration.x²/2 + 2x + ln(x² + 1) + 3 arctan(x) + C
Example 2: Completing the Square then Integration
Evaluate ∫ 1/(x² + 4x + 13) dx
- 1
Step 1 — Check for Irreducibility
The discriminant is b² − 4ac = 16 − 52 = −36 < 0. Since the discriminant is negative, x² + 4x + 13 does not factor over the reals and is an irreducible quadratic. We need to complete the square. - 2
Step 2 — Complete the Square
Take half the coefficient of x: 4/2 = 2. Square it: 2² = 4. Write x² + 4x + 13 = (x² + 4x + 4) + 9 = (x + 2)² + 9. Equivalently, (x + 2)² + 3².x² + 4x + 13 = (x + 2)² + 3² - 3
Step 3 — Apply the Arctangent Formula
With u = x + 2 and a = 3, we apply ∫ 1/(u² + a²) du = (1/a) arctan(u/a) + C. - 4
Step 4 — Write the Final Answer
Substitute back u = x + 2 and a = 3.(1/3) arctan((x + 2)/3) + C
SECTION 7
Comparing the Two Techniques
Although long division and completing the square both serve as algebraic preprocessing steps, they address fundamentally different structural issues in the integrand. Understanding when to use each—and when you might need both in sequence—is essential for efficient problem solving on the AP exam.
| Feature | Polynomial Long Division | Completing the Square |
|---|---|---|
| When to use | deg(numerator) ≥ deg(denominator) | Denominator is an irreducible quadratic |
| What it produces | Polynomial + proper fraction | Sum-of-squares form (x − h)² + k |
| Target antiderivative | Power rule (for quotient), then other rules for remainder | Arctangent: (1/a) arctan(u/a) + C |
| Common errors | Sign errors during subtraction; forgetting to integrate the remainder | Dropping the constant; incorrect identification of u and a |
| AP exam frequency | Moderate — appears in both MCQ and FRQ | Moderate — often a single step within a larger FRQ |
Side-by-side comparison of long division and completing the square integration techniques
KEY TAKEAWAY
SECTION 8
Connection to Partial Fractions & BC Topics
Long division and completing the square are foundational techniques that connect naturally to more advanced integration methods. In AP Calculus BC and college-level integral calculus, these tools become the first steps in the broader method of partial fraction decomposition. After performing long division to make a fraction proper, partial fractions further decomposes the remainder into simpler pieces—linear factors yield logarithmic integrals, while irreducible quadratic factors require completing the square to produce arctangent integrals. The techniques you have learned in this lesson are therefore not isolated tricks but permanent entries in your integration toolkit.
| This Lesson (AB) | Extension (BC / College) |
|---|---|
| Long division to reduce improper fractions | Long division as the mandatory first step before partial fraction decomposition |
| Completing the square for 1/(ax² + bx + c) | Completing the square for irreducible quadratic factors within partial fractions |
| Result: arctan and ln antiderivatives | Extended: also inverse hyperbolic functions and improper integrals with these forms |
| Constant numerators over irreducible quadratics | Linear (Ax + B) numerators over irreducible quadratics, requiring splitting into ln and arctan parts |
How AB-level techniques extend into BC and beyond
Understanding long division and completing the square thoroughly now will pay dividends if you continue to BC or multivariable calculus. These algebraic manipulations also appear when evaluating Laplace transforms in engineering and when computing residues in complex analysis—further evidence that the preprocessing mindset you develop here is a durable mathematical habit.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
- A. ∫ 1/(x² + 4) dx
- B. ∫ x/(x² + 1) dx
- C. ∫ (x² + 3)/(x + 1) dx
- D. ∫ 3/(x² − 2x + 5) dx
- E. ∫ (2x + 1)/(x² + x + 1) dx
Show answer (C)
Question 2: BASIC CALCULATION
- A. x²/2 + 2x + 5 ln|x − 2| + C
- B. x²/2 + 2x + ln|x − 2| + C
- C. x²/2 − 2x + 5 ln|x − 2| + C
- D. x²/2 + 2x − 5 ln|x − 2| + C
- E. x² + 2x + 5 ln|x − 2| + C
Show answer (A)
Question 3: INTERMEDIATE
- A. (1/3) arctan((x − 3)/3) + C
- B. (1/9) arctan((x − 3)/9) + C
- C. (1/3) arctan((x + 3)/3) + C
- D. arctan((x − 3)/3) + C
- E. (1/3) ln|x² − 6x + 18| + C
Show answer (A)
Question 4: APPLIED
5 ptsShow answer
Question 5: CRITICAL THINKING
4 ptsShow answer
SUMMARY
Lesson Summary
Summary
Integrating rational functions often requires algebraic preprocessing before any antiderivative formula can be applied. When the rational function is improper (the numerator's degree is greater than or equal to the denominator's degree), polynomial long division decomposes it into a polynomial quotient plus a proper remainder fraction. The polynomial quotient integrates easily via the power rule, while the remainder may require further techniques.
When a proper fraction has an irreducible quadratic denominator (one whose discriminant is negative), completing the square rewrites the denominator in the form (x − h)² + a², enabling direct application of the arctangent integration formula: ∫ 1/(u² + a²) du = (1/a) arctan(u/a) + C. Together, these two algebraic techniques transform a wide class of otherwise intractable integrands into standard forms, and they serve as essential building blocks for the method of partial fraction decomposition encountered in AP Calculus BC and beyond.