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

Exercise 7.4 · Q15: ∫dx(x−a)(x−b)\int\frac{dx}{\sqrt{(x - a)(x - b)}}

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

Integrate the function

1(x−a)(x−b).\frac{1}{\sqrt{(x - a)(x - b)}}.
Exam answer

Let I=∫dx(x−a)(x−b)I = \displaystyle\int\frac{dx}{\sqrt{(x - a)(x - b)}}⁠.

(x−a)(x−b)=x2−(a+b)x+ab=(x−a+b2)2−(a−b2)2\begin{aligned} &(x - a)(x - b) \\ &= x^2 - (a + b)x + ab \\ &= \left(x - \frac{a + b}{2}\right)^2 - \left(\frac{a - b}{2}\right)^2 \end{aligned}

Put x−a+b2=tx - \frac{a + b}{2} = t⁠. Then dx=dtdx = dt⁠.

I=∫dtt2−(a−b2)2I = \int\frac{dt}{\sqrt{t^2 - \left(\frac{a - b}{2}\right)^2}}

[Using ∫dtt2−k2\displaystyle\int\frac{dt}{\sqrt{t^2 - k^2}} =log⁡∣t+t2−k2∣+C= \log\left|t + \sqrt{t^2 - k^2}\right| + C]

I=log⁡∣t+t2−(a−b2)2∣+CI = \log\left|t + \sqrt{t^2 - \left(\frac{a - b}{2}\right)^2}\right| + C

∴ I=log⁡∣x−a+b2\therefore\ I = \log\Big|x - \dfrac{a + b}{2} +(x−a)(x−b)∣+C+ \sqrt{(x - a)(x - b)}\Big| + C (with a≠ba \ne b⁠).

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

The one idea this problem is built on

Multiply out (x−a)(x−b)(x - a)(x - b) and complete the square. The result is "a square minus a square":

(x−a)(x−b)=(x−a+b2)2−(a−b2)2.(x - a)(x - b) = \left(x - \frac{a + b}{2}\right)^2 - \left(\frac{a - b}{2}\right)^2.

That is the shape 1t2−k2\frac{1}{\sqrt{t^2 - k^2}} of formula 7.4 (4), whose integral is log⁡∣t+t2−k2∣\log\left|t + \sqrt{t^2 - k^2}\right|⁠. Here aa and bb are constants with a≠ba \ne b⁠.

Given, to find, and the plan
Given
The integrand 1(x−a)(x−b)\frac{1}{\sqrt{(x - a)(x - b)}}⁠, with constants a≠ba \ne b⁠.
To find
∫dx(x−a)(x−b)\int\frac{dx}{\sqrt{(x - a)(x - b)}}⁠, and where the answer is valid.
Plan
(1) Find the domain. (2) Expand and complete the square. (3) Shift t=x−a+b2t = x - \frac{a + b}{2} and use 7.4 (4). (4) Return to xx⁠. (5) Differentiate back, on both pieces of the domain.

Basics you need

1Completing the square

x2−px+q=(x−p2)2+q−p24x^2 - px + q = \left(x - \frac p2\right)^2 + q - \frac{p^2}{4}⁠. Basics: completing the square

2A shift is a substitution

If t=x−ht = x - h with hh a constant, then dt=dxdt = dx⁠. Basics: substitution

3Formula 7.4 (4)

∫dxx2−k2=log⁡∣x+x2−k2∣+C\int\frac{dx}{\sqrt{x^2 - k^2}} = \log\left|x + \sqrt{x^2 - k^2}\right| + C⁠, for ∣x∣>k>0|x| > k > 0⁠. Lesson: integrals of particular functions

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

