Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Exercise 7.7 · Q6: ∫x2+4x−5 dx\int\sqrt{x^2 + 4x - 5}\,dx

Exercise 7.7Integrals of some more types · Section 7.6.2
The question

Integrate the function

x2+4x−5.\sqrt{x^2 + 4x - 5}.
Exam answer

Let I=∫x2+4x−5 dxI = \displaystyle\int\sqrt{x^2 + 4x - 5}\,dx⁠.

x2+4x−5=(x+2)2−9=(x+2)2−32\begin{aligned} x^2 + 4x - 5 &= (x + 2)^2 - 9 \\ &= (x + 2)^2 - 3^2 \end{aligned}

Put x+2=yx + 2 = y⁠. Then dx=dydx = dy⁠.

I=∫y2−32 dyI = \int\sqrt{y^2 - 3^2}\,dy

Using ∫y2−a2 dy=y2y2−a2\displaystyle\int\sqrt{y^2 - a^2}\,dy = \frac{y}{2}\sqrt{y^2 - a^2} −a22log⁡∣y+y2−a2∣+C,- \frac{a^2}{2}\log\left|y + \sqrt{y^2 - a^2}\right| + C,

I=y2y2−9−92log⁡∣y+y2−9∣+C\begin{aligned} I &= \frac{y}{2}\sqrt{y^2 - 9} \\ &\quad - \frac92\log\left|y + \sqrt{y^2 - 9}\right| + C \end{aligned}

∴ I=x+22x2+4x−5\therefore\ I = \dfrac{x + 2}{2}\sqrt{x^2 + 4x - 5} −92log⁡∣x+2+x2+4x−5∣- \dfrac92\log\left|x + 2 + \sqrt{x^2 + 4x - 5}\right| +C+ C⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Completing the square gives x2+4x−5=(x+2)2−32x^2 + 4x - 5 = (x + 2)^2 - 3^2⁠, a square minus a square. After y=x+2y = x + 2 this is y2−a2\sqrt{y^2 - a^2} with a=3a = 3⁠, and formula 7.6.2 (i) gives the answer, with the log term subtracted. The leftover is a perfect square here (9=329 = 3^2⁠), so aa is a whole number.

Given, to find, and the plan
Given
The integrand x2+4x−5\sqrt{x^2 + 4x - 5}⁠.
To find
∫x2+4x−5 dx\int\sqrt{x^2 + 4x - 5}\,dx⁠, and where the answer is valid.
Plan
(1) Complete the square. (2) Find the domain. (3) Put y=x+2y = x + 2⁠. (4) Apply 7.6.2 (i) with a=3a = 3 and return to xx⁠. (5) Differentiate back.

Basics you need

1Completing the square

x2+bx+c=(x+b2)2+(c−b24)x^2 + bx + c = \left(x + \frac{b}{2}\right)^2 + \left(c - \frac{b^2}{4}\right)⁠. Basics: completing the square

2Formula 7.6.2 (i)

For a>0a > 0⁠, ∫y2−a2 dy\int\sqrt{y^2 - a^2}\,dy equals y2y2−a2−a22log⁡∣y+y2−a2∣\frac{y}{2}\sqrt{y^2 - a^2} - \frac{a^2}{2}\log\left|y + \sqrt{y^2 - a^2}\right|⁠, plus CC⁠; derived by parts in Section 7.6.2 (see also Exercise 7.7 Q4). Lesson: integration by parts

3Derivative of log⁡∣u∣\log|u|

ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u} wherever u≠0u \ne 0 (standard formula (xii), Section 7.2). Basics: logarithms and 1/x

