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 integral ∫x2+3xdx is solved by completing the square inside the radical, then using a trigonometric substitution (secant) to simplify the expression. The final result is 21(x+23)x2+3x−89logx+23+x2+3x+C.
The key to integrating expressions like x2+3x is to recognize that the quadratic under the square root can be rewritten as a perfect square plus a constant. This is the technique of completing the square. Once we have something like (x+a)2+b or (x+a)2−b, we can use a trigonometric substitution to eliminate the square root.
Why does this work? The identity sec2θ−1=tan2θ is perfect for handling expressions of the form u2−a2, because substituting u=asecθ turns the square root into atanθ, which is a simple trigonometric function. Similarly, sin2 and cos2 handle sums. Here, after completing the square, we get a difference of squares, so secant substitution is the right tool.
Let’s work through it step by step.
Complete the square.
The expression inside the square root is x2+3x. To complete the square, take half of the coefficient of x (which is 23), square it (49), and add and subtract it:
x2+3x=(x2+3x+49)−49=(x+23)2−49.
So the integral becomes:
∫(x+23)2−(23)2dx.
Make a substitution to simplify.
Let u=x+23, so du=dx. Then the integral is:
∫u2−(23)2du.
This is now in the standard form ∫u2−a2du with a=23.
Apply trigonometric substitution.
For u2−a2, we use u=asecθ, so du=asecθtanθdθ. Here a=23, so:
u=23secθ,du=23secθtanθdθ.
Then u2−a2=49sec2θ−49=23sec2θ−1=23tanθ (assuming tanθ≥0 for the principal branch; we’ll handle absolute values later).
The integral becomes:
∫(23tanθ)⋅(23secθtanθ)dθ=49∫secθtan2θdθ.
Simplify the trigonometric integral.
Use the identity tan2θ=sec2θ−1:
49∫secθ(sec2θ−1)dθ=49∫(sec3θ−secθ)dθ.
Now we need to integrate sec3θ and secθ. The integral of secθ is standard: ∫secθdθ=log∣secθ+tanθ∣+C.
For sec3θ, we use integration by parts or a known reduction formula. Let’s do it quickly:
∫sec3θdθ=21secθtanθ+21log∣secθ+tanθ∣+C.
(This can be derived by writing ∫sec3θdθ=∫secθ⋅sec2θdθ and integrating by parts with u=secθ, dv=sec2θdθ.)
Back-substitute to u and then to x.
We have u=23secθ, so secθ=32u. Also, tanθ=sec2θ−1=94u2−1=32u2−49=32u2−a2.
But note: u2−a2 is exactly the original square root we had! So tanθ=32u2−49. …
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.