Skip to content
Worked Examples · Example 23

Q.Find ∫x2+2x+5 dx\int \sqrt{x^2 + 2x + 5}\, dx

Telangana TsbieTextbookSubjective· 3mImportance★★★★★
42% · 156/373 Questions
✓ Free question

We complete the square inside the radical to get (x+1)2+4\sqrt{(x+1)^2 + 4}, then use the trigonometric substitution x+1=2tan⁡θx+1 = 2\tan\theta to transform the integral into a standard form. The final result is x+12x2+2x+5+2log⁡∣x+1+x2+2x+5∣+C\frac{x+1}{2}\sqrt{x^2+2x+5} + 2\log\left|x+1+\sqrt{x^2+2x+5}\right| + C.

Why this approach works

The integral ∫x2+2x+5 dx\int \sqrt{x^2 + 2x + 5}\, dx looks like it should be related to ∫u2+a2 du\int \sqrt{u^2 + a^2}\, du — 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 2x2x 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\sqrt{(x+1)^2 + 4}, the substitution x+1=2tan⁡θx+1 = 2\tan\theta (or x+1=2sinh⁡tx+1 = 2\sinh t) turns the square root into something like 2sec⁡θ2\sec\theta, and the dxdx becomes 2sec⁡2θ dθ2\sec^2\theta\, d\theta. 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+5x^2 + 2x + 5. Write it as:

x2+2x+1+4=(x+1)2+4.x^2 + 2x + 1 + 4 = (x+1)^2 + 4.

So the integral becomes:

∫(x+1)2+4 dx.\int \sqrt{(x+1)^2 + 4}\, dx.

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+1u = x+1, so du=dxdu = dx. Then:

∫u2+4 du.\int \sqrt{u^2 + 4}\, du.

Now we have the standard form ∫u2+a2 du\int \sqrt{u^2 + a^2}\, du with a=2a = 2.

3. Choose a trigonometric substitution.

For u2+a2\sqrt{u^2 + a^2}, the standard substitution is u=atan⁡θu = a\tan\theta. Here a=2a = 2, so set:

u=2tan⁡θ,du=2sec⁡2θ dθ.u = 2\tan\theta, \quad du = 2\sec^2\theta\, d\theta.

Then:

u2+4=4tan⁡2θ+4=4(tan⁡2θ+1)=4sec⁡2θ=2∣sec⁡θ∣.\sqrt{u^2 + 4} = \sqrt{4\tan^2\theta + 4} = \sqrt{4(\tan^2\theta + 1)} = \sqrt{4\sec^2\theta} = 2|\sec\theta|.

Since we can restrict θ\theta to (−π/2,π/2)(-\pi/2, \pi/2) where sec⁡θ>0\sec\theta > 0, we drop the absolute value: u2+4=2sec⁡θ\sqrt{u^2+4} = 2\sec\theta.

4. Rewrite the integral in terms of θ\theta.

Substitute everything:

∫u2+4 du=∫(2sec⁡θ)⋅(2sec⁡2θ dθ)=4∫sec⁡3θ dθ.\int \sqrt{u^2+4}\, du = \int (2\sec\theta) \cdot (2\sec^2\theta\, d\theta) = 4\int \sec^3\theta\, d\theta.

5. Evaluate ∫sec⁡3θ dθ\int \sec^3\theta\, d\theta.

This is a classic integral. Use integration by parts: let I=∫sec⁡3θ dθI = \int \sec^3\theta\, d\theta.

Write sec⁡3θ=sec⁡θ⋅sec⁡2θ\sec^3\theta = \sec\theta \cdot \sec^2\theta. Let dv=sec⁡2θ dθdv = \sec^2\theta\, d\theta, so v=tan⁡θv = \tan\theta, and u=sec⁡θu = \sec\theta, so du=sec⁡θtan⁡θ dθdu = \sec\theta\tan\theta\, d\theta.

Then:

I=sec⁡θtan⁡θ−∫tan⁡θ⋅sec⁡θtan⁡θ dθ=sec⁡θtan⁡θ−∫sec⁡θtan⁡2θ dθ.I = \sec\theta\tan\theta - \int \tan\theta \cdot \sec\theta\tan\theta\, d\theta = \sec\theta\tan\theta - \int \sec\theta\tan^2\theta\, d\theta.

Now tan⁡2θ=sec⁡2θ−1\tan^2\theta = \sec^2\theta - 1, so:

I=sec⁡θtan⁡θ−∫sec⁡θ(sec⁡2θ−1) dθ=sec⁡θtan⁡θ−∫sec⁡3θ dθ+∫sec⁡θ dθ.I = \sec\theta\tan\theta - \int \sec\theta(\sec^2\theta - 1)\, d\theta = \sec\theta\tan\theta - \int \sec^3\theta\, d\theta + \int \sec\theta\, d\theta.

