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

Exercise 7.4 · Q3: ∫dx(2−x)2+1\int\frac{dx}{\sqrt{(2-x)^2+1}}

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

Integrate the function (Exercise 7.4, "Integrate the functions in Exercises 1 to 23"):

1(2−x)2+1\frac{1}{\sqrt{(2 - x)^2 + 1}}
Exam answer

Let I=∫dx(2−x)2+1I = \displaystyle\int\frac{dx}{\sqrt{(2 - x)^2 + 1}}⁠.

Put 2−x=t2 - x = t⁠. Then −dx=dt-dx = dt⁠.

I=−∫dtt2+1I = -\int\frac{dt}{\sqrt{t^2 + 1}}

Using ∫dtt2+a2\displaystyle\int\frac{dt}{\sqrt{t^2 + a^2}} =log⁡∣t+t2+a2∣+C= \log\left|t + \sqrt{t^2 + a^2}\right| + C⁠,

I=−log⁡∣t+t2+1∣+C=−log⁡∣2−x+(2−x)2+1∣+C\begin{aligned} I &= -\log\left|t + \sqrt{t^2 + 1}\right| + C \\ &= -\log\left|2 - x + \sqrt{(2 - x)^2 + 1}\right| \\ &\quad + C \end{aligned}

∴ I=−log⁡∣2−x+x2−4x+5∣\therefore\ I = -\log\left|2 - x + \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

The square is already completed: under the root is "(something)2+12^2 + 1^2" with something =2−x= 2 - x⁠. Substituting t=2−xt = 2 - x gives formula 7.4 (6), ∫dtt2+a2=log⁡∣t+t2+a2∣\int\frac{dt}{\sqrt{t^2 + a^2}} = \log\left|t + \sqrt{t^2 + a^2}\right|⁠. The only trap is the sign: dt=−dxdt = -dx⁠, so a minus sign comes out in front.

Given, to find, and the plan
Given
f(x)=1(2−x)2+1f(x) = \dfrac{1}{\sqrt{(2 - x)^2 + 1}}⁠.
To find
∫f(x) dx\int f(x)\,dx⁠, and where the answer is valid.
Plan
(1) Find where ff is defined. (2) Substitute t=2−xt = 2 - x⁠, dx=−dtdx = -dt⁠. (3) Use formula 7.4 (6) with a=1a = 1⁠. (4) Return to xx and expand (2−x)2+1(2 - x)^2 + 1⁠. (5) Show that this is the book's form. (6) Differentiate back.

Basics you need

1Formula 7.4 (6)

∫dxx2+a2=log⁡∣x+x2+a2∣+C\int\frac{dx}{\sqrt{x^2 + a^2}} = \log\left|x + \sqrt{x^2 + a^2}\right| + C⁠. Lesson: integrals of particular functions

2Substitution with a minus sign

t=2−xt = 2 - x gives dtdx=−1\frac{dt}{dx} = -1⁠, so dx=−dtdx = -dt⁠. Basics: substitution (the chain rule backwards)

3Logarithm of a reciprocal

−log⁡∣p∣=log⁡∣1p∣-\log|p| = \log\left|\frac1p\right|⁠, since log⁡1p=−log⁡p\log\frac1p = -\log p⁠. Basics: logarithms and 1/x

4Difference of squares

(A+B)(A−B)=A2−B2(A + B)(A - B) = A^2 - B^2⁠. Basics: squares and completing the square