ddxlog⁡∣u∣=u′u\frac{d}{dx}\log|u| = \frac{u'}{u} wherever u≠0u \ne 0⁠, used in the check. Basics: logarithms and 1/x

Solution

  1. Where the integrand exists

    We need (x−a)(x−b)>0(x - a)(x - b) > 0⁠: both factors positive or both negative. Writing mm and MM for the smaller and larger of a,ba, b⁠, this means

    x<morx>M.x < m \quad\text{or}\quad x > M.
    The product is under a square root in a denominator, so it must be strictly positive. Between mm and MM the two factors have opposite signs. The domain has two separate pieces, and the answer must work on both. (The book does not say so, but we assume a≠ba \ne b⁠: if a=ba = b the integrand would be 1∣x−a∣\frac{1}{|x - a|}⁠, and the answer below would break down for x<ax < a⁠, where the quantity inside the logarithm is 0.)
  2. Expand and complete the square

    (x−a)(x−b)=x2−(a+b)x+ab=(x−a+b2)2−(a+b)24+ab=(x−a+b2)2−(a−b)24.\begin{aligned} (x - a)(x - b) &= x^2 - (a + b)x + ab \\ &= \left(x - \frac{a + b}{2}\right)^2 - \frac{(a + b)^2}{4} + ab \\ &= \left(x - \frac{a + b}{2}\right)^2 - \frac{(a - b)^2}{4}. \end{aligned}
    Half the coefficient of xx is −a+b2-\frac{a + b}{2}⁠. The leftover constant is ab−(a+b)24ab - \frac{(a + b)^2}{4} =4ab−a2−2ab−b24= \frac{4ab - a^2 - 2ab - b^2}{4} =−(a−b)24= -\frac{(a - b)^2}{4}⁠, a negative number because a≠ba \ne b⁠.
  3. Shift and use 7.4 (4)

    Put t=x−a+b2t = x - \frac{a + b}{2}⁠, so dt=dxdt = dx⁠, and let k=∣a−b∣2>0k = \frac{|a - b|}{2} > 0⁠, so k2=(a−b)24k^2 = \frac{(a - b)^2}{4}⁠. Then (x−a)(x−b)=t2−k2(x - a)(x - b) = t^2 - k^2 and

    ∫dx(x−a)(x−b)=∫dtt2−k2=log⁡∣t+t2−k2∣+C.\begin{aligned} \int\frac{dx}{\sqrt{(x - a)(x - b)}} &= \int\frac{dt}{\sqrt{t^2 - k^2}} \\ &= \log\left|t + \sqrt{t^2 - k^2}\right| + C. \end{aligned}
    "Square minus a positive constant" under a root is the shape of 7.4 (4). On the domain, t2>k2t^2 > k^2⁠, that is ∣t∣>k|t| > k⁠. The book proves 7.4 (4) with x=asec⁡θx = a\sec\theta⁠; the result also holds when t<−kt < -k⁠, because the derivative of log⁡∣t+t2−k2∣\log\left|t + \sqrt{t^2 - k^2}\right| is 1t2−k2\frac{1}{\sqrt{t^2 - k^2}} whenever ∣t∣>k|t| > k (Step 5 shows this). So it covers both pieces of the domain.
    Formula 7.4 (4); substitution, Section 7.3.1. Lesson: integrals of particular functions
  4. Return to xx

    Since t2−k2=(x−a)(x−b)t^2 - k^2 = (x - a)(x - b)⁠,

    ∫dx(x−a)(x−b)=log⁡∣x−a+b2+(x−a)(x−b)∣+C.\begin{aligned} &\int\frac{dx}{\sqrt{(x - a)(x - b)}} \\ &= \log\left|x - \frac{a + b}{2} + \sqrt{(x - a)(x - b)}\right| + C. \end{aligned}
    Undo the shift: t=x−a+b2t = x - \frac{a + b}{2}⁠, and by Step 2 the expression under the root is the original product. This is exactly the textbook's form.
  5. Check: differentiate the answer

    Write t=x−a+b2t = x - \frac{a + b}{2} and s=(x−a)(x−b)=t2−k2s = \sqrt{(x - a)(x - b)} = \sqrt{t^2 - k^2}⁠. Then s′=tss' = \frac{t}{s}⁠, and

    ddxlog⁡∣t+s∣=1+tst+s=s+tst+s=1s. ✓\begin{aligned} \frac{d}{dx}\log|t + s| &= \frac{1 + \frac ts}{t + s} \\ &= \frac{\frac{s + t}{s}}{t + s} = \frac1s. \ \checkmark \end{aligned}
    s′=2t2ss' = \frac{2t}{2s} by the chain rule (ddxt2=2t\frac{d}{dx}t^2 = 2t because t′=1t' = 1⁠). The sum t+st + s is never 0: s2=t2−k2<t2s^2 = t^2 - k^2 < t^2⁠, so s<∣t∣s < |t|⁠, and t+st + s has the sign of tt⁠. Nothing here assumed t>0t > 0⁠, so the check holds on both pieces of the domain. And 1s\frac1s is the integrand.
    Chain rule (Theorem 4, Section 5.3.1); derivative (xii), Section 7.2. Basics: logarithms and 1/x
