Class 12 Maths, Worked in Full Past papersGet updates
Chapter 5 · Continuity and Differentiability

Exercise 5.5 · Q7: Differentiate (log⁡x)x+xlog⁡x(\log x)^x+x^{\log x}⁠, x>1x>1

Exercise 5.5Logarithmic differentiation · Section 5.5
The question

Differentiate the function w.r.t. xx⁠:

(log⁡x)x+xlog⁡x(\log x)^x + x^{\log x}
Exam answer

Let u=(log⁡x)xu = (\log x)^x and v=xlog⁡xv = x^{\log x}⁠, so y=u+vy = u + v⁠, where x>1x > 1⁠.

Taking log on both sides, log⁡u=xlog⁡(log⁡x)\log u = x\log(\log x)⁠. Differentiating w.r.t. xx⁠,

1u⋅dudx=1⋅log⁡(log⁡x)+x⋅1log⁡x⋅1x=log⁡(log⁡x)+1log⁡x\begin{aligned} \frac1u\cdot\frac{du}{dx} &= 1\cdot\log(\log x) \\ &\quad + x\cdot\frac{1}{\log x}\cdot\frac1x \\ &= \log(\log x) + \frac{1}{\log x} \end{aligned} ∴ dudx=(log⁡x)x×[log⁡(log⁡x)+1log⁡x]=(log⁡x)x−1×[1+log⁡x⋅log⁡(log⁡x)]\begin{aligned} \therefore\ \frac{du}{dx} &= (\log x)^x \\ &\quad\times\bigg[\log(\log x) + \frac{1}{\log x}\bigg] \\ &= (\log x)^{x - 1} \\ &\quad\times\big[1 + \log x\cdot\log(\log x)\big] \end{aligned}

Also log⁡v=log⁡x⋅log⁡x=(log⁡x)2\log v = \log x\cdot\log x = (\log x)^2⁠. Differentiating w.r.t. xx⁠,

1v⋅dvdx=2log⁡x⋅1x\frac1v\cdot\frac{dv}{dx} = 2\log x\cdot\frac1x ∴ dvdx=xlog⁡x⋅2log⁡xx=2xlog⁡x−1log⁡x\begin{aligned} \therefore\ \frac{dv}{dx} &= x^{\log x}\cdot\frac{2\log x}{x} \\ &= 2x^{\log x - 1}\log x \end{aligned}

∴ dydx=(log⁡x)x−1×[1+log⁡x⋅log⁡(log⁡x)]+2xlog⁡x−1log⁡x\begin{aligned} \therefore\ \dfrac{dy}{dx} &= (\log x)^{x - 1} \\ &\quad\times\big[1 + \log x\cdot\log(\log x)\big] \\ &\quad + 2x^{\log x - 1}\log x \end{aligned}

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

The one idea this problem is built on

Two variable powers are added, so we differentiate them separately (sum rule) and take logarithms of each one. For (log⁡x)x(\log x)^x⁠, the log brings down the exponent xx⁠; for xlog⁡xx^{\log x}⁠, the log gives log⁡x⋅log⁡x=(log⁡x)2\log x\cdot\log x = (\log x)^2⁠, which is easy. The base log⁡x\log x must be positive, so everything happens for x>1x > 1⁠.

Given, to find, and the plan
Given
y=u+vy = u + v⁠, with u=(log⁡x)xu = (\log x)^x⁠, v=xlog⁡xv = x^{\log x}⁠.
To find
dydx\frac{dy}{dx}⁠, and where it holds.
Plan
(1) Domain. (2) u′u' from log⁡u=xlog⁡(log⁡x)\log u = x\log(\log x)⁠. (3) v′v' from log⁡v=(log⁡x)2\log v = (\log x)^2⁠. (4) Add and match the textbook's form.

Basics you need

1Variable powers need a positive base

For p>0p > 0⁠: pq=eqlog⁡p>0p^q = e^{q\log p} > 0 and log⁡pq=qlog⁡p\log p^q = q\log p (Example 25, Section 5.4). Also log⁡x>0  ⟺  x>1\log x > 0 \iff x > 1⁠. Basics: exponentials and logarithms

2Sum rule and product rule

(u+v)′=u′+v′(u + v)' = u' + v'⁠, (fg)′=f′g+fg′(fg)' = f'g + fg' (Section 5.3). Basics: derivative rules

3Chain rule with logs

