Concept understanding — Integration By Completing Square
Integration by Completing the Square
You can integrate x2+11 or x2−a21 on sight. But a quadratic denominator such as x2+4x+5 fits neither standard form directly. The fix is to rewrite the quadratic as a perfect square plus (or minus) a constant, turning it into a form you already know.
The move
For x2+bx+c, add and subtract (2b)2:
x2+bx+c=(x+2b)2+(c−4b2).
After substituting u=x+2b the integral collapses to ∫u2+k2du or ∫u2−k2du.
Case A — leads to inverse tangent
∫x2+4x+5dx.
Complete the square: x2+4x+5=(x+2)2+1. With u=x+2,
∫u2+1du=tan−1u+C=tan−1(x+2)+C.
Tip
∫u2+a2du=a1tan−1au+C is the workhorse when the constant left over is positive.
Case B — leads to a logarithm
∫x2−6x+5dx.
Here x2−6x+5=(x−3)2−4. With u=x−3 the denominator u2−4 factors, so use partial fractions:
The key idea is to rewrite the integrand by completing the square, then use a trigonometric substitution (secant) to handle the resulting u2−a2 form. The final result is 21(x+2)x2+4x+1−23logx+2+x2+4x+1+C.
Why This Approach Works
When you see a quadratic inside a square root, your first instinct should be to complete the square. That turns the expression into something like (x+h)2±k, which then suggests a trigonometric or hyperbolic substitution. Here, after completing the square, we get (x+2)2−3. That’s a perfect match for the secant substitution: u2−a2 with u=x+2 and a=3. The secant substitution works because sec2θ−1=tan2θ, which lets the square root simplify cleanly.
Let’s walk through it.
Complete the square inside the radical.x2+4x+1=(x2+4x+4)−3=(x+2)2−3.
So the integral becomes
∫(x+2)2−3dx.
Set up the substitution.
Let u=x+2, so du=dx. Then
∫u2−3du.
This is of the form u2−a2 with a=3.
Use the secant substitution.
For u2−a2, the standard trick is u=asecθ, which gives du=asecθtanθdθ.
Here a=3, so let u=3secθ. Then du=3secθtanθdθ.
Now
u2−3=3sec2θ−3=3(sec2θ−1)=3tan2θ=3∣tanθ∣.
For the domain where the original integrand is defined (we’ll assume u≥3 so θ∈[0,π/2)), tanθ≥0, so we can drop the absolute value:
u2−3=3tanθ.
Rewrite the integral in terms of θ.
∫u2−3du=∫(3tanθ)⋅(3secθtanθdθ)=3∫secθtan2θdθ.
Simplify the trigonometric integral.
Use tan2θ=sec2θ−1:
3∫secθ(sec2θ−1)dθ=3∫(sec3θ−secθ)dθ.
Now we need two standard integrals:
∫secθdθ=log∣secθ+tanθ∣+C.
∫sec3θdθ is a classic. Its derivation uses integration by parts:
›Proof
Let I=∫sec3θdθ. Write sec3θ=secθ⋅sec2θ. Integrate by parts: let dv=sec2θdθ, u=secθ. Then v=tanθ, du=secθtanθdθ.
Method: Complete the square, then use a standard formula
To integrate quadratic, rewrite the quadratic as (x+p)2±a2 or a2−(x+p)2 by completing the square, substitute t=x+p, and quote the matching standard integral.
Steps
Step 1: Complete the square on the quadratic under the root, so it becomes (x+p)2+k for some constant k.
Step 2: Substitute t=x+p (so dt=dx); the integral becomes ∫t2±a2dt or ∫a2−t2dt.