Result ∫dx(x−a)(x−b)=log⁡∣x−a+b2+(x−a)(x−b)∣+C,\begin{aligned} &\int\frac{dx}{\sqrt{(x - a)(x - b)}} \\ &= \log\left|x - \frac{a + b}{2} + \sqrt{(x - a)(x - b)}\right| + C, \end{aligned}

valid for a≠ba \ne b and every xx outside the closed interval between aa and bb⁠. (Textbook answer: log⁡∣x−a+b2+(x−a)(x−b)∣+C\log\left|x - \frac{a + b}{2} + \sqrt{(x - a)(x - b)}\right| + C⁠.)

Check it with numbers

Take a=1a = 1⁠, b=3b = 3⁠, so F(x)=log⁡∣x−2+(x−1)(x−3)∣F(x) = \log\left|x - 2 + \sqrt{(x - 1)(x - 3)}\right| and the domain is x<1x < 1 or x>3x > 3⁠. By Section 7.8, ∫pqf(x) dx=F(q)−F(p)\int_p^q f(x)\,dx = F(q) - F(p)⁠. 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(q)−F(p)F(q) - F(p)
[4,5][4, 5]0.44578930.44578930.44578930.4457893
[−1,0][-1, 0]0.44578930.44578930.44578930.4457893

On [4,5][4, 5]⁠, F(5)−F(4)F(5) - F(4) =log⁡(3+22)−log⁡(2+3)= \log\left(3 + 2\sqrt2\right) - \log\left(2 + \sqrt3\right)⁠. The two rows agree because the graph is symmetric about x=2x = 2⁠.

Common mistakes
  1. Wrong constant after completing the square. (a+b)24−ab=(a−b)24\frac{(a + b)^2}{4} - ab = \frac{(a - b)^2}{4}⁠, not (a+b)24\frac{(a + b)^2}{4}⁠.
  2. Using the sin⁡−1\sin^{-1} formula. The x2x^2 term is positive, so this is "square minus constant": a log, not an inverse sine.
  3. Dropping the modulus. For xx below both aa and bb⁠, x−a+b2+(x−a)(x−b)x - \frac{a + b}{2} + \sqrt{(x - a)(x - b)} is negative; the modulus is needed there.
What to take away
  1. (x−a)(x−b)=(x−a+b2)2−(a−b2)2(x - a)(x - b) = \left(x - \frac{a + b}{2}\right)^2 - \left(\frac{a - b}{2}\right)^2⁠: the midpoint of aa and bb is the centre of the square.
  2. On both pieces of the domain, ∫dx(x−h)2−k2=log⁡∣x−h+(x−h)2−k2∣+C.\begin{aligned} &\int\frac{dx}{\sqrt{(x - h)^2 - k^2}} \\ &= \log\left|x - h + \sqrt{(x - h)^2 - k^2}\right| + C. \end{aligned}

Every fact used, and where it comes from

FactUsed inSource
Completing the squareStep 2Type 7.4 (8) (Basics: completing the square)
∫dxx2−a2=log⁡∣x+x2−a2∣+C\int\frac{dx}{\sqrt{x^2 - a^2}} = \log\left|x + \sqrt{x^2 - a^2}\right| + CStep 3Formula 7.4 (4)
Substitution t=x−a+b2t = x - \frac{a + b}{2}Step 3Section 7.3.1 (Basics: substitution)
ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x⁠; chain ruleStep 5Derivative (xii), Section 7.2; Theorem 4, Section 5.3.1
∫pqf(x) dx=F(q)−F(p)\int_p^q f(x)\,dx = F(q) - F(p)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 →