ddxlog⁡(log⁡x)=1xlog⁡x\frac{d}{dx}\log(\log x) = \frac{1}{x\log x} for x>1x > 1⁠; ddx(log⁡x)2=2log⁡xx\frac{d}{dx}(\log x)^2 = \frac{2\log x}{x} (Theorems 4 and 5). Basics: composite functions

Solution

  1. Domain: x>1x > 1

    v=xlog⁡xv = x^{\log x} needs x>0x > 0 (for log⁡x\log x and for the positive base xx⁠). u=(log⁡x)xu = (\log x)^x has a variable exponent, so its base must be positive: log⁡x>0\log x > 0⁠, that is, x>1x > 1⁠. So yy is defined, and both terms are positive, for x>1x > 1⁠.

    For 0<x<10 < x < 1⁠, log⁡x<0\log x < 0 and, for example, (log⁡12)1/2\left(\log\frac12\right)^{1/2} is the square root of a negative number. At x=1x = 1⁠, u=01=0u = 0^1 = 0⁠, and log⁡u\log u does not exist. So logarithmic differentiation of uu works for x>1x > 1 only; the answer key does not say so.
    log⁡\log is increasing with log⁡1=0\log 1 = 0 (Section 5.4). Basics: exponentials and logarithms
  2. Split with the sum rule

    dydx=dudx+dvdx\frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx}⁠.

    The log of a sum does not split, so we never take log⁡y\log y here. Each term separately is a positive power, ready for logarithmic differentiation.
    (u+v)′=u′+v′(u + v)' = u' + v' (Section 5.3). Basics: derivative rules
  3. u=(log⁡x)xu = (\log x)^x

    log⁡u=xlog⁡(log⁡x)\log u = x\log(\log x)⁠. Product rule, with ddxlog⁡(log⁡x)=1log⁡x⋅1x\frac{d}{dx}\log(\log x) = \frac{1}{\log x}\cdot\frac1x (chain rule, inner log⁡x\log x⁠):

    1u⋅dudx=1⋅log⁡(log⁡x)+x⋅1xlog⁡x=log⁡(log⁡x)+1log⁡x.\begin{aligned} \frac1u\cdot\frac{du}{dx} &= 1\cdot\log(\log x) + x\cdot\frac{1}{x\log x} \\ &= \log(\log x) + \frac{1}{\log x}. \end{aligned}

    So

    dudx=(log⁡x)x[log⁡(log⁡x)+1log⁡x].\frac{du}{dx} = (\log x)^x\left[\log(\log x) + \frac{1}{\log x}\right].
    The xx in front cancels the xx in 1xlog⁡x\frac{1}{x\log x}⁠. Both terms are defined because log⁡x>0\log x > 0⁠.
    Product rule; chain rule with ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5). Lesson: logarithmic differentiation
  4. Rewrite u′u' in the textbook's form

    Take 1log⁡x\frac{1}{\log x} out of the bracket:

    dudx=(log⁡x)xlog⁡x×[log⁡x⋅log⁡(log⁡x)+1]=(log⁡x)x−1×[1+log⁡x⋅log⁡(log⁡x)].\begin{aligned} \frac{du}{dx} &= \frac{(\log x)^x}{\log x} \\ &\quad\times\left[\log x\cdot\log(\log x) + 1\right] \\ &= (\log x)^{x-1} \\ &\quad\times\left[1 + \log x\cdot\log(\log x)\right]. \end{aligned}
    log⁡(log⁡x)=1log⁡x⋅log⁡xlog⁡(log⁡x)\log(\log x) = \frac{1}{\log x}\cdot\log x\log(\log x)⁠, so the bracket is unchanged; and (log⁡x)x⋅(log⁡x)−1=(log⁡x)x−1(\log x)^x\cdot(\log x)^{-1} = (\log x)^{x-1} by the index law (the base is positive).
    Index law pm⋅p−1=pm−1p^m\cdot p^{-1} = p^{m-1} for p>0p > 0⁠. Basics: exponentials and logarithms
  5. v=xlog⁡xv = x^{\log x}

    For x>0x > 0⁠, log⁡v=log⁡x⋅log⁡x=(log⁡x)2\log v = \log x\cdot\log x = (\log x)^2⁠. Chain rule, outer t2t^2⁠, inner t=log⁡xt = \log x⁠:

    1v⋅dvdx=2log⁡x⋅1x.\frac1v\cdot\frac{dv}{dx} = 2\log x\cdot\frac1x.

    So

    dvdx=xlog⁡x⋅2log⁡xx=2xlog⁡x−1log⁡x.\begin{aligned} \frac{dv}{dx} &= x^{\log x}\cdot\frac{2\log x}{x} \\ &= 2x^{\log x - 1}\log x. \end{aligned}
    The exponent log⁡x\log x comes down as a factor in front of log⁡x\log x⁠, giving (log⁡x)2(\log x)^2⁠. Dividing xlog⁡xx^{\log x} by xx lowers the exponent by 11⁠. This term alone is valid for all x>0x > 0⁠.
    log⁡pq=qlog⁡p\log p^q = q\log p⁠; chain rule (Theorem 4). Lesson: the chain rule
  6. Add

    For x>1x > 1⁠,

    dydx= (log⁡x)x−1[1+log⁡x⋅log⁡(log⁡x)]+2xlog⁡x−1⋅log⁡x.\begin{aligned} \frac{dy}{dx} = \ &(\log x)^{x-1}\left[1 + \log x\cdot\log(\log x)\right] \\ &+ 2x^{\log x - 1}\cdot\log x. \end{aligned}
    This is u′+v′u' + v' from Steps 4 and 5. It matches the textbook's answer, where "2xlog⁡x−1 . log⁡x2x^{\log x - 1}\,.\,\log x" means 2⋅xlog⁡x−1⋅log⁡x2\cdot x^{\log x - 1}\cdot\log x⁠.
    Sum rule (Section 5.3). Basics: derivative rules
