SECTION 1
Historical Context & Motivation
The problem of computing antiderivatives has occupied mathematicians since the earliest days of calculus. When Isaac Newton and Gottfried Wilhelm Leibniz independently formalized integral calculus in the late seventeenth century, they recognized that many integrands do not present themselves in a form that matches a known differentiation rule. The task of rewriting an integrand—algebraically massaging it until a standard antiderivative formula applies—became a central concern of the discipline. Two algebraic techniques, polynomial long division and completing the square, trace their roots to antiquity and the Islamic Golden Age, respectively, yet they remain indispensable preprocessing steps in modern integration.
c. 825 • Al-Khwārizmī's Al-jabr
1665–1676 • Newton & Leibniz Develop Calculus
1768 • Euler's Integral Tables
1800s • Systematic Integration Methods
Despite centuries of theoretical advancement, the core challenge persists: most functions we encounter in applications—especially rational functions with polynomial numerator degree equal to or exceeding the denominator degree, or expressions involving irreducible quadratics—are not directly integrable by inspection. The question that motivates this lesson is therefore practical: How do we systematically rewrite an integrand so that it matches a form whose antiderivative we already know? Long division and completing the square are two of the most powerful answers.
SECTION 2
Core Principles & Definitions
Both techniques in this lesson serve the same strategic role: they are algebraic preprocessing steps that convert an integrand into a sum of terms, each of which matches a standard antiderivative formula. Neither technique is itself an integration rule; rather, they prepare the way for rules you already know—the power rule, the natural logarithm form, and the arctangent form, among others.
Improper vs. Proper Rational Functions
Polynomial Long Division
Completing the Square
Standard Integral Forms
Synergy of the Two Techniques
KEY TAKEAWAY
SECTION 3
Visual Explanation — Long Division Flow
The following diagram illustrates the decision process and algebraic flow when encountering a rational integrand. Starting from the raw integral, you first assess the degrees of numerator and denominator. If the function is improper, polynomial long division decomposes it. If the remaining denominator contains an irreducible quadratic, completing the square transforms it into a standard form.
Notice how the two techniques occupy different stages of the pipeline. Long division acts first, handling the global structure of the rational function by separating the polynomial part from the proper fractional part. Completing the square then acts locally on the denominator of whatever proper fraction remains, reshaping it to match a standard integral template. This sequential relationship means you should always consider long division before completing the square when both might apply.
SECTION 4
Mathematical Framework
Long Division for Integration
Given a rational function P(x)/Q(x) where deg(P) ≥ deg(Q), the division algorithm for polynomials guarantees the existence of unique polynomials S(x) (the quotient) and R(x) (the remainder) such that the following decomposition holds.
LONG DIVISION DECOMPOSITION
P(x) = numerator polynomial, Q(x) = denominator polynomial, S(x) = quotient polynomial (directly integrable via power rule), R(x)/Q(x) = proper fraction amenable to further techniques.
Because S(x) is a polynomial, its antiderivative is immediate. The remaining proper fraction R(x)/Q(x) may then be integrated via partial fractions, logarithmic forms, or—after completing the square—inverse trigonometric forms.
Completing the Square for Integration
When the denominator of a proper fraction is an irreducible quadratic ax² + bx + c (i.e., b² − 4ac < 0), completing the square rewrites it as a sum of a squared linear term and a constant. This matches the integrands for the arctangent and related inverse trigonometric families.
COMPLETING THE SQUARE
Set u = x + b/(2a) and k² = (c − b²/(4a))/a, so the expression becomes a(u² + k²). The substitution u = x + b/(2a) is a simple shift with du = dx.
STANDARD ARCTANGENT INTEGRAL
This is the primary target form. After completing the square and substituting, most integrals involving irreducible quadratic denominators reduce to this template or a minor variant.
LOGARITHMIC COMPANION FORM
When the numerator is a constant multiple of the derivative of the denominator, the integral is logarithmic. Often you must split the numerator into a part proportional to 2u (yielding ln) and a constant part (yielding arctan).
SECTION 5
Detailed Breakdown of the Two Techniques
Polynomial Long Division — Step by Step
Polynomial long division mirrors arithmetic long division. You divide the leading term of the numerator by the leading term of the denominator, multiply the entire denominator by that quotient term, subtract from the numerator, and repeat until the remainder has degree strictly less than the denominator. The following diagram walks through the division of (x³ + 2x² − x + 3) by (x + 1).
Completing the Square — Algebraic Detail
Consider the quadratic x² + 6x + 13 in a denominator. The discriminant is 6² − 4(1)(13) = 36 − 52 = −16 < 0, confirming the quadratic is irreducible over the reals. To complete the square, take half the coefficient of x (which is 3), square it (9), and add and subtract that value: x² + 6x + 9 + 4 = (x + 3)² + 4. The integral ∫ dx/(x² + 6x + 13) becomes ∫ dx/((x + 3)² + 4), which with the substitution u = x + 3 yields (1/2) arctan((x + 3)/2) + C.
When to Split the Numerator
SECTION 6
Worked Examples
Example 1: Long Division then Integration
Evaluate ∫ (x³ − 3x² + 5x − 1)/(x − 2) dx
- 1
Step 1 — Identify Improper Fraction
The numerator has degree 3 and the denominator has degree 1. Since 3 ≥ 1, this is an improper rational function. We must perform polynomial long division before integrating. - 2
Step 2 — Perform Long Division
Divide x³ − 3x² + 5x − 1 by x − 2. Leading term x³ ÷ x = x². Multiply: x²(x − 2) = x³ − 2x². Subtract: (x³ − 3x² + 5x − 1) − (x³ − 2x²) = −x² + 5x − 1. Next: −x² ÷ x = −x. Multiply: −x(x − 2) = −x² + 2x. Subtract: (−x² + 5x − 1) − (−x² + 2x) = 3x − 1. Next: 3x ÷ x = 3. Multiply: 3(x − 2) = 3x − 6. Subtract: (3x − 1) − (3x − 6) = 5.(x³ − 3x² + 5x − 1)/(x − 2) = x² − x + 3 + 5/(x − 2) - 3
Step 3 — Integrate Term by Term
∫ [x² − x + 3 + 5/(x − 2)] dx = ∫ x² dx − ∫ x dx + ∫ 3 dx + 5 ∫ 1/(x − 2) dx. Apply the power rule to each polynomial term and the logarithmic form to the last term.= x³/3 − x²/2 + 3x + 5 ln|x − 2| + C
Example 2: Completing the Square then Integration
Evaluate ∫ dx/(x² + 4x + 13)
- 1
Step 1 — Verify Proper Fraction & Irreducibility
The numerator has degree 0 and the denominator has degree 2, so the fraction is already proper—no long division is needed. The discriminant is 4² − 4(1)(13) = 16 − 52 = −36 < 0, confirming the denominator is irreducible. - 2
Step 2 — Complete the Square
Take x² + 4x + 13. Half the coefficient of x is 2; squaring gives 4. Write x² + 4x + 4 + 9 = (x + 2)² + 9 = (x + 2)² + 3².x² + 4x + 13 = (x + 2)² + 3² - 3
Step 3 — Substitute and Apply Arctangent Formula
Let u = x + 2, so du = dx. The integral becomes ∫ du/(u² + 3²). By the standard arctangent formula with k = 3, we obtain (1/3) arctan(u/3) + C.∫ dx/(x² + 4x + 13) = (1/3) arctan((x + 2)/3) + C
Example 3: Combined — Long Division then Completing the Square
Evaluate ∫ (x² + 3)/(x² + 2x + 5) dx
- 1
Step 1 — Check Degrees
Both numerator and denominator have degree 2, so deg(P) = deg(Q). The fraction is improper (deg(P) ≥ deg(Q)), and long division is required. - 2
Step 2 — Long Division
Divide x² + 3 by x² + 2x + 5. Leading term x² ÷ x² = 1. Multiply: 1·(x² + 2x + 5) = x² + 2x + 5. Subtract: (x² + 3) − (x² + 2x + 5) = −2x − 2.(x² + 3)/(x² + 2x + 5) = 1 + (−2x − 2)/(x² + 2x + 5) - 3
Step 3 — Complete the Square in the Denominator
x² + 2x + 5 = (x + 1)² + 4 = (x + 1)² + 2². The discriminant 4 − 20 = −16 < 0 confirms irreducibility.x² + 2x + 5 = (x + 1)² + 2² - 4
Step 4 — Split the Numerator and Integrate
Write −2x − 2 = −1·(2x + 2). Note that 2x + 2 is exactly the derivative of x² + 2x + 5 (up to a constant—actually d/dx(x² + 2x + 5) = 2x + 2, a perfect match). So ∫ (−2x − 2)/(x² + 2x + 5) dx = −∫ (2x + 2)/(x² + 2x + 5) dx = −ln|x² + 2x + 5| + C₁. The full integral is therefore:∫ (x² + 3)/(x² + 2x + 5) dx = x − ln(x² + 2x + 5) + C
SECTION 7
Strengths, Limitations & When to Use Each
| Criterion | Long Division | Completing the Square |
|---|---|---|
| When Required | deg(numerator) ≥ deg(denominator) | Irreducible quadratic in denominator |
| Output | Polynomial + proper fraction | Sum-of-squares form: (x − h)² + k² |
| Target Integral Forms | Power rule, ln|x − a|, further partial fractions | (1/k) arctan(u/k), arcsin, logarithmic forms |
| Strengths | Purely mechanical; always reduces degree; prerequisite for partial fractions | Handles integrands no other elementary method can; pairs with trig substitution |
| Limitations | Does not help with proper fractions; result may still need further processing | Only applies to quadratic expressions; requires careful algebra to avoid sign errors |
| Common Error | Forgetting to subtract correctly (sign errors in intermediate steps) | Dropping the constant term after adding/subtracting the square |
Comparison of long division and completing the square as integration tools
KEY TAKEAWAY
SECTION 8
Connection to Advanced Techniques
Long division and completing the square are often gateway steps to more sophisticated integration methods. Understanding where they fit in the larger ecosystem helps you develop strategic fluency—knowing not just how to execute a technique, but when and why to deploy it.
| Foundation Technique | Leads Into | How They Connect |
|---|---|---|
| Long Division | Partial Fraction Decomposition | Long division is a mandatory first step; partial fractions only apply to proper fractions. |
| Completing the Square | Trigonometric Substitution | After completing the square yields u² + a² or a² − u², a trig substitution (u = a tan θ or u = a sin θ) finishes the integral. |
| Completing the Square | Integration involving √(ax² + bx + c) | Radicals of quadratics require completing the square to identify the appropriate trig or hyperbolic substitution. |
| Both Techniques | Laplace Transforms (Diff. Eq.) | Inverse Laplace transforms of rational functions in s require partial fractions (hence long division) and completing the square to match transform table entries. |
In courses beyond Calculus 2, you will encounter these techniques repeatedly—in real and complex analysis, in solving ordinary and partial differential equations, and in applied fields such as signal processing and control theory. Mastering them now builds algebraic fluency that pays compounding returns throughout your mathematical career.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
This lesson covered two essential algebraic preprocessing techniques for integration. Polynomial long division converts improper rational functions (where deg(P) ≥ deg(Q)) into the sum of a directly integrable quotient polynomial and a proper fraction that may be processed further via partial fractions, logarithmic forms, or other methods.
Completing the square transforms an irreducible quadratic denominator ax² + bx + c into the form a(x − h)² + k², enabling the application of the standard arctangent integral (1/k) arctan(u/k) + C. When the numerator is linear, a numerator-splitting strategy separates the integrand into a logarithmic part and an arctangent part. Together, these techniques form the algebraic foundation upon which partial fractions, trigonometric substitution, and many applied methods in differential equations and engineering analysis are built.