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.
Idea: complete the square, then apply the standard ∫u2+a2du formula.
x2+4x+6=(x+2)2+2,u=x+2,a2=2.
Standard result:
∫u2+a2du=2uu2+a2+2a2logu+u2+a2+C.
Here 2a2=22=1, so substituting back u=x+2:
∫x2+4x+6dx=2x+2x2+4x+6+logx+2+x2+4x+6+C.
✓Final answer
2x+2x2+4x+6+logx+2+x2+4x+6+C
Complete the square to (x+2)2+2 and use the u2+a2 formula with a2=2, giving log coefficient 1: 2x+2x2+4x+6+logx+2+x2+4x+6+C.
Step 1 — Complete the square
Half of the middle coefficient 4 is 2, and (x+2)2=x2+4x+4, so
x2+4x+6=(x+2)2+2.
The integral becomes ∫(x+2)2+2dx, of the form u2+a2 with u=x+2 and a=2 (so a2=2).
Step 2 — The standard formula
∫u2+a2du=2uu2+a2+2a2logu+u2+a2+C.
With a2=2, the log coefficient is 2a2=22=1 — not 21. So
∫u2+2du=2uu2+2+logu+u2+2+C.
Step 3 — Substitute back
Replace u=x+2 and note (x+2)2+2=x2+4x+6:
∫x2+4x+6dx=2x+2x2+4x+6+logx+2+x2+4x+6+C.
The absolute value matters: the radical is always positive (discriminant 16−24<0), but x+2 can be negative, so the log argument needs ∣⋅∣.
✓Final answer
2x+2x2+4x+6+logx+2+x2+4x+6+C
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.
Step 3: Apply the correct standard formula.
∫t2−a2dt=2tt2−a2−2a2logt+t2−a2+C,
∫t2+a2dt=2tt2+a2+2a2logt+t2+a2+C,
∫a2−t2dt=2ta2−t2+2a2sin−1at+C.
Step 4: Back-substitute t=x+p and simplify; keep C. The whole skill is matching the completed square to the right one of these three templates.
Common Mistakes
Mistake 1: Completing the square wrongly: x2+4x+6=(x+2)2+6.
Why it's wrong: (x+2)2=x2+4x+4, so you must subtract the 4: x2+4x+6=(x+2)2+2. Correct approach: add and subtract (b/2)2.
Mistake 2: Using the a2−t2 (arcsin) formula for a + quadratic.
Why it's wrong: (x+2)2+2 is a t2+a2 form, giving a log, not sin−1. Correct approach: match the sign — a plus constant means the logarithmic template.
Mistake 3: Taking 2a2 as 2a (here a2=2).
Why it's wrong: the coefficient is 2a2=1, not 22. Correct approach: use a2, the constant itself, in the formula.