Result

For x>1x > 1⁠,

dydx= (log⁡x)x−1[1+log⁡x⋅log⁡(log⁡x)]+2xlog⁡x−1⋅log⁡x.\begin{aligned} \frac{dy}{dx} = \ &(\log x)^{x-1}\left[1 + \log x\cdot\log(\log x)\right] \\ &+ 2x^{\log x - 1}\cdot\log x. \end{aligned}

(Textbook answer: the same; the key does not state x>1x > 1⁠.)

Check it with numbers

At x=ex = e⁠: log⁡e=1\log e = 1 and log⁡(log⁡e)=0\log(\log e) = 0⁠, so u′=1e−1[1+0]=1u' = 1^{e-1}[1 + 0] = 1 and v′=2e0⋅1=2v' = 2e^{0}\cdot 1 = 2⁠. Total 33⁠; the central difference quotient with h=0.0001h = 0.0001 gives 3.00000003.0000000⁠.

At x=3x = 3⁠: log⁡3=1.0986123\log 3 = 1.0986123⁠, log⁡(log⁡3)=0.0940478\log(\log 3) = 0.0940478⁠. Then u′=1.2069490×1.1033221u' = 1.2069490\times 1.1033221 =1.3316535= 1.3316535 and v′=2×1.1144229×1.0986123v' = 2\times 1.1144229\times 1.0986123 =2.4486373= 2.4486373⁠. Total 3.78029083.7802908⁠; the difference quotient gives 3.78029083.7802908⁠.

Common mistakes
  1. Taking log⁡\log of the sum. Split first.
  2. Writing log⁡v=log⁡x⋅x\log v = \log x\cdot x for v=xlog⁡xv = x^{\log x}⁠: the exponent is log⁡x\log x⁠, so log⁡v=log⁡x⋅log⁡x\log v = \log x\cdot\log x⁠.
  3. Missing the inner derivative 1x\frac1x in ddxlog⁡(log⁡x)\frac{d}{dx}\log(\log x)⁠.
  4. Domain: x>0x > 0 is not enough; the base log⁡x\log x needs x>1x > 1⁠.
What to take away
  1. ddxxlog⁡x=2xlog⁡x−1log⁡x\frac{d}{dx}x^{\log x} = 2x^{\log x - 1}\log x⁠, because log⁡(xlog⁡x)=(log⁡x)2\log(x^{\log x}) = (\log x)^2⁠.
  2. Pulling a factor out of a bracket and using index laws turns one correct form into another; check equal forms numerically.
  3. The domain of a power with variable exponent is where its base is positive.

Every fact used, and where it comes from

FactUsed inSource
Positive base for logarithmic differentiationStep 1Section 5.5 (Lesson: logarithmic differentiation)
log⁡\log increasing, log⁡1=0\log 1 = 0Step 1Section 5.4
Sum rule, product ruleSteps 2, 3, 6Algebra of derivatives (1), (2), Section 5.3
log⁡pn=nlog⁡p\log p^n = n\log pSteps 3, 5Section 5.4
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠; chain ruleSteps 3, 5Theorem 5, Section 5.4; Theorem 4, Section 5.3.1
Index laws for a positive baseSteps 4, 5Exponents (earlier classes)
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 →