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:
∫u2−4du=41logu+2u−2+C=41logx−1x−5+C.
Important
After completing the square, the leftover constant decides the route: positive⇒ inverse tangent; negative⇒ difference of squares ⇒ logarithm via partial fractions. (If the leading coefficient is not 1, factor it out first.)
Note
If the numerator is not constant, e.g. ∫x2+4x+5xdx, first split it to match the derivative of the denominator, then complete the square on what remains.
Completing the square before integrating a quadratic denominator is a named technique in the NCERT Class 12 Integrals chapter, used to route a problem toward either the inverse tangent formula or a logarithmic partial-fraction result. Students searching 'integration by completing the square examples class 12' or 'integral of 1 by x square plus bx plus c' will find this add-and-subtract-(b/2)² method is exactly the standard CBSE board approach.
Concept: U Substitution – Complete the square inside the square root to match a standard form, then use a trigonometric substitution.
Step 1: Complete the square
x2+2x+5=(x+1)2+4.
Let u=x+1, so du=dx. The integral becomes
∫u2+4du.
Step 2: Trigonometric substitution
For u2+a2 with a=2, set u=2tanθ, du=2sec2θdθ. Then
u2+4=4tan2θ+4=2secθ.
The integral is
∫(2secθ)(2sec2θ)dθ=4∫sec3θdθ.
Step 3: Integrate sec3θ
Using the standard reduction:
∫sec3θdθ=21secθtanθ+21log∣secθ+tanθ∣+C.
Thus
4∫sec3θdθ=2secθtanθ+2log∣secθ+tanθ∣+C.
Step 4: Back-substitute
tanθ=2u, secθ=2u2+4. So
secθtanθ=4uu2+4,
and
secθ+tanθ=2u2+4+u.
Therefore
∫u2+4du=2uu2+4+2log2u2+4+u+C.
Replace u=x+1 and simplify the constant:
∫x2+2x+5dx=2(x+1)x2+2x+5+2logx2+2x+5+x+1+C.
✓Final answer
The integral is 2(x+1)x2+2x+5+2logx2+2x+5+x+1+C.
We complete the square inside the radical to get (x+1)2+4, then use the trigonometric substitution x+1=2tanθ to transform the integral into a standard form. The final result is 2x+1x2+2x+5+2logx+1+x2+2x+5+C.
Why this approach works
The integral ∫x2+2x+5dx looks like it should be related to ∫u2+a2du — a standard form whose answer involves a hyperbolic or trigonometric substitution. But the expression under the square root isn't a simple sum of squares yet; it has a linear term 2x that spoils the pattern.
The natural first move is to complete the square. This removes the linear term and reveals the underlying structure: a sum of squares. Once we have (x+1)2+4, the substitution x+1=2tanθ (or x+1=2sinht) turns the square root into something like 2secθ, and the dx becomes 2sec2θdθ. The integral then becomes a trigonometric integral that we can handle with standard techniques.
Let's walk through it.
Step-by-step solution
1. Complete the square inside the radical.
We have x2+2x+5. Write it as:
x2+2x+1+4=(x+1)2+4.
So the integral becomes:
∫(x+1)2+4dx.
Tip
Completing the square is almost always the first step when you see a quadratic inside a square root. It turns a messy expression into a recognizable form.
2. Substitute to simplify the variable.
Let u=x+1, so du=dx. Then:
∫u2+4du.
Now we have the standard form ∫u2+a2du with a=2.
3. Choose a trigonometric substitution.
For u2+a2, the standard substitution is u=atanθ. Here a=2, so set:
u=2tanθ,du=2sec2θdθ.
Then:
u2+4=4tan2θ+4=4(tan2θ+1)=4sec2θ=2∣secθ∣.
Since we can restrict θ to (−π/2,π/2) where secθ>0, we drop the absolute value: u2+4=2secθ.
4. Rewrite the integral in terms of θ.
Substitute everything:
∫u2+4du=∫(2secθ)⋅(2sec2θdθ)=4∫sec3θdθ.
5. Evaluate ∫sec3θdθ.
This is a classic integral. Use integration by parts: let I=∫sec3θdθ.
Write sec3θ=secθ⋅sec2θ. Let dv=sec2θdθ, so v=tanθ, and u=secθ, so du=secθtanθdθ.
We have u=2tanθ, so tanθ=2u. To find secθ, use the identity sec2θ=1+tan2θ=1+4u2=4u2+4. Hence secθ=2u2+4 (positive, as before).
Now substitute:
secθtanθ=2u2+4⋅2u=4uu2+4.
So 2secθtanθ=2⋅4uu2+4=2uu2+4.
Also secθ+tanθ=2u2+4+2u=2u+u2+4.
Thus:
∫u2+4du=2uu2+4+2log2u+u2+4+C.
The absolute value inside the log can absorb the constant 2 in the denominator: log2u+u2+4=log∣u+u2+4∣−log2, and −log2 is just another constant that merges with C. So we write:
∫u2+4du=2uu2+4+2logu+u2+4+C.
8. Replace u with x+1.
Finally:
∫x2+2x+5dx=2(x+1)x2+2x+5+2logx+1+x2+2x+5+C.
Watch out
A common mistake is to forget the factor of 2 in front of the log, or to drop the absolute value. The expression x2+2x+5 is always positive, but x+1 can be negative, so the absolute value inside the log is necessary for the antiderivative to be valid for all x.
✓Final answer
The integral equals 2x+1x2+2x+5+2logx+1+x2+2x+5+C.
Method: Complete the Square, Then Standard u2+a2 Form
Use this when integrating quadratic with a linear term inside: reshape the quadratic into (x−h)2+a2 so a known formula applies.
Steps
Step 1: Complete the square inside the radical.
Turn x2+2x+5 into (x+1)2+4=(x+1)2+22, so x2+2x+5=(x+1)2+22.
Step 2: Apply the standard result for u2+a2.
With u=x+1, a=2, use
∫u2+a2du=2uu2+a2+2a2logu+u2+a2+C.
Step 3: Back-substitute u=x+1.
Replace u and simplify to express everything in x, then add C:
2x+1x2+2x+5+2logx+1+x2+2x+5+C.
Common Mistakes
Mistake 1: Not completing the square first.
Why it's wrong: x2+2x+5 isn't a pure u2+a2 until rewritten as (x+1)2+4. Correct approach: complete the square before choosing a formula.
Mistake 2: Using the a2−u2 (arcsine) formula.
Why it's wrong: here the constant term makes u2+a2 (a sum), which gives a log, not an arcsine. Correct approach: match the sign — a plus needs the log form.
Mistake 3: Mis-reading a from the completed square.
Why it's wrong: (x+1)2+22 means a=2 and 2a2=2; using a=4 scales the log term wrongly. Correct approach: take a as the square root of the constant.