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.
Same / Similar Concept — real previous-year questions on the same or a closely similar concept, not this exact question.
JEE Main 2026Set 2026-01-23-s24 marksMCQ
Q.Let I(x) = ∫ 3 dx / [(4x+6)√(4x²+8x+3)] and I(0) = √3/4 + 20.
I(1/2) = a√2/b + c, where a, b, c ∈ N, gcd(a,b) = 1, then a + b + c is equal to
(A) 31
(B) 28
(C) 29
(D) 30
›Reveal solutionSolution
The antiderivative is (3/4)sqrt((2x+1)/(2x+3))+C; matching I(0) pins C=20 exactly, giving I(1/2)=3sqrt(2)/8+20, so a+b+c=31.
Integrands of the form (linear)/[(linear)*sqrt(quadratic)] with the quadratic factoring into two linear pieces are often the derivative of a square-root-of-a-ratio function -- guessing that form and verifying by differentiation beats a messy substitution.
Factor: 4x^2+8x+3=(2x+1)(2x+3), and 4x+6=2(2x+3).
Try g(x)=sqrt((2x+1)/(2x+3)). Using logarithmic/direct differentiation: g'(x) = 2/[(2x+3)^(3/2)(2x+1)^(1/2)].
The given integrand is 3/[(4x+6)sqrt((2x+1)(2x+3))] = (3/2)/[(2x+3)^(3/2)(2x+1)^(1/2)]
Comparing, this equals (3/4)*g'(x) exactly (since (3/4)*2=3/2). So I(x) = (3/4)*sqrt((2x+1)/(2x+3)) + C.
At x=0: I(0) = (3/4)*sqrt(1/3) + C = (3/4)(1/sqrt(3))+C = sqrt(3)/4 + C. Given I(0)=sqrt(3)/4+20, this gives C=20 exactly.
At x=1/2: (2x+1)=2, (2x+3)=4, so sqrt(2/4)=sqrt(1/2)=sqrt(2)/2. I(1/2) = (3/4)(sqrt(2)/2)+20 = 3*sqrt(2)/8+20.
Always verify a guessed antiderivative by differentiating it back and checking against the EXACT integrand (including all constant factors) -- an off-by-a-constant-factor guess (like using 3/8 instead of 3/4) silently corrupts the final numeric answer even though the functional form looks right.
✓Final answer
The correct option is (A) -- 31.
JEE Main 2025Set 2025-01-24-s24 marks
Q.If ∫x2+x+12x2+5x+9dx=xx2+x+1+αx2+x+1+βlogex+21+x2+x+1+C, where C is the constant of integration, then α+2β is equal to ________.
›Reveal solutionSolution
Differentiate the given right-hand side (rather than integrate from scratch) and match it to the integrand to pin down α,β.
For the log term, dxdln(x+21+Q)=x+21+Q1+2Q2x+1=22x+1+2Q2Q2Q+2x+1=Q1 (the two linear factors cancel).
So dxd[xQ+αQ+βln(⋯)]=2Q4x2+3x+2+2Qα(2x+1)+Qβ=2Q4x2+3x+2+α(2x+1)+2β.
Set equal to the integrand Q2x2+5x+9=2Q4x2+10x+18.
Match x-coefficient: 3+2α=10⇒α=27.
Match constant: 2+α+2β=18⇒2+27+2β=18⇒2β=18−211=225⇒β=425.
α+2β=27+225=232=16.
✓Final answer
\boxed{16}
JEE Main 2023Set 2023-04-12-s14 marks
Q.Let I(x) = \int \sqrt{(x+7)/x}, dx and I(9) = 12 + 7 \log_e 7. If I(1) = α + 7 \log_e(1+2\sqrt{2}), then α^4 is equal to ______.
›Reveal solutionSolution
Integrate (x+7)/x by splitting the numerator, fix the constant using I(9), then evaluate I(1) and recognise the resulting log argument as a perfect square.
xx+7=x2+7xx+7; writing x+7=(x+3.5)+3.5 splits the integral into ∫x2+7xx+3.5dx+3.5∫x2+7xdx.
First part integrates to x2+7x; second part integrates to 27lnx+27+x2+7x. So I(x)=x(x+7)+27ln(x+27+x(x+7))+C.
At x=9: 9⋅16=12; log argument =9+3.5+12=24.5=49/2. Given I(9)=12+7ln7: 27ln(49/2)+C=7ln7⇒C=27ln2 (since 27ln(49/2)=7ln7−27ln2).
So I(1)=22+7ln(1+22), matching the given form with α=22. Then α4=(22)4=(8)2=64.
✓Final answer
\boxed{64}
JEE Main 2021Set 2021-03-18-s14 marksMCQ
Q.The integral ∫ [(2x−1)cos√((2x−1)²+5)] / √(4x²−4x+6) dx is equal to (where c is a constant of integration):
(A) (1/2) sin√((2x−1)²+5) + c
(B) (1/2) cos√((2x+1)²+5) + c
(C) (1/2) cos√((2x−1)²+5) + c
(D) (1/2) sin√((2x+1)²+5) + c
›Reveal solutionSolution
Substituting u=(2x−1)2+5 then w=u reduces the integral to 21∫coswdw, giving 21sin(2x−1)2+5+c.
Note that 4x2−4x+6=(2x−1)2+5 (expand: (2x−1)2=4x2−4x+1, plus 5 gives 4x2−4x+6 — confirmed).
Let u=(2x−1)2+5, so 4x2−4x+6=u, and dxdu=2(2x−1)×2=4(2x−1)⇒(2x−1)dx=4du.
The integral becomes ∫ucosu⋅4du=41∫ucosudu.
Substituting back w=u=(2x−1)2+5: the integral equals 21sin(2x−1)2+5+c.
✓Final answer
The correct option is (A), 21sin(2x−1)2+5+c.
JEE Main 2021Set 2021-08-27-s14 marks
Q.If the integral of dx/(x²+x+1)² = a tan⁻¹((2x+1)/√3) + b(2x+1)/(x²+x+1) + C, x > 0 where C is the constant of integration, then the value of 9(√3 a + b) is equal to ________.
›Reveal solutionSolution
Applying the standard reduction formula for ∫du/(u2+k2)2 identifies a,b directly, giving 9(3a+b)=15.
Complete the square: x2+x+1=(x+21)2+43; let u=x+21, k2=43.
Standard formula: ∫(u2+k2)2du=2k21[u2+k2u+k1tan−1ku]+C.
With k2=3/4,k=3/2: this becomes 32[u2+3/4u+32tan−132u]=x2+x+12u/3+334tan−132x+1.
Since 2u=2x+1: comparing to the given form, b=31 (coefficient of (2x+1)/(x2+x+1)) and a=334.
9(3a+b)=9(3⋅334+31)=9(34+31)=9×35=15.
✓Final answer
The value is 15.
JEE Main 2021Set 2021-08-31-s24 marks
Q.If ∫ sinx/(sin³x + cos³x) dx = α log_e|1+tanx| + β log_e|1−tanx+tan²x| + γ tan⁻¹[(2tanx−1)/√3] + C, when C is constant of integration, then the value of 18(α + β + γ²) is _________.
›Reveal solutionSolution
Reducing the integral via t=tanx and partial fractions pins down α,β,γ, giving 18(α+β+γ2)=3.
sin3x+cos3x=(sinx+cosx)(1−sinxcosx). Dividing numerator and denominator by cos3x: sin3x+cos3xsinx=tan3x+1tanxsec2x.
Substituting t=tanx, dt=sec2xdx: integral becomes ∫t3+1tdt=∫(t+1)(t2−t+1)tdt.
Bounding the integrand between its max and min values over [1,2] (or evaluating numerically) shows I≈0.343, so I2≈0.118 lies strictly between 1/9 and 1/8.
The standard approach is to bound the cubic g(x)=2x3−9x2+12x+4 on [1,2], finding its minimum and maximum there (it is a smooth, positive function on this interval), which bounds 1/g(x) between two constants, and hence bounds I=∫121/g(x)dx between (interval length)×(those constants) -- i.e. between two values whose squares bracket 1/9 and 1/8.
Carrying out this bounding (or, equivalently, evaluating the integral numerically) gives I≈0.343.
Then I2≈0.3432≈0.1178.
Compare: 1/9≈0.1111 and 1/8=0.125. Indeed 0.1111<0.1178<0.125.
✓Final answer
The correct option is (A).
JEE Main 2020Set 2020-09-03-s24 marksMCQ
Q.If the value of the integral ∫₀^(1/2) x²/(1-x²)^(3/2) dx is k/6, then k is equal to:
(A) 2√3 - π
(B) 3√2 + π
(C) 3√2 - π
(D) 2√3 + π
›Reveal solutionSolution
The substitution x=sinθ turns the integral into ∫tan2θdθ, which evaluates cleanly over [0,π/6] to give k=23−π.
Let x=sinθ, so dx=cosθdθ and 1−x2=cos2θ, hence (1−x2)3/2=cos3θ.
The integrand becomes cos3θsin2θ⋅cosθ=cos2θsin2θ=tan2θ.
This equals k/6: 31−6π=6k⇒k=36−π=23−π (using 6/3=23).
✓Final answer
The correct option is (A), k=23−π.
JEE Main 2020Set 2020-09-03-s24 marksMCQ
Q.If ∫ sin⁻¹(√(x/(1+x))) dx = A(x) tan⁻¹(√x) + B(x) + C, where C is a constant of integration, then the ordered pair (A(x), B(x)) can be:
(A) (x - 1, √x)
(B) (x + 1, √x)
(C) (x + 1, -√x)
(D) (x - 1, -√x)
›Reveal solutionSolution
The substitution x=tan2θ turns the inverse-sine integrand into θ itself; integrating by parts then gives (x+1)tan−1x−x+C.
Let x=tan2θ. Then 1+xx=sec2θtan2θ=sin2θ, so x/(1+x)=sinθ and sin−1x/(1+x)=θ=tan−1x.
Also dx=2tanθsec2θdθ.
The integral becomes ∫θ⋅2tanθsec2θdθ. Noting dθd(tan2θ)=2tanθsec2θ=dθdx, integrate by parts with u=θ,dv=dx: =θ⋅x−∫xdθ=xtan−1x−∫xdθ.
To evaluate ∫xdθ, use dθ=2x(1+x)dx (from differentiating x=tan2θ), or equivalently substitute t=x (x=t2,dx=2tdt): ∫xdθ=∫2(1+x)xdx=∫2(1+t2)t⋅2tdt=∫1+t2t2dt=∫(1−1+t21)dt=t−tan−1t=x−tan−1x.
Combining: Integral =xtan−1x−(x−tan−1x)+C=(x+1)tan−1x−x+C.