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

Exercise 7.1 · Q10: ∫(x−1x)2dx\int \left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 dx

Exercise 7.1Properties of indefinite integrals · Section 7.2.1
The question

Find the following integral:

∫(x−1x)2dx\int\left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 dx
Exam answer

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

Expanding the square (x>0x > 0⁠),

I=∫(x−2+1x)dxI = \int\left(x - 2 + \frac1x\right)dx

∴ I=x22−2x+log⁡∣x∣+C\therefore\ I = \dfrac{x^2}{2} - 2x + \log|x| + C⁠.

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

The one idea this problem is built on

Expand the square first. The cross term is −2x⋅1x=−2-2\sqrt{x}\cdot\frac{1}{\sqrt{x}} = -2⁠, so the integrand becomes x−2+1xx - 2 + \frac{1}{x}⁠. The first two terms use the power rule, and 1x\frac1x is the one power the power rule cannot handle: its integral is log⁡∣x∣\log|x|⁠.

Given, to find, and the plan
Given
The integrand (x−1x)2\left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2⁠. Because of x\sqrt{x} in a denominator, it is defined only for x>0x > 0⁠.
To find
The indefinite integral on x>0x > 0⁠.
Plan
(1) Fix the domain. (2) Expand the square and simplify. (3) Integrate term by term, with ∫1x dx=log⁡∣x∣\int\frac1x\,dx = \log|x|⁠. (4) Differentiate back to check. (5) Compare with the key.

Basics you need

1Square of a difference

(p−q)2=p2−2pq+q2(p - q)^2 = p^2 - 2pq + q^2⁠. Basics: splitting fractions

2Power rule for integrals

∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C for n≠−1n \ne -1 (item (i), Section 7.2). Basics: powers of x and the power rule

3The exception n=−1n = -1

ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x for x≠0x \ne 0⁠, so ∫1x dx=log⁡∣x∣+C\int\frac1x\,dx = \log|x| + C (item (xii), Section 7.2, and Example 1 (iii)). Basics: logarithms and 1/x

Solution

  1. Fix the domain

    x\sqrt{x} needs x≥0x \ge 0⁠, and 1x\frac{1}{\sqrt{x}} also needs x≠0\sqrt{x} \ne 0⁠. So the integrand is defined exactly for x>0x > 0⁠, and we work on the interval (0,∞)(0, \infty)⁠.

    Expanding will produce 1x\frac1x⁠, which looks as if it allowed negative xx too. It does not: the original integrand never existed there. Recording the domain now keeps the answer honest.
    Note after the standard formulae, Section 7.2 (keep the interval in mind). Basics: powers and roots
  2. Expand the square

    With p=xp = \sqrt{x} and q=1xq = \frac{1}{\sqrt{x}}⁠:

    p2=(x)2=x,2pq=2x⋅1x=2,q2=1(x)2=1x.\begin{aligned} p^2 &= \left(\sqrt{x}\right)^2 = x, \\ 2pq &= 2\sqrt{x}\cdot\frac{1}{\sqrt{x}} = 2, \\ q^2 &= \frac{1}{\left(\sqrt{x}\right)^2} = \frac{1}{x}. \end{aligned}

    Hence, for x>0x > 0⁠,

    (x−1x)2=x−2+1x.\left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 = x - 2 + \frac{1}{x}.
    An integral of a square has no shortcut of its own, but a sum of powers does. The middle term simplifies to the constant 22 because x\sqrt{x} cancels with 1x\frac{1}{\sqrt{x}} (allowed since x≠0\sqrt{x} \ne 0⁠).
    (p−q)2=p2−2pq+q2(p - q)^2 = p^2 - 2pq + q^2⁠; (x)2=x\left(\sqrt{x}\right)^2 = x for x≥0x \ge 0⁠. Basics: splitting fractions
  3. Integrate term by term

    ∫(x−2+1x)dx=∫x dx−2∫dx+∫1x dx=x22−2x+log⁡∣x∣+C.\begin{aligned} &\int\left(x - 2 + \frac1x\right)dx \\ &= \int x\,dx - 2\int dx + \int\frac1x\,dx \\ &= \frac{x^2}{2} - 2x + \log|x| + C. \end{aligned}
    x=x1x = x^1 uses the power rule with n=1n = 1⁠. The constant 22 integrates to 2x2x⁠. The term 1x=x−1\frac1x = x^{-1} is the single case n=−1n = -1 excluded from the power rule (it would divide by n+1=0n + 1 = 0⁠); its integral is log⁡∣x∣\log|x|⁠.
    Standard formulae, items (i) and (xii), Section 7.2; Property (V), Section 7.2.1. Basics: logarithms and 1/x
  4. Simplify for the domain

    On our domain x>0x > 0 we have ∣x∣=x|x| = x⁠, so the answer can also be written

    x22−2x+log⁡x+C.\frac{x^2}{2} - 2x + \log x + C.
    The absolute value in log⁡∣x∣\log|x| is there so that the formula also works for negative xx⁠. Here xx is always positive, so log⁡∣x∣\log|x| and log⁡x\log x are the same function. Both forms are correct.
    ∣x∣=x|x| = x for x>0x > 0⁠. Basics: logarithms and 1/x
  5. Check: differentiate the answer back

    ddx(x22−2x+log⁡x+C)=x−2+1x=(x−1x)2, x>0.  ✓\begin{aligned} &\frac{d}{dx}\left(\frac{x^2}{2} - 2x + \log x + C\right) \\ &= x - 2 + \frac1x \\ &= \left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2,\ x > 0. \;\checkmark \end{aligned}
    The derivative returns the expanded integrand, which Step 2 showed equals the original square for every x>0x > 0⁠.
    Property (I), Section 7.2.1; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5, Section 5.4, Chapter 5). Basics: integration undoes differentiation
Result

For x>0x > 0⁠,

∫(x−1x)2dx=x22−2x+log⁡∣x∣+C,\begin{aligned} &\int\left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 dx \\ &= \frac{x^2}{2} - 2x + \log|x| + C, \end{aligned}

where log⁡∣x∣=log⁡x\log|x| = \log x on this domain. (Textbook answer: x22+log⁡∣x∣−2x+C\frac{x^2}{2} + \log|x| - 2x + C⁠, the same terms in a different order.)

Check it with numbers

At x=4x = 4 with h=0.001h = 0.001⁠, for F(x)=x22−2x+log⁡xF(x) = \frac{x^2}{2} - 2x + \log x⁠:

F(4.001)−F(3.999)0.002=1.388544830−1.3840448300.002≈2.2500000.\begin{aligned} &\frac{F(4.001) - F(3.999)}{0.002} \\ &= \frac{1.388544830 - 1.384044830}{0.002} \\ &\approx 2.2500000. \end{aligned}

The integrand at x=4x = 4 is (2−12)2=2.25\left(2 - \frac12\right)^2 = 2.25⁠. ✓

Common mistakes
  1. Dropping the cross term. (x−1x)2\left(\sqrt{x} - \frac{1}{\sqrt{x}}\right)^2 is not x+1xx + \frac1x and not x−1xx - \frac1x⁠; the middle term −2-2 must be there.
  2. Power rule on 1x\frac1x⁠. x00\frac{x^{0}}{0} is meaningless. The integral of x−1x^{-1} is log⁡∣x∣\log|x|⁠.
  3. Forgetting that −2-2 integrates to −2x-2x⁠. A constant term becomes a multiple of xx⁠.
What to take away
  1. Expand squares and simplify roots before integrating.
  2. Every power xnx^n uses the power rule, except n=−1n = -1⁠, which gives log⁡∣x∣\log|x|⁠.
  3. Read the domain from the original integrand, not from the simplified one.

Every fact used, and where it comes from

FactUsed inSource
Keep the interval in mindSteps 1, 4Note after the standard formulae, Section 7.2
(p−q)2=p2−2pq+q2(p - q)^2 = p^2 - 2pq + q^2Step 2Algebra
∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C⁠, n≠−1n \ne -1⁠; ∫dx=x+C\int dx = x + CStep 3Standard formulae, item (i), Section 7.2
∫1x dx=log⁡∣x∣+C\int\frac1x\,dx = \log|x| + CStep 3Standard formulae, item (xii), Section 7.2; Example 1 (iii)
Integrate term by termStep 3Property (V), Section 7.2.1
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠, x>0x > 0Step 5Theorem 5, Section 5.4 (Chapter 5)
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 →