Solution

  1. Where is the integrand defined?

    (2−x)2≥0(2 - x)^2 \ge 0⁠, so (2−x)2+1≥1>0(2 - x)^2 + 1 \ge 1 > 0 for every real xx⁠. The root is of a positive number and never 0: the integrand is defined on the whole real line.

    A root in a denominator needs a strictly positive quantity under it. Nothing is excluded here.
  2. Substitute t=2−xt = 2 - x

    Put t=2−xt = 2 - x⁠. Then dt=−dxdt = -dx⁠, that is, dx=−dtdx = -dt⁠, and

    ∫dx(2−x)2+1=−∫dtt2+1.\int\frac{dx}{\sqrt{(2 - x)^2 + 1}} = -\int\frac{dt}{\sqrt{t^2 + 1}}.
    The quantity being squared is 2−x2 - x⁠, so that is the natural new variable. Its derivative is −1-1⁠, not +1+1⁠; writing dx=−dtdx = -dt before replacing anything keeps the sign from being lost.
    Integration by substitution, Section 7.3.1. Lesson: integration by substitution
  3. Use formula 7.4 (6) with a=1a = 1

    −∫dtt2+12=−log⁡∣t+t2+1∣+C.-\int\frac{dt}{\sqrt{t^2 + 1^2}} = -\log\left|t + \sqrt{t^2 + 1}\right| + C.
    "Square plus a positive constant, under a root" is the shape of formula 7.4 (6), valid for every real tt⁠.
  4. Return to xx

    Expanding, (2−x)2+1=4−4x+x2+1=x2−4x+5(2 - x)^2 + 1 = 4 - 4x + x^2 + 1 = x^2 - 4x + 5⁠. So, with t=2−xt = 2 - x⁠,

    ∫dx(2−x)2+1=−log⁡∣2−x+x2−4x+5∣+C.\begin{aligned} &\int\frac{dx}{\sqrt{(2 - x)^2 + 1}} \\ &= -\log\left|2 - x + \sqrt{x^2 - 4x + 5}\right| + C. \end{aligned}
    Expanding the square matches the form in which the book prints its answer. The quantity inside the modulus is positive for every xx⁠, since (2−x)2+1>∣2−x∣≥−(2−x)\sqrt{(2 - x)^2 + 1} > |2 - x| \ge -(2 - x)⁠.
  5. This is the book's form (and a tidier one)

    Since −log⁡∣p∣=log⁡∣1p∣-\log|p| = \log\left|\frac1p\right|⁠,

    −log⁡∣2−x+x2−4x+5∣=log⁡∣12−x+x2−4x+5∣,\begin{aligned} &-\log\left|2 - x + \sqrt{x^2 - 4x + 5}\right| \\ &= \log\left|\frac{1}{2 - x + \sqrt{x^2 - 4x + 5}}\right|, \end{aligned}

    which is exactly the textbook's answer. There is an even simpler way to write it. Let s=x2−4x+5s = \sqrt{x^2 - 4x + 5}⁠. By the difference of squares,

    (s+(2−x))(s−(2−x))=s2−(2−x)2=1,(s + (2 - x))(s - (2 - x)) = s^2 - (2 - x)^2 = 1,

    so 12−x+s=x−2+s\frac{1}{2 - x + s} = x - 2 + s⁠, and the answer is also

    log⁡∣x−2+x2−4x+5∣+C.\log\left|x - 2 + \sqrt{x^2 - 4x + 5}\right| + C.
    All three expressions are the same function, not just equal up to a constant. The last form is what you would get from formula 7.4 (6) directly with u=x−2u = x - 2⁠, because (2−x)2=(x−2)2(2 - x)^2 = (x - 2)^2⁠: the substitution u=x−2u = x - 2 has du=+dxdu = +dx and no minus sign appears. Both routes are correct.
    s2−(2−x)2s^2 - (2 - x)^2 is (x2−4x+5)−(x2−4x+4)=1(x^2 - 4x + 5) - (x^2 - 4x + 4) = 1⁠. Basics: logarithms
  6. Check: differentiate the answer back

    Use the tidy form F(x)=log⁡(x−2+s)F(x) = \log(x - 2 + s)⁠, s=x2−4x+5s = \sqrt{x^2 - 4x + 5} (the bracket is positive, as it equals 12−x+s\frac{1}{2 - x + s}⁠). Here s′=2x−42s=x−2ss' = \frac{2x - 4}{2s} = \frac{x - 2}{s}⁠, so

    F′(x)=1+x−2sx−2+s=s+x−2s (x−2+s)=1s.\begin{aligned} F'(x) &= \frac{1 + \frac{x - 2}{s}}{x - 2 + s} \\ &= \frac{s + x - 2}{s\,(x - 2 + s)} = \frac1s. \end{aligned}

    And 1s=1(2−x)2+1\frac1s = \frac{1}{\sqrt{(2 - x)^2 + 1}}⁠, the integrand. ✓\checkmark

    Chain rule: ddxlog⁡u=u′u\frac{d}{dx}\log u = \frac{u'}{u} and ddxv=v′2v\frac{d}{dx}\sqrt v = \frac{v'}{2\sqrt v}⁠. The sum s+x−2s + x - 2 appears on top and bottom and cancels. Since all forms in Step 5 are the same function, this checks the book's form too.
