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

Exercise 7.2 · Q3: ∫dxx+xlog⁡x\int \frac{dx}{x+x\log x}

Exercise 7.2Integration by substitution · Section 7.3.1
The question

Integrate the function:

1x+xlog⁡x\frac{1}{x + x\log x}
Exam answer

Let I=∫dxx+xlog⁡xI = \displaystyle\int\frac{dx}{x + x\log x} =∫dxx(1+log⁡x)= \displaystyle\int\frac{dx}{x(1 + \log x)}⁠.

Put 1+log⁡x=t1 + \log x = t⁠. Then 1x dx=dt\frac1x\,dx = dt⁠.

∴ I=∫dtt=log⁡∣t∣+C\therefore\ I = \int\frac{dt}{t} = \log|t| + C

∴ I=log⁡∣1+log⁡x∣+C\therefore\ I = \log\left|1 + \log x\right| + C⁠.

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

The one idea this problem is built on

Take out the common factor xx⁠: the denominator is x(1+log⁡x)x(1+\log x)⁠. The integrand is then 11+log⁡x\frac{1}{1+\log x} times 1x\frac1x⁠, and 1x\frac1x is the derivative of 1+log⁡x1+\log x⁠. So t=1+log⁡xt = 1+\log x turns it into ∫dtt=log⁡∣t∣\int\frac{dt}{t} = \log|t|⁠.

Given, to find, and the plan
Given
f(x)=1x+xlog⁡xf(x) = \dfrac{1}{x + x\log x}⁠. It needs x>0x > 0 (for log⁡x\log x⁠) and a non-zero denominator. Since x+xlog⁡x=x(1+log⁡x)x + x\log x = x(1+\log x) and x≠0x \ne 0⁠, the denominator is zero only when log⁡x=−1\log x = -1⁠, that is x=e−1=1ex = e^{-1} = \frac1e⁠. So ff is defined for x>0x > 0⁠, x≠1ex \ne \frac1e⁠.
To find
∫dxx+xlog⁡x\displaystyle\int \frac{dx}{x + x\log x}⁠.
Plan
(1) Factor the denominator. (2) Substitute t=1+log⁡xt = 1+\log x⁠. (3) Integrate 1t\frac1t⁠. (4) Return to xx⁠. (5) Differentiate to check.

Basics you need

1Taking out a common factor

x+xlog⁡x=x⋅1+x⋅log⁡xx + x\log x = x\cdot 1 + x\cdot\log x⁠, and taking out the common factor xx gives x(1+log⁡x)x(1+\log x)⁠.

2Substitution

Put t=g(x)t = g(x)⁠, so dt=g′(x) dxdt = g'(x)\,dx (Section 7.3.1). Basics: substitution

3Logs

ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x for x>0x>0⁠, and ∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C for t≠0t \ne 0 (standard formula (xii), Section 7.2). Basics: logarithms and 1/x

Solution

  1. Factor the denominator

    1x+xlog⁡x=1x(1+log⁡x)=11+log⁡x⋅1x.\frac{1}{x + x\log x} = \frac{1}{x(1+\log x)} = \frac{1}{1+\log x}\cdot\frac{1}{x}.
    In its original form the integrand shows no pattern. Factoring reveals two pieces: a function of 1+log⁡x1+\log x⁠, and 1x\frac1x⁠, which is the derivative of 1+log⁡x1+\log x⁠. That pairing is what substitution needs.
  2. Substitute t=1+log⁡xt = 1+\log x

    t=1+log⁡x,dtdx=0+1x,dt=dxx.\begin{aligned} t &= 1 + \log x, \\ \frac{dt}{dx} &= 0 + \frac{1}{x}, \\ dt &= \frac{dx}{x}. \end{aligned}

    So

    ∫11+log⁡x⋅dxx=∫dtt.\int \frac{1}{1+\log x}\cdot\frac{dx}{x} = \int \frac{dt}{t}.
    The first factor becomes 1t\frac1t and dxx\frac{dx}{x} is exactly dtdt⁠. On our domain x≠1ex \ne \frac1e⁠, so t=1+log⁡x≠0t = 1+\log x \ne 0⁠, and 1t\frac1t is defined.
    Substitution, Section 7.3.1; ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Chapter 5, Theorem 5). Lesson: integration by substitution
  3. Integrate in tt

    ∫dtt=log⁡∣t∣+C.\int\frac{dt}{t} = \log|t| + C.
    Standard formula (xii) with the variable called tt⁠. The absolute value matters here: t=1+log⁡xt = 1+\log x is negative when 0<x<1e0 < x < \frac1e⁠, and the log of a negative number is not defined.
    Standard formula (xii), Section 7.2. Basics: logarithms and 1/x
  4. Return to xx

    log⁡∣t∣+C=log⁡∣1+log⁡x∣+C.\log|t| + C = \log\left|1+\log x\right| + C.
    Replace tt by 1+log⁡x1+\log x⁠. Keep the absolute value: it makes the answer valid on both pieces of the domain, 0<x<1e0 < x < \frac1e (where 1+log⁡x<01+\log x < 0⁠) and x>1ex > \frac1e (where 1+log⁡x>01+\log x > 0⁠).
  5. Check: differentiate the answer

    Chain rule with inner u=1+log⁡xu = 1+\log x and outer log⁡∣u∣\log|u|⁠, whose derivative is 1u\frac1u⁠:

    ddxlog⁡∣1+log⁡x∣=11+log⁡x⋅1x=1x(1+log⁡x)=1x+xlog⁡x.\begin{aligned} \frac{d}{dx}\log\left|1+\log x\right| &= \frac{1}{1+\log x}\cdot\frac{1}{x} \\ &= \frac{1}{x(1+\log x)} \\ &= \frac{1}{x + x\log x}. \end{aligned}

    This is the integrand, on every part of the domain.

    The derivative of log⁡∣u∣\log|u| is 1u\frac1u whether uu is positive or negative (Section 7.2 shows this for log⁡∣x∣\log|x|⁠). So the check covers both intervals.
    ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1x⁠, x≠0x \ne 0⁠, Section 7.2; chain rule, Chapter 5, Theorem 4. Basics: integration undoes differentiation
