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

Exercise 7.4 · Q22: ∫x+3x2−2x−5 dx\int\frac{x + 3}{x^2 - 2x - 5}\,dx

Exercise 7.4Integrals of some particular functions · Section 7.4
The question

Integrate the function

x+3x2−2x−5.\frac{x + 3}{x^2 - 2x - 5}.
Exam answer

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

Let x+3=A(2x−2)+Bx + 3 = A(2x - 2) + B⁠, where 2x−2=ddx(x2−2x−5)2x - 2 = \frac{d}{dx}(x^2 - 2x - 5)⁠.

Comparing coefficients: 2A=12A = 1 and −2A+B=3-2A + B = 3⁠. So A=12A = \frac12⁠, B=4B = 4⁠.

∴ I=12∫(2x−2) dxx2−2x−5+4∫dxx2−2x−5=12I1+4I2\begin{aligned} \therefore\ I &= \frac12\int\frac{(2x - 2)\,dx}{x^2 - 2x - 5} \\ &\quad + 4\int\frac{dx}{x^2 - 2x - 5} \\ &= \frac12 I_1 + 4I_2 \end{aligned}

In I1I_1⁠, put x2−2x−5=tx^2 - 2x - 5 = t⁠. Then (2x−2) dx=dt(2x - 2)\,dx = dt⁠.

I1=∫dtt=log⁡∣t∣=log⁡∣x2−2x−5∣\begin{aligned} I_1 &= \int\frac{dt}{t} = \log|t| \\ &= \log\left|x^2 - 2x - 5\right| \end{aligned}

For I2I_2⁠: x2−2x−5=(x−1)2−(6)2x^2 - 2x - 5 = (x - 1)^2 - \left(\sqrt6\right)^2⁠.

[Using ∫dxx2−a2\displaystyle\int\frac{dx}{x^2 - a^2} =12alog⁡∣x−ax+a∣+C= \frac{1}{2a}\log\left|\frac{x - a}{x + a}\right| + C]

I2=∫dx(x−1)2−(6)2=126log⁡∣x−1−6x−1+6∣\begin{aligned} I_2 &= \int\frac{dx}{(x - 1)^2 - \left(\sqrt6\right)^2} \\ &= \frac{1}{2\sqrt6}\log\left|\frac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\right| \end{aligned}

∴ I=12log⁡∣x2−2x−5∣\therefore\ I = \dfrac12\log\left|x^2 - 2x - 5\right| +26log⁡∣x−1−6x−1+6∣+ \dfrac{2}{\sqrt6}\log\left|\dfrac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\right| +C+ C⁠.

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

The one idea this problem is built on

Linear over quadratic is type 7.4 (9): split the numerator as A⋅Q′+BA\cdot Q' + B with Q=x2−2x−5Q = x^2 - 2x - 5⁠, Q′=2x−2Q' = 2x - 2⁠. This gives x+3=12(2x−2)+4x + 3 = \frac12(2x - 2) + 4⁠. The Q′Q' part gives log⁡∣Q∣\log|Q|⁠. For the constant part, completing the square gives Q=(x−1)2−(6)2Q = (x - 1)^2 - \left(\sqrt6\right)^2⁠, "square minus square", so formula 7.4 (1) gives a log of a ratio.

Given, to find, and the plan
Given
The integrand x+3x2−2x−5\frac{x + 3}{x^2 - 2x - 5}⁠.
To find
∫x+3x2−2x−5 dx\int\frac{x + 3}{x^2 - 2x - 5}\,dx⁠, and where the answer is valid.
Plan
(1) Find the domain. (2) Find AA⁠, BB with x+3=A(2x−2)+Bx + 3 = A(2x - 2) + B⁠. (3) Split into I1I_1 and I2I_2⁠. (4) I1I_1 by substitution. (5) I2I_2 by completing the square and 7.4 (1). (6) Combine. (7) Differentiate back.

Basics you need

1Comparing coefficients

If px+q=A(2ax+b)+Bpx + q = A(2ax + b) + B for all xx⁠, the coefficients of xx and the constants on the two sides are equal. Basics: splitting fractions

2Substitution t=Q(x)t = Q(x)

