Integration by Completing the Square
Completing the square is a powerful technique for evaluating integrals involving quadratic expressions in the denominator. By rewriting the quadratic ax2 + bx + c in the form a(x + h)2 + k, we can match the integral to standard forms involving arctan or natural logarithm.
This technique is especially useful when the quadratic cannot be factored over the reals (negative discriminant), leading to an arctangent result. When the discriminant is positive, partial fractions produce a logarithmic result.
The Method
Step 1: Factor out a
Write ax2+bx+c as a(x2+(b/a)x) + c.
Step 2: Complete the Square
Add and subtract (b/(2a))2 inside the bracket.
Step 3: Simplify
Combine constants: a(x+h)2 + k where k = c - b2/(4a).
Step 4: Integrate
If k/a > 0: arctan form. If k/a < 0: partial fractions / ln form.
Standard Integration Results
Arctan Form (Discriminant < 0)
When b2 - 4ac < 0, the quadratic has no real roots and the integral produces an arctangent:
integral dx/(x2 + k2) = (1/k) arctan(x/k) + C
Logarithmic Form (Discriminant > 0)
When b2 - 4ac > 0, the quadratic factors into two linear terms and partial fractions give logarithms:
integral dx/((x-r1)(x-r2)) = (1/(r1-r2)) ln|(x-r1)/(x-r2)| + C
When to Use This Technique
- Integrals of the form 1/(ax2+bx+c) where b is not 0 (otherwise, direct arctan or partial fractions apply).
- When the quadratic in the denominator cannot be easily factored.
- As a preparation step before applying trigonometric substitution.
- For integrals with x in the numerator, split into derivative-of-denominator plus constant parts.
Tips for Success
- Always factor out the leading coefficient a before completing the square.
- Check the discriminant first: b2-4ac determines arctan vs. ln form.
- Don't forget the constant of integration (+C).
- Verify your answer by differentiating the result.