Result

For x>0x > 0⁠, x≠1ex \ne \frac1e⁠,

∫dxx+xlog⁡x=log⁡∣1+log⁡x∣+C.\int \frac{dx}{x + x\log x} = \log\left|1+\log x\right| + C.

(Textbook answer: log⁡∣1+log⁡x∣+C\log|1+\log x| + C⁠.) Strictly, the constant may be chosen separately on (0,1e)(0, \frac1e) and on (1e,∞)(\frac1e, \infty)⁠, because the integrand is not defined at 1e\frac1e⁠.

Check it with numbers

Let F(x)=log⁡∣1+log⁡x∣F(x) = \log|1+\log x|⁠. At x=2x = 2 the integrand is 12+2log⁡2≈0.295308\frac{1}{2+2\log 2} \approx 0.295308⁠. With h=0.0001h = 0.0001⁠:

F(2.0001)≈0.5266185638,F(1.9999)≈0.5265595022,F(2.0001)−F(1.9999)0.0002≈0.295308.\begin{aligned} F(2.0001) &\approx 0.5266185638, \\ F(1.9999) &\approx 0.5265595022, \\ \frac{F(2.0001)-F(1.9999)}{0.0002} &\approx 0.295308. \end{aligned}

The slope of our answer equals the integrand.

Common mistakes
  1. Splitting the fraction. 1x+xlog⁡x\frac{1}{x + x\log x} is not 1x+1xlog⁡x\frac1x + \frac{1}{x\log x}⁠. A sum in the denominator cannot be split.
  2. Dropping the absolute value. 1+log⁡x1+\log x is negative for 0<x<1e0 < x < \frac1e⁠, so log⁡(1+log⁡x)\log(1+\log x) would be undefined there.
  3. Choosing t=log⁡xt = \log x⁠. It also works (giving ∫dt1+t\int\frac{dt}{1+t}⁠), but then a second step is needed; t=1+log⁡xt = 1+\log x does it at once.
What to take away
  1. Factor first: a hidden common factor often reveals the derivative you need.
  2. This is again the pattern ∫g′(x)g(x) dx=log⁡∣g(x)∣+C\int\frac{g'(x)}{g(x)}\,dx = \log|g(x)| + C⁠, with g(x)=1+log⁡xg(x) = 1+\log x⁠.
  3. State where the answer holds: here x>0x > 0 and x≠1ex \ne \frac1e⁠.

Every fact used, and where it comes from

FactUsed inSource
log⁡x=−1  ⟺  x=e−1\log x = -1 \iff x = e^{-1}GivenDefinition of the natural log (Chapter 5, Section 5.4)
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xStep 2Chapter 5, Theorem 5
SubstitutionStep 2Section 7.3.1 (Lesson: substitution)
∫dtt=log⁡∣t∣+C\int\frac{dt}{t} = \log|t| + C⁠; ddxlog⁡∣x∣=1x\frac{d}{dx}\log|x| = \frac1xSteps 3, 5Standard formula (xii), Section 7.2
Chain ruleStep 5Chapter 5, Theorem 4
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 →