Calculus · Grade 12 and undergraduate
Integrating with Long Division and Completing the Square
Quick answer
Some integrands match no rule until they are rewritten. When a rational function's numerator has degree at least that of its denominator, long division splits it into a polynomial plus a proper fraction: (x² + 1)/(x + 1) = x − 1 + 2/(x + 1). When a quadratic denominator has no real roots, completing the square turns it into u² + a², and ∫ du/(u² + a²) = (1/a) arctan(u/a) + C. Both steps are algebra done before the calculus starts.
What you'll learn
- Use long division to integrate a top-heavy rational function
- Complete the square in a quadratic denominator
- Integrate 1/(u² + a²) with the arctangent
- Split a linear numerator into a logarithm part and an arctangent part
Rewrite first, then integrate
The integral matches no rule: the numerator is not the derivative of the denominator, and there is no quotient rule for integrals. The way in is algebra. Rewrite the integrand as a sum of pieces that each match a rule, then integrate the pieces.
Two rewrites handle most fractions of polynomials: long division and completing the square.
Long division
When the numerator’s degree is at least the denominator’s, divide:
Check by multiplying back: . Each piece now integrates on sight.
Why dividing is the right move
A fraction whose numerator is at least as big as its denominator is like the improper fraction , which is . Division splits off the whole part, a polynomial, which integrates term by term. What remains has a numerator of lower degree than its denominator, and that is the shape the log rule, substitution and the arctangent need. Divide until the numerator’s degree is less than the denominator’s; then integrate.
Completing the square
A quadratic denominator with no real roots, such as , cannot be factored. Complete the square instead: . With , the integral becomes one the arctangent answers:
The second form follows from the first with .
- y = 1/(x² + 1)
- y = 1/((x + 2)² + 1)
The graph shows why this works: is the curve moved units left, so its antiderivative is moved units left, .
Worked examples
Common mistakes
Practice problems
-
Find .
Answer
Full solution
The numerator factors: , so the fraction is (for ).
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
Dividing gives , so the integrand is .
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
.
-
Find .
Answer
Full solution
Use with .
-
Find .
Answer
Full solution
, so and .
-
Evaluate .
Answer
Full solution
.
-
Find .
Answer
Full solution
The numerator is the derivative of the denominator, so substitute . No arctangent is needed. The absolute value can go, since .
-
A student writes . What went wrong?
Hint
Differentiate the student’s answer. Does it give back the integrand?
Answer
The numerator is not the derivative of the denominator. Completing the square gives .
Full solution
The derivative of the student’s answer is , not .
Instead, , and .
Frequently asked questions
When should I use long division before integrating?
When the numerator's degree is at least the denominator's. Divide first, so that what is left is a polynomial plus a fraction with a smaller numerator.
What is the integral of 1/(x² + a²)?
(1/a) arctan(x/a) + C.
When do I complete the square?
When the denominator is a quadratic with no real roots, such as x² + 4x + 5. Completing the square makes it (x + 2)² + 1, which leads to the arctangent.
What if the numerator is x + 3 instead of 1?
Split it into a multiple of the denominator's derivative, which integrates to a logarithm, plus a constant, which integrates to an arctangent.
How do I know whether to use a logarithm or an arctangent?
If the numerator is a constant multiple of the denominator's derivative, substitute and get a logarithm. If it is a constant over an irreducible quadratic, complete the square and get an arctangent.