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

Exercise 7.7 · Q8: ∫x2+3x dx\int\sqrt{x^2 + 3x}\,dx

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

Integrate the function

x2+3x.\sqrt{x^2 + 3x}.
Exam answer

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

x2+3x=(x+32)2−(32)2x^2 + 3x = \left(x + \frac32\right)^2 - \left(\frac32\right)^2

Put x+32=yx + \frac32 = y⁠. Then dx=dydx = dy⁠.

I=∫y2−(32)2 dyI = \int\sqrt{y^2 - \left(\frac32\right)^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−94−98log⁡∣y+y2−94∣+C\begin{aligned} I &= \frac{y}{2}\sqrt{y^2 - \frac94} \\ &\quad - \frac98\log\left|y + \sqrt{y^2 - \frac94}\right| + C \end{aligned}

∴ I=2x+34x2+3x\therefore\ I = \dfrac{2x + 3}{4}\sqrt{x^2 + 3x} −98log⁡∣x+32+x2+3x∣- \dfrac98\log\left|x + \dfrac32 + \sqrt{x^2 + 3x}\right| +C+ C⁠.

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

The one idea this problem is built on

There is no constant term, but completing the square still works and creates one:

x2+3x=(x+32)2−(32)2.x^2 + 3x = \left(x + \frac32\right)^2 - \left(\frac32\right)^2.

That is "square minus a2a^2" with a=32a = \frac32⁠, so after y=x+32y = x + \frac32 formula 7.6.2 (i) applies, with the log term subtracted.

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

Basics you need

1Completing the square

Half the coefficient of xx is 32\frac32⁠; its square is 94\frac94⁠. Add and subtract 94\frac94⁠. 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+3x=(x2+3x+94)−94=(x+32)2−(32)2.\begin{aligned} x^2 + 3x &= \left(x^2 + 3x + \tfrac94\right) - \tfrac94 \\ &= \left(x + \tfrac32\right)^2 - \left(\tfrac32\right)^2. \end{aligned}
    (x+32)2=x2+3x+94\left(x + \frac32\right)^2 = x^2 + 3x + \frac94⁠. We added 94\frac94⁠, so we subtract it again. The leftover −94-\frac94 is negative: shape y2−a2y^2 - a^2 with a=32a = \frac32⁠.
    Completing the square, Section 7.4 (7). Basics: completing the square
  2. The domain

    We need x2+3x=x(x+3)≥0x^2 + 3x = x(x + 3) \ge 0⁠:

    x≤−3orx≥0.x \le -3 \quad\text{or}\quad x \ge 0.
    A product of two factors is ≥0\ge 0 when both have the same sign (or one is 0): both ≥0\ge 0 gives x≥0x \ge 0⁠; both ≤0\le 0 gives x≤−3x \le -3⁠. Equivalently ∣x+32∣≥32\left|x + \frac32\right| \ge \frac32⁠. For −3<x<0-3 < x < 0 the integrand is not real.
  3. Put y=x+32y = x + \frac32

    Then dy=dxdy = dx and

    ∫x2+3x dx=∫y2−(32)2 dy.\int\sqrt{x^2 + 3x}\,dx = \int\sqrt{y^2 - \left(\tfrac32\right)^2}\,dy.
    A shift has derivative 1, so dx=dydx = dy⁠.
    Integration by substitution, Section 7.3.1. Basics: substitution
  4. Apply 7.6.2 (i) with a=32a = \frac32

    Here a2=94a^2 = \frac94 and a22=98\frac{a^2}{2} = \frac98⁠:

    ∫y2−94 dy=y2y2−94−98log⁡∣y+y2−94∣+C.\begin{aligned} \int\sqrt{y^2 - \tfrac94}\,dy &= \frac{y}{2}\sqrt{y^2 - \tfrac94} \\ &\quad - \frac98\log\left|y + \sqrt{y^2 - \tfrac94}\right| + C. \end{aligned}
    9/42=98\frac{9/4}{2} = \frac98⁠. The log term is subtracted because the root is "square minus a2a^2".
    Formula 7.6.2 (i). Lesson: integration by parts
  5. Return to xx

    With y=x+32y = x + \frac32⁠: y2=2x+34\frac{y}{2} = \frac{2x + 3}{4} and y2−94=x2+3xy^2 - \frac94 = x^2 + 3x⁠. So

    ∫x2+3x dx=2x+34x2+3x−98log⁡∣x+32+x2+3x∣+C.\begin{aligned} \int\sqrt{x^2 + 3x}\,dx &= \frac{2x + 3}{4}\sqrt{x^2 + 3x} \\ &\quad - \frac98\log\left|x + \tfrac32 + \sqrt{x^2 + 3x}\right| + C. \end{aligned}
    x+3/22=2x+34\frac{x + 3/2}{2} = \frac{2x + 3}{4}⁠. The modulus is needed: for x≤−3x \le -3⁠, x+32≤−32x + \frac32 \le -\frac32 and the root is smaller than ∣x+32∣\left|x + \frac32\right|⁠, so the inside of the log is negative there. It is never 0 (that would need −94=0-\frac94 = 0 after squaring).
  6. Check: differentiate the answer

    Write y=x+32y = x + \frac32⁠, r=y2−94=x2+3xr = \sqrt{y^2 - \frac94} = \sqrt{x^2 + 3x}⁠, 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, since 98⋅1r=9/42r\frac98\cdot\frac1r = \frac{9/4}{2r}⁠,

    r2+y2−942r=2r22r=r=x2+3x. ✓\frac{r^2 + y^2 - \frac94}{2r} = \frac{2r^2}{2r} = r = \sqrt{x^2 + 3x}.\ \checkmark
    r2=r22r\frac r2 = \frac{r^2}{2r} and r2=y2−94r^2 = y^2 - \frac94⁠, so the numerator is 2r22r^2⁠. This holds on both pieces, x<−3x < -3 and x>0x > 0⁠; at x=−3x = -3 and x=0x = 0 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+3x dx=2x+34x2+3x−98log⁡∣x+32+x2+3x∣+C,\begin{aligned} \int\sqrt{x^2 + 3x}\,dx &= \frac{2x + 3}{4}\sqrt{x^2 + 3x} \\ &\quad - \frac98\log\left|x + \tfrac32 + \sqrt{x^2 + 3x}\right| + C, \end{aligned}

valid for x≤−3x \le -3 and for x≥0x \ge 0⁠. (Textbook answer: 2x+34x2+3x\frac{2x + 3}{4}\sqrt{x^2 + 3x} −98log⁡∣x+32+x2+3x∣+C- \frac98\log\left|x + \frac32 + \sqrt{x^2 + 3x}\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)
[0,2][0, 2]3.85661513.85661513.85661513.8566151
[−6,−4][-6, -4]6.29878986.29878986.29878986.2987898
Common mistakes
  1. "No constant, so no completing the square." The constant appears when you complete the square: −94-\frac94⁠.
  2. Coefficient 94\frac94 or 34\frac34 in front of the log. It is a22=98\frac{a^2}{2} = \frac98⁠.
  3. Writing log⁡∣x+x2+3x∣\log\left|x + \sqrt{x^2 + 3x}\right|⁠. The log contains y=x+32y = x + \frac32⁠, not xx⁠.
What to take away
  1. Even x2+bxx^2 + bx with no constant is completed to (x+b2)2−b24\left(x + \frac b2\right)^2 - \frac{b^2}{4}⁠.
  2. Square minus a positive number: formula 7.6.2 (i), log subtracted, domain in two pieces.

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+32y = x + \frac32Step 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 6Standard 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 →