Result

∫dx(2−x)2+1=−log⁡∣2−x+x2−4x+5∣+C,\begin{aligned} &\int\frac{dx}{\sqrt{(2 - x)^2 + 1}} \\ &= -\log\left|2 - x + \sqrt{x^2 - 4x + 5}\right| + C, \end{aligned} valid for every real xx⁠; equivalently log⁡∣x−2+x2−4x+5∣+C\log\left|x - 2 + \sqrt{x^2 - 4x + 5}\right| + C⁠. (Textbook answer: log⁡∣12−x+x2−4x+5∣+C\log\left|\frac{1}{2 - x + \sqrt{x^2 - 4x + 5}}\right| + C⁠, the same function, Step 5.)

Check it with numbers

Take x=1x = 1 and h=0.001h = 0.001⁠, with F(x)=−log⁡∣2−x+x2−4x+5∣F(x) = -\log\left|2 - x + \sqrt{x^2 - 4x + 5}\right|⁠:

  • F(1.001)=−0.88066630F(1.001) = -0.88066630 and F(0.999)=−0.88208052F(0.999) = -0.88208052⁠,
  • slope ≈−0.88066630+0.882080520.002=0.7071\approx \frac{-0.88066630 + 0.88208052}{0.002} = 0.7071⁠,
  • integrand: 11+1=12=0.7071\frac{1}{\sqrt{1 + 1}} = \frac{1}{\sqrt2} = 0.7071⁠. ✓
Common mistakes
  1. Dropping the minus sign from dt=−dxdt = -dx⁠. Then the answer would be +log⁡∣2−x+x2−4x+5∣+\log\left|2 - x + \sqrt{x^2 - 4x + 5}\right|⁠, whose derivative is minus the integrand.
  2. Thinking the book's answer is different. log⁡∣1p∣=−log⁡∣p∣\log\left|\frac1p\right| = -\log|p|⁠; it is the same answer.
  3. Expanding first and then completing the square again. It works, but the question already gives the completed square; use it.
What to take away
  1. A shift like t=2−xt = 2 - x is a substitution with dt=−dxdt = -dx⁠; track the sign.
  2. Since (2−x)2=(x−2)2(2 - x)^2 = (x - 2)^2⁠, choosing u=x−2u = x - 2 avoids the minus sign altogether.
  3. The product of t2+1+t\sqrt{t^2 + 1} + t and t2+1−t\sqrt{t^2 + 1} - t is 1, so −log⁡∣t+t2+1∣-\log\left|t + \sqrt{t^2 + 1}\right| equals log⁡∣t2+1−t∣\log\left|\sqrt{t^2 + 1} - t\right|⁠.

Every fact used, and where it comes from

FactUsed inSource
Substitution t=2−xt = 2 - x⁠, dt=−dxdt = -dxStep 2Section 7.3.1 (Lesson: substitution)
∫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 (6), Section 7.4
−log⁡∣p∣=log⁡∣1p∣-\log|p| = \log\left|\frac1p\right|Step 5Laws of logarithms (Basics: logarithms)
(A+B)(A−B)=A2−B2(A + B)(A - B) = A^2 - B^2Step 5Algebraic identity
Chain rule; F′=fF' = f checks the answerStep 6Theorem 4, Section 5.3.1; Property (I), Section 7.2.1
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 →