Solution

  1. Complete the square

    x2+4x−5=(x2+4x+4)−5−4=(x+2)2−9=(x+2)2−32.\begin{aligned} x^2 + 4x - 5 &= (x^2 + 4x + 4) - 5 - 4 \\ &= (x + 2)^2 - 9 = (x + 2)^2 - 3^2. \end{aligned}
    Half of 4 is 2 and 22=42^2 = 4⁠. We added 4 to complete the square, so we subtract it again: −5−4=−9-5 - 4 = -9⁠. The leftover is negative, so the shape is y2−a2y^2 - a^2 with a=3a = 3⁠.
    Completing the square, Section 7.4 (7). Basics: completing the square
  2. The domain

    We need (x+2)2≥9(x + 2)^2 \ge 9⁠, that is ∣x+2∣≥3|x + 2| \ge 3⁠:

    x≤−5orx≥1.x \le -5 \quad\text{or}\quad x \ge 1.
    x+2≥3x + 2 \ge 3 gives x≥1x \ge 1⁠; x+2≤−3x + 2 \le -3 gives x≤−5x \le -5⁠. The same comes from factorising: x2+4x−5=(x+5)(x−1)x^2 + 4x - 5 = (x + 5)(x - 1)⁠, which is ≥0\ge 0 outside the roots −5-5 and 11⁠. For −5<x<1-5 < x < 1 the integrand is not real.
  3. Put y=x+2y = x + 2

    Then dy=dxdy = dx and

    ∫x2+4x−5 dx=∫y2−32 dy.\int\sqrt{x^2 + 4x - 5}\,dx = \int\sqrt{y^2 - 3^2}\,dy.
    A shift has derivative 1, so dx=dydx = dy⁠; the domain becomes ∣y∣≥3|y| \ge 3⁠.
    Integration by substitution, Section 7.3.1. Basics: substitution
  4. Apply 7.6.2 (i) with a=3a = 3 and return to xx

    ∫y2−9 dy=y2y2−9−92log⁡∣y+y2−9∣+C.\begin{aligned} \int\sqrt{y^2 - 9}\,dy &= \frac{y}{2}\sqrt{y^2 - 9} \\ &\quad - \frac92\log\left|y + \sqrt{y^2 - 9}\right| + C. \end{aligned}

    With y=x+2y = x + 2 and y2−9=x2+4x−5y^2 - 9 = x^2 + 4x - 5⁠:

    ∫x2+4x−5 dx=x+22x2+4x−5−92log⁡∣x+2+x2+4x−5∣+C.\begin{aligned} \int\sqrt{x^2 + 4x - 5}\,dx &= \frac{x + 2}{2}\sqrt{x^2 + 4x - 5} \\ &\quad - \frac92\log\left|x + 2 + \sqrt{x^2 + 4x - 5}\right| + C. \end{aligned}
    a22=92\frac{a^2}{2} = \frac92⁠. The modulus matters: for x≤−5x \le -5⁠, x+2≤−3x + 2 \le -3 and the root is smaller than ∣x+2∣|x + 2|⁠, so the expression inside the log is negative. It is never 0, because (x+2)2−9=−(x+2)\sqrt{(x + 2)^2 - 9} = -(x + 2) would give −9=0-9 = 0 on squaring.
    Formula 7.6.2 (i). Lesson: integration by parts
  5. Check: differentiate the answer

    Write y=x+2y = x + 2⁠, r=y2−9r = \sqrt{y^2 - 9}⁠, so drdx=yr\frac{dr}{dx} = \frac{y}{r} where r>0r > 0⁠. Then

    ddx[y2 r]=r2+y22r,ddxlog⁡∣y+r∣=1+yry+r=1r.\begin{aligned} \frac{d}{dx}\left[\frac{y}{2}\,r\right] &= \frac{r}{2} + \frac{y^2}{2r}, \\ \frac{d}{dx}\log|y + r| &= \frac{1 + \frac{y}{r}}{y + r} = \frac{1}{r}. \end{aligned}

    So the derivative of our answer is

    r2+y22r−92r=r2+y2−92r=2r22r=r. ✓\begin{aligned} \frac{r}{2} + \frac{y^2}{2r} - \frac{9}{2r} &= \frac{r^2 + y^2 - 9}{2r} \\ &= \frac{2r^2}{2r} = r.\ \checkmark \end{aligned}
    r2=y2−9r^2 = y^2 - 9⁠, so r2+y2−9=2r2r^2 + y^2 - 9 = 2r^2⁠, and r=x2+4x−5r = \sqrt{x^2 + 4x - 5} is the integrand. This works on both pieces of the domain (for x<−5x < -5 and for x>1x > 1⁠); at x=−5x = -5 and x=1x = 1 the integrand is 0 and the answer's one-sided slope is 0 too.
    Product rule; chain rule; standard formula (xii), Section 7.2. Basics: logarithms and 1/x
Result ∫x2+4x−5 dx=x+22x2+4x−5−92log⁡∣x+2+x2+4x−5∣+C,\begin{aligned} \int\sqrt{x^2 + 4x - 5}\,dx &= \frac{x + 2}{2}\sqrt{x^2 + 4x - 5} \\ &\quad - \frac92\log\left|x + 2 + \sqrt{x^2 + 4x - 5}\right| + C, \end{aligned}

valid for x≤−5x \le -5 and for x≥1x \ge 1⁠. (Textbook answer: (x+2)2x2+4x−5\frac{(x + 2)}{2}\sqrt{x^2 + 4x - 5} −92log⁡∣x+2+x2+4x−5∣+C- \frac92\log\left|x + 2 + \sqrt{x^2 + 4x - 5}\right| + C⁠, the same.)

Check it with numbers

By Section 7.8, ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a) for our answer FF⁠, on any interval where the integrand is continuous. The middle column is a computer's sum of very many thin strips, found without our answer. One interval is taken on each piece of the domain:

IntervalSum of thin stripsF(b)−F(a)F(b) - F(a)
[1,3][1, 3]5.05624475.05624475.05624475.0562447
[−8,−5][-8, -5]9.66214679.66214679.66214679.6621467
Common mistakes
  1. Leftover −1-1 instead of −9-9⁠. After adding 4 we must subtract 4: −5−4=−9-5 - 4 = -9⁠.
  2. Adding the log term. For a square minus a2a^2⁠, formula 7.6.2 (i) subtracts a22log⁡∣…∣\frac{a^2}{2}\log|\dots|⁠.
  3. Coefficient 32\frac32 instead of 92\frac92⁠. The coefficient is a22\frac{a^2}{2} with a2=9a^2 = 9⁠, not a2\frac{a}{2}⁠.
What to take away
  1. Complete the square, read off the sign pattern, then pick 7.6.2 (i), (ii) or (iii).
  2. The domain of y2−a2\sqrt{y^2 - a^2} is ∣y∣≥a|y| \ge a⁠: two pieces; the answer works on both.

Every fact used, and where it comes from

FactUsed inSource
Completing the squareSteps 1, 2Section 7.4 (7) (Basics: completing the square)
Substitution y=x+2y = x + 2Step 3Section 7.3.1
∫y2−a2 dy\int\sqrt{y^2 - a^2}\,dy formulaStep 4Formula 7.6.2 (i), Section 7.6.2
ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u}Step 5Standard formula (xii), Section 7.2
∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)Numerical checkSection 7.8 (Lesson: definite integrals)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →