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

Exercise 7.6 · Q5: ∫xlog⁡2x dx\int x\log 2x\,dx

Exercise 7.6Integration by parts · Section 7.6
The question

Integrate the functions in Exercises 1 to 22.

5. xlog⁡2xx\log 2x

Exam answer

Let I=∫xlog⁡2x dxI = \displaystyle\int x\log 2x\,dx⁠.

Taking log⁡2x\log 2x as the first function (its derivative is 22x=1x\frac{2}{2x} = \frac1x⁠), by parts:

I=log⁡2x⋅x22−∫1x⋅x22 dx=x22log⁡2x−12∫x dx=x22log⁡2x−12⋅x22+C\begin{aligned} I &= \log 2x\cdot\frac{x^2}{2} - \int\frac1x\cdot\frac{x^2}{2}\,dx \\ &= \frac{x^2}{2}\log 2x - \frac12\int x\,dx \\ &= \frac{x^2}{2}\log 2x - \frac12\cdot\frac{x^2}{2} + C \end{aligned}

∴ I=x22log⁡2x−x24+C\therefore\ I = \dfrac{x^2}{2}\log 2x - \dfrac{x^2}{4} + C⁠.

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

The one idea this problem is built on

Exactly as in Question 4, the logarithm is the function to differentiate. The only new point: the derivative of log⁡2x\log 2x is still 1x\frac1x⁠, because the chain rule's factor 2 cancels the 2 inside. So the working is the same as Question 4 with log⁡2x\log 2x in place of log⁡x\log x⁠.

Given, to find, and the plan
Given
The function xlog⁡2xx\log 2x⁠. It is defined only for 2x>02x > 0⁠, that is x>0x > 0⁠.
To find
∫xlog⁡2x dx\int x\log 2x\,dx on x>0x > 0⁠.
Plan
(1) Name uu and dvdx\frac{dv}{dx}⁠. (2) Find dudx\frac{du}{dx} (chain rule) and vv⁠. (3) Apply the formula. (4) Finish. (5) Cross-check with Question 4. (6) Differentiate back.

Basics you need

1Integration by parts

Section 7.6, equation (1):

∫u dvdx dx=uv−∫v dudx dx,\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx,

with uu the first function (differentiated) and dvdx\frac{dv}{dx} the second (integrated to give vv⁠). Lesson: integration by parts

2Which factor should be uu⁠?

Remark (iii) after Example 17: when the other function is logarithmic, the logarithm is the first function. Memory aid ILATE (Inverse trigonometric, Logarithmic, Algebraic, Trigonometric, Exponential; not in the book): L comes before A.

3Chain rule for log⁡2x\log 2x

ddxlog⁡2x=12x⋅2=1x\frac{d}{dx}\log 2x = \frac{1}{2x}\cdot 2 = \frac1x for x>0x > 0⁠. Basics: logarithms and 1/x

4Log of a product

log⁡2x=log⁡2+log⁡x\log 2x = \log 2 + \log x for x>0x > 0⁠, used in the cross-check. Basics: logarithms and 1/x

Solution

  1. Name uu and dvdx\frac{dv}{dx}

    u=log⁡2x(first),dvdx=x(second).\begin{aligned} u &= \log 2x \quad (\text{first}), \\ \frac{dv}{dx} &= x \quad (\text{second}). \end{aligned}
    ILATE: Logarithmic before Algebraic. Differentiating log⁡2x\log 2x gives a simple algebraic 1x\frac1x⁠; integrating xx is the easy power rule. The other way round we would first need ∫log⁡2x dx\int\log 2x\,dx⁠, which is itself a by-parts problem.
    Remark (iii) after Example 17, Section 7.6. Lesson: integration by parts
  2. Find dudx\frac{du}{dx} and vv

    dudx=12x⋅2=1x,v=∫x dx=x22.\frac{du}{dx} = \frac{1}{2x}\cdot 2 = \frac1x, \qquad v = \int x\,dx = \frac{x^2}{2}.
    Chain rule: the outer function is log⁡\log⁠, with derivative 12x\frac{1}{2x} at 2x2x⁠; the inner function is 2x2x⁠, with derivative 2. Their product is 1x\frac1x⁠. No constant in vv (Remark (ii) after Example 17).
    Chain rule (Chapter 5); standard formula (i). Basics: logarithms and 1/x
  3. Apply the formula

    ∫xlog⁡2x dx=uv−∫v dudx dx=x22log⁡2x−∫x22⋅1x dx=x22log⁡2x−12∫x dx.\begin{aligned} \int x\log 2x\,dx &= uv - \int v\,\frac{du}{dx}\,dx \\ &= \frac{x^2}{2}\log 2x - \int\frac{x^2}{2}\cdot\frac1x\,dx \\ &= \frac{x^2}{2}\log 2x - \frac12\int x\,dx. \end{aligned}
    x22⋅1x=x2\frac{x^2}{2}\cdot\frac1x = \frac x2 (as x≠0x \ne 0⁠): the logarithm is gone from the remaining integral.
    Section 7.6, equation (1). Lesson: integration by parts
  4. Finish the remaining integral

    ∫xlog⁡2x dx=x22log⁡2x−x24+C.\int x\log 2x\,dx = \frac{x^2}{2}\log 2x - \frac{x^2}{4} + C.
    12∫x dx=12⋅x22=x24\frac12\int x\,dx = \frac12\cdot\frac{x^2}{2} = \frac{x^2}{4}⁠, by the power rule. One constant CC at the end.
    Standard formula (i), Section 7.2. Basics: powers of x
  5. Cross-check with Question 4

    For x>0x > 0⁠, log⁡2x=log⁡2+log⁡x\log 2x = \log 2 + \log x⁠, so

    ∫xlog⁡2x dx=log⁡2∫x dx+∫xlog⁡x dx=x22log⁡2+x22log⁡x−x24+C=x22log⁡2x−x24+C.\begin{aligned} \int x\log 2x\,dx &= \log 2\int x\,dx + \int x\log x\,dx \\ &= \frac{x^2}{2}\log 2 + \frac{x^2}{2}\log x - \frac{x^2}{4} + C \\ &= \frac{x^2}{2}\log 2x - \frac{x^2}{4} + C. \end{aligned}
    The second route uses Question 4's answer and the law log⁡a+log⁡b=log⁡ab\log a + \log b = \log ab⁠. Both routes give the same function, which is a strong check.
    Laws of logarithms; Question 4. Exercise 7.6 Q4
  6. Check: differentiate the answer

    ddx(x22log⁡2x−x24)=xlog⁡2x+x22⋅1x−x2=xlog⁡2x.\begin{aligned} &\frac{d}{dx}\Big(\frac{x^2}{2}\log 2x - \frac{x^2}{4}\Big) \\ &= x\log 2x + \frac{x^2}{2}\cdot\frac1x - \frac x2 \\ &= x\log 2x. \end{aligned}
    Product rule on the first term (with ddxlog⁡2x=1x\frac{d}{dx}\log 2x = \frac1x⁠); the x2\frac x2 terms cancel and the integrand is left, for every x>0x > 0⁠.
    Product rule and chain rule. Basics: integration undoes differentiation
Result ∫xlog⁡2x dx=x22log⁡2x−x24+C,\int x\log 2x\,dx = \frac{x^2}{2}\log 2x - \frac{x^2}{4} + C,

valid for x>0x > 0⁠. (Textbook answer: x22log⁡2x−x24+C\frac{x^2}{2}\log 2x - \frac{x^2}{4} + C⁠, the same.)

Check it with numbers

With F(x)=x22log⁡2x−x24F(x) = \frac{x^2}{2}\log 2x - \frac{x^2}{4}⁠, on [12,e2]\left[\frac12, \frac e2\right]⁠, where log⁡1=0\log 1 = 0 and log⁡e=1\log e = 1⁠:

F(e2)−F(12)=(e28−e216)−(0−116)=e2+116=0.5243160062…\begin{aligned} F\left(\tfrac e2\right) - F\left(\tfrac12\right) &= \left(\frac{e^2}{8} - \frac{e^2}{16}\right) - \left(0 - \frac{1}{16}\right) \\ &= \frac{e^2 + 1}{16} = 0.5243160062\ldots \end{aligned}

Numerical integration of xlog⁡2xx\log 2x over [12,e2]\left[\frac12, \frac e2\right] gives 0.5243160062…0.5243160062\ldots⁠, the same.

Common mistakes
  1. ddxlog⁡2x=12x\frac{d}{dx}\log 2x = \frac{1}{2x}⁠. This forgets the inner derivative 2; the correct derivative is 1x\frac1x⁠.
  2. Changing log⁡2x\log 2x to log⁡x\log x in the answer. They differ by the constant log⁡2\log 2⁠, but x22log⁡2\frac{x^2}{2}\log 2 is not a constant, so the 2 must stay (or be handled as in Step 5).
  3. Forgetting the domain x>0x > 0⁠.
What to take away
  1. ddxlog⁡kx=1x\frac{d}{dx}\log kx = \frac1x for any constant k>0k > 0 (and x>0x > 0⁠).
  2. The method of Question 4 works unchanged: logarithm as uu⁠, power of xx as dvdx\frac{dv}{dx}⁠.
  3. A second route (here, splitting the logarithm) is a cheap and strong check.

Every fact used, and where it comes from

FactUsed inSource
Integration by partsStep 3Section 7.6, equation (1) (Lesson: integration by parts)
Logarithm as the first function (ILATE)Step 1Remark (iii) after Example 17, Section 7.6
No constant needed in vvStep 2Remark (ii) after Example 17, Section 7.6
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠; chain ruleSteps 2, 6Standard formula (xii), Section 7.2; Chapter 5, Section 5.3.1
Power rule ∫x dx=x22+C\int x\,dx = \frac{x^2}{2} + CSteps 2, 4, 5Standard formula (i), Section 7.2
log⁡ab=log⁡a+log⁡b\log ab = \log a + \log bStep 5Laws of logarithms (Chapter 5, Section 5.4)
Product ruleStep 6Chapter 5, Section 5.3
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 →