∫Q′(x)Q(x) dx=log⁡∣Q(x)∣+C\int\frac{Q'(x)}{Q(x)}\,dx = \log|Q(x)| + C⁠. Basics: logarithms and 1/x

3Completing the square

x2−2x−5=(x−1)2−6x^2 - 2x - 5 = (x - 1)^2 - 6⁠. Basics: completing the square

4Formula 7.4 (1)

∫dxx2−a2=12alog⁡∣x−ax+a∣+C\int\frac{dx}{x^2 - a^2} = \frac{1}{2a}\log\left|\frac{x - a}{x + a}\right| + C for a>0a > 0⁠, x≠±ax \ne \pm a⁠. Lesson: integrals of particular functions

Solution

  1. The domain

    The denominator vanishes where x2−2x−5=0x^2 - 2x - 5 = 0⁠, that is

    x=2±4+202=1±6.x = \frac{2 \pm \sqrt{4 + 20}}{2} = 1 \pm \sqrt6.

    So the integrand is defined for every real x≠1±6x \ne 1 \pm \sqrt6 (roughly x≠−1.449x \ne -1.449 and x≠3.449x \ne 3.449⁠). The domain has three pieces.

    A fraction is undefined where its denominator is 0. The answer below must work on each of the three intervals x<1−6x < 1 - \sqrt6⁠, 1−6<x<1+61 - \sqrt6 < x < 1 + \sqrt6⁠, x>1+6x > 1 + \sqrt6⁠.
  2. Split the numerator as A⋅Q′+BA\cdot Q' + B

    Q=x2−2x−5Q = x^2 - 2x - 5 has Q′=2x−2Q' = 2x - 2⁠. Write

    x+3=A(2x−2)+B.x + 3 = A(2x - 2) + B.

    Coefficients of xx⁠: 2A=12A = 1⁠. Constants: −2A+B=3-2A + B = 3⁠. So A=12A = \frac12⁠, B=3+1=4B = 3 + 1 = 4⁠.

    This is type 7.4 (9). Check: 12(2x−2)+4=x−1+4=x+3\frac12(2x - 2) + 4 = x - 1 + 4 = x + 3⁠.
  3. Split the integral into I1I_1 and I2I_2

    ∫x+3x2−2x−5 dx=12∫2x−2x2−2x−5 dx+4∫dxx2−2x−5=12I1+4I2.\begin{aligned} \int\frac{x + 3}{x^2 - 2x - 5}\,dx &= \frac12\int\frac{2x - 2}{x^2 - 2x - 5}\,dx \\ &\quad + 4\int\frac{dx}{x^2 - 2x - 5} \\ &= \frac12 I_1 + 4I_2. \end{aligned}
    Dividing 12(2x−2)+4\frac12(2x - 2) + 4 by QQ term by term gives two fractions; Property (V) of Section 7.2.1 splits the integral.
    Property (V), Section 7.2.1. Lesson: integrals of particular functions
  4. I1I_1 by substitution

    Put t=x2−2x−5t = x^2 - 2x - 5⁠, dt=(2x−2) dxdt = (2x - 2)\,dx⁠:

    I1=∫dtt=log⁡∣t∣+C1=log⁡∣x2−2x−5∣+C1.I_1 = \int\frac{dt}{t} = \log|t| + C_1 = \log\left|x^2 - 2x - 5\right| + C_1.
    The numerator 2x−22x - 2 is exactly the derivative of the denominator. Here QQ does change sign (it is negative between its roots), so the modulus is essential.
    Substitution, Section 7.3.1; standard formula (xii), Section 7.2. Basics: substitution
  5. I2I_2 by completing the square

    x2−2x−5=(x−1)2−6x^2 - 2x - 5 = (x - 1)^2 - 6 =(x−1)2−(6)2= (x - 1)^2 - \left(\sqrt6\right)^2⁠. Put t=x−1t = x - 1⁠, dt=dxdt = dx⁠, and use 7.4 (1) with a=6a = \sqrt6⁠:

    I2=∫dtt2−(6)2=126log⁡∣t−6t+6∣+C2=126log⁡∣x−1−6x−1+6∣+C2.\begin{aligned} I_2 &= \int\frac{dt}{t^2 - \left(\sqrt6\right)^2} = \frac{1}{2\sqrt6}\log\left|\frac{t - \sqrt6}{t + \sqrt6}\right| + C_2 \\ &= \frac{1}{2\sqrt6}\log\left|\frac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\right| + C_2. \end{aligned}
    Half of −2-2 is −1-1⁠, and −5−1=−6-5 - 1 = -6⁠, a negative leftover, so this is "square minus square" without a root: formula 7.4 (1). It holds wherever t≠±6t \ne \pm\sqrt6⁠, that is, on all three pieces of the domain.
    Type 7.4 (7); formula 7.4 (1). Basics: completing the square
  6. Combine

    ∫x+3x2−2x−5 dx=12log⁡∣x2−2x−5∣+26log⁡∣x−1−6x−1+6∣+C,\begin{aligned} \int\frac{x + 3}{x^2 - 2x - 5}\,dx &= \frac12\log\left|x^2 - 2x - 5\right| \\ &\quad + \frac{2}{\sqrt6}\log\left|\frac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\right| + C, \end{aligned}

    with C=C12+4C2C = \frac{C_1}{2} + 4C_2⁠.

    4⋅126=264\cdot\frac{1}{2\sqrt6} = \frac{2}{\sqrt6}⁠. The constants merge into one. This is exactly the textbook's form.
  7. Check: differentiate the answer

    Write r=6r = \sqrt6⁠, so Q=(x−1)2−r2=(x−1−r)(x−1+r)Q = (x - 1)^2 - r^2 = (x - 1 - r)(x - 1 + r)⁠. Then

    ddx[12log⁡∣Q∣]=2x−22Q=x−1Q,ddxlog⁡∣x−1−rx−1+r∣=1x−1−r−1x−1+r=2rQ.\begin{aligned} \frac{d}{dx}\left[\frac12\log|Q|\right] &= \frac{2x - 2}{2Q} = \frac{x - 1}{Q}, \\ \frac{d}{dx}\log\left|\frac{x - 1 - r}{x - 1 + r}\right| &= \frac{1}{x - 1 - r} - \frac{1}{x - 1 + r} \\ &= \frac{2r}{Q}. \end{aligned}

    So the derivative of our answer is x−1Q+2r⋅2rQ=x−1+4Q=x+3x2−2x−5\frac{x - 1}{Q} + \frac{2}{r}\cdot\frac{2r}{Q} = \frac{x - 1 + 4}{Q} = \frac{x + 3}{x^2 - 2x - 5}⁠. ✓\checkmark

    The log of a ratio is the difference of the logs, log⁡∣x−1−r∣−log⁡∣x−1+r∣\log|x - 1 - r| - \log|x - 1 + r|⁠, and each differentiates to 1 over its inside. Over the common denominator QQ⁠, the difference of the two fractions is (x−1+r)−(x−1−r)Q=2rQ\frac{(x - 1 + r) - (x - 1 - r)}{Q} = \frac{2r}{Q}⁠. Valid for every x≠1±6x \ne 1 \pm \sqrt6⁠.
    Laws of logarithms; derivative (xii), Section 7.2. Basics: logarithms and 1/x
Result ∫x+3x2−2x−5 dx=12log⁡∣x2−2x−5∣+26log⁡∣x−1−6x−1+6∣+C,\begin{aligned} \int\frac{x + 3}{x^2 - 2x - 5}\,dx &= \frac12\log\left|x^2 - 2x - 5\right| \\ &\quad + \frac{2}{\sqrt6}\log\left|\frac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\right| + C, \end{aligned}

valid for x≠1±6x \ne 1 \pm \sqrt6⁠. (Textbook answer: 12log⁡∣x2−2x−5∣\frac12\log\left|x^2 - 2x - 5\right| +26log⁡∣x−1−6x−1+6∣+C+ \frac{2}{\sqrt6}\log\left|\frac{x - 1 - \sqrt6}{x - 1 + \sqrt6}\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)
[−3,−2][-3, -2]0.10592820.10592820.10592820.1059282
[0,1][0, 1]−0.6167538-0.6167538−0.6167538-0.6167538
[4,5][4, 5]1.30990101.30990101.30990101.3099010
Common mistakes
  1. Using tan⁡−1\tan^{-1}⁠. The leftover after completing the square is −6-6⁠, negative, so it is 7.4 (1), not 7.4 (3).
  2. Coefficient 126\frac{1}{2\sqrt6} lost. Formula 7.4 (1) has 12a\frac{1}{2a} in front; times B=4B = 4 it becomes 26\frac{2}{\sqrt6} (which equals 63\frac{\sqrt6}{3}⁠).
  3. Ratio upside down. For ∫dxx2−a2\int\frac{dx}{x^2 - a^2} the ratio is x−ax+a\frac{x - a}{x + a}⁠; for ∫dxa2−x2\int\frac{dx}{a^2 - x^2} (formula 7.4 (2)) it is a+xa−x\frac{a + x}{a - x}⁠.
What to take away
  1. Linear over quadratic: numerator =A⋅Q′+B= A\cdot Q' + B⁠; the Q′Q' part gives Alog⁡∣Q∣A\log|Q|⁠.
  2. If the leftover after completing the square is negative, use 7.4 (1); if positive, use 7.4 (3).

Every fact used, and where it comes from

FactUsed inSource
px+q=Addx(ax2+bx+c)+Bpx + q = A\frac{d}{dx}(ax^2 + bx + c) + BStep 2Type 7.4 (9) (Lesson: integrals of particular functions)
Integral of a sum of constant multiplesStep 3Property (V), Section 7.2.1
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + CStep 4Standard formula (xii), Section 7.2
SubstitutionSteps 4, 5Section 7.3.1 (Basics: substitution)
Completing the squareStep 5Type 7.4 (7) (Basics: completing the square)
∫dxx2−a2=12alog⁡∣x−ax+a∣+C\int\frac{dx}{x^2 - a^2} = \frac{1}{2a}\log\left|\frac{x - a}{x + a}\right| + CStep 5Formula 7.4 (1)
log⁡∣pq∣=log⁡∣p∣−log⁡∣q∣\log\left|\frac pq\right| = \log|p| - \log|q|Step 7Laws of logarithms (Basics: logarithms)
∫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 →