Notice the ∫sec⁡3θ dθ\int \sec^3\theta\, d\theta appears again — that's our II. So:

I=sec⁡θtan⁡θ−I+∫sec⁡θ dθ.I = \sec\theta\tan\theta - I + \int \sec\theta\, d\theta.

Bring II to the left:

2I=sec⁡θtan⁡θ+∫sec⁡θ dθ.2I = \sec\theta\tan\theta + \int \sec\theta\, d\theta.

Thus:

I=12sec⁡θtan⁡θ+12log⁡∣sec⁡θ+tan⁡θ∣+C.I = \frac{1}{2}\sec\theta\tan\theta + \frac{1}{2}\log|\sec\theta + \tan\theta| + C.

Note

The integral ∫sec⁡θ dθ=log⁡∣sec⁡θ+tan⁡θ∣+C\int \sec\theta\, d\theta = \log|\sec\theta + \tan\theta| + C is a standard result worth memorizing for exams.

6. Multiply by the constant factor.

Our integral is 4I4I, so:

∫u2+4 du=4(12sec⁡θtan⁡θ+12log⁡∣sec⁡θ+tan⁡θ∣)+C=2sec⁡θtan⁡θ+2log⁡∣sec⁡θ+tan⁡θ∣+C.\int \sqrt{u^2+4}\, du = 4\left(\frac{1}{2}\sec\theta\tan\theta + \frac{1}{2}\log|\sec\theta + \tan\theta|\right) + C = 2\sec\theta\tan\theta + 2\log|\sec\theta + \tan\theta| + C.

7. Convert back to uu (and then xx).

We have u=2tan⁡θu = 2\tan\theta, so tan⁡θ=u2\tan\theta = \frac{u}{2}. To find sec⁡θ\sec\theta, use the identity sec⁡2θ=1+tan⁡2θ=1+u24=u2+44\sec^2\theta = 1 + \tan^2\theta = 1 + \frac{u^2}{4} = \frac{u^2+4}{4}. Hence sec⁡θ=u2+42\sec\theta = \frac{\sqrt{u^2+4}}{2} (positive, as before).

Now substitute:

  • sec⁡θtan⁡θ=u2+42⋅u2=uu2+44\sec\theta\tan\theta = \frac{\sqrt{u^2+4}}{2} \cdot \frac{u}{2} = \frac{u\sqrt{u^2+4}}{4}.
  • So 2sec⁡θtan⁡θ=2⋅uu2+44=uu2+422\sec\theta\tan\theta = 2 \cdot \frac{u\sqrt{u^2+4}}{4} = \frac{u\sqrt{u^2+4}}{2}.
  • Also sec⁡θ+tan⁡θ=u2+42+u2=u+u2+42\sec\theta + \tan\theta = \frac{\sqrt{u^2+4}}{2} + \frac{u}{2} = \frac{u + \sqrt{u^2+4}}{2}.

Thus:

∫u2+4 du=uu2+42+2log⁡∣u+u2+42∣+C.\int \sqrt{u^2+4}\, du = \frac{u\sqrt{u^2+4}}{2} + 2\log\left|\frac{u + \sqrt{u^2+4}}{2}\right| + C.

The absolute value inside the log can absorb the constant 22 in the denominator: log⁡∣u+u2+42∣=log⁡∣u+u2+4∣−log⁡2\log\left|\frac{u + \sqrt{u^2+4}}{2}\right| = \log|u + \sqrt{u^2+4}| - \log 2, and −log⁡2-\log 2 is just another constant that merges with CC. So we write:

∫u2+4 du=uu2+42+2log⁡∣u+u2+4∣+C.\int \sqrt{u^2+4}\, du = \frac{u\sqrt{u^2+4}}{2} + 2\log\left|u + \sqrt{u^2+4}\right| + C.

8. Replace uu with x+1x+1.

Finally:

∫x2+2x+5 dx=(x+1)x2+2x+52+2log⁡∣x+1+x2+2x+5∣+C.\int \sqrt{x^2 + 2x + 5}\, dx = \frac{(x+1)\sqrt{x^2+2x+5}}{2} + 2\log\left|x+1 + \sqrt{x^2+2x+5}\right| + C.

Watch out

A common mistake is to forget the factor of 22 in front of the log, or to drop the absolute value. The expression x2+2x+5\sqrt{x^2+2x+5} is always positive, but x+1x+1 can be negative, so the absolute value inside the log is necessary for the antiderivative to be valid for all xx.


✓Final answer

The integral equals x+12x2+2x+5+2log⁡∣x+1+x2+2x+5∣+C\displaystyle \frac{x+1}{2}\sqrt{x^2+2x+5} + 2\log\left|x+1+\sqrt{x^2+2x+5}\right| + C.

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.