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

Exercise 5.7 · Q9: Second derivative of log⁡(log⁡x)\log(\log x)⁠, x>1x \gt 1

Exercise 5.7Second order derivative · Section 5.7
The question

Find the second order derivatives of the functions given in Exercises 1 to 10.

9. log⁡(log⁡x)\log(\log x)

Exam answer

Let y=log⁡(log⁡x)y = \log(\log x) (x>1x > 1⁠). By the chain rule,

dydx=1log⁡x⋅1x=(xlog⁡x)−1\frac{dy}{dx} = \frac{1}{\log x}\cdot\frac1x = (x\log x)^{-1} d2ydx2=−(xlog⁡x)−2⋅ddx(xlog⁡x)=−(xlog⁡x)−2(log⁡x+1)\begin{aligned} \frac{d^2y}{dx^2} &= -(x\log x)^{-2}\cdot\frac{d}{dx}(x\log x) \\ &= -(x\log x)^{-2}(\log x + 1) \end{aligned}

∴ d2ydx2=−1+log⁡x(xlog⁡x)2\therefore\ \dfrac{d^2y}{dx^2} = -\dfrac{1 + \log x}{(x\log x)^2}

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

The one idea this problem is built on

log⁡(log⁡x)\log(\log x) is a composite function: an outer log⁡\log applied to an inner log⁡x\log x⁠. The chain rule gives the first derivative 1xlog⁡x\frac{1}{x\log x}⁠. For the second derivative, treat this as (xlog⁡x)−1(x\log x)^{-1}⁠: chain rule again, with the product rule for the inner xlog⁡xx\log x⁠.

The outer logarithm needs a positive input, log⁡x>0\log x \gt 0⁠, so everything lives on x>1x \gt 1⁠.

Given, to find, and the plan
Given
y=log⁡(log⁡x)y = \log(\log x) (natural logarithms).
To find
d2ydx2\dfrac{d^2y}{dx^2}⁠, with the set of xx where it is valid.
Plan
(1) Find the domain: both logarithms need positive inputs. (2) Chain rule for dydx\frac{dy}{dx}⁠. (3) Product rule for ddx(xlog⁡x)\frac{d}{dx}(x\log x)⁠. (4) Chain rule on (xlog⁡x)−1(x\log x)^{-1} for d2ydx2\frac{d^2y}{dx^2}⁠. (5) Compare with the textbook form.

Basics you need

1Logarithm: domain and derivative

log⁡t\log t is defined only for t>0t \gt 0⁠; log⁡t>0\log t \gt 0 exactly when t>1t \gt 1 (because log⁡1=0\log 1 = 0 and log⁡\log is increasing). ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5(2), Section 5.4). Basics: exponentials and logarithms

2Composite functions

log⁡(log⁡x)\log(\log x) means: first compute u=log⁡xu = \log x⁠, then take log⁡u\log u⁠. It exists only where both stages exist. Basics: composite functions

3Chain rule (Theorem 4)

For y=f(g(x))y = f(g(x))⁠: dydx=f′(g(x))⋅g′(x)\frac{dy}{dx} = f'(g(x))\cdot g'(x)⁠. Lesson: chain rule

4Product rule and power rule

(uv)′=u′v+uv′(uv)' = u'v + uv' (Section 5.3, rule (2)); dduun=nun−1\frac{d}{du}u^n = nu^{n-1} (Table 5.3). Basics: derivative rules

Solution

  1. Find the domain: x>1x \gt 1

    Let y=log⁡(log⁡x)y = \log(\log x)⁠. Two conditions are needed:

    • the inner log⁡x\log x exists: x>0x \gt 0⁠;
    • the outer logarithm gets a positive input: log⁡x>0\log x \gt 0⁠, that is, x>1x \gt 1⁠.

    Together: x>1x \gt 1⁠. For example, at x=12x = \frac12⁠, log⁡x≈−0.693\log x \approx -0.693 and log⁡(−0.693)\log(-0.693) does not exist; at x=1x = 1⁠, log⁡x=0\log x = 0 and log⁡0\log 0 does not exist. All the work below is on x>1x \gt 1⁠.

    The formula for a derivative can look fine at points where the function itself does not exist; stating the domain first prevents that. Here it also guarantees x>0x \gt 0 and log⁡x>0\log x \gt 0⁠, so xlog⁡x>0x\log x \gt 0 and none of the denominators below can be zero.
    log⁡t>0  ⟺  t>1\log t \gt 0 \iff t \gt 1⁠, since log⁡1=0\log 1 = 0 and log⁡\log is increasing. Basics: exponentials and logarithms
  2. First derivative: chain rule

    Outer function log⁡u\log u⁠, with derivative 1u\frac1u⁠; inner function u=log⁡xu = \log x⁠, with derivative 1x\frac1x⁠. So

    dydx=1log⁡x⋅ddx(log⁡x)=1log⁡x⋅1x=1xlog⁡x.\begin{aligned} \frac{dy}{dx} &= \frac{1}{\log x}\cdot\frac{d}{dx}(\log x) \\ &= \frac{1}{\log x}\cdot\frac{1}{x} = \frac{1}{x\log x}. \end{aligned}
    The derivative of the outer function is evaluated at the inner one (giving 1log⁡x\frac{1}{\log x}⁠) and then multiplied by the derivative of the inner function. This is the same pattern as the book's Example 26(ii), sin⁡(log⁡x)\sin(\log x)⁠.
    Chain rule (Theorem 4, Section 5.3.1); ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x (Theorem 5). Lesson: chain rule
  3. Derivative of the inner xlog⁡xx\log x⁠: product rule

    We will need ddx(xlog⁡x)\frac{d}{dx}(x\log x)⁠. With u=xu = x (u′=1u' = 1⁠) and v=log⁡xv = \log x (v′=1xv' = \frac1x⁠):

    ddx(xlog⁡x)=1⋅log⁡x+x⋅1x=log⁡x+1.\begin{aligned} \frac{d}{dx}(x\log x) &= 1\cdot\log x + x\cdot\frac1x \\ &= \log x + 1. \end{aligned}
    The first derivative is 11 over the product xlog⁡xx\log x⁠, so differentiating it will need the derivative of that product. x⋅1x=1x\cdot\frac1x = 1 because x≠0x \ne 0⁠.
    Product rule (Section 5.3, rule (2)).
  4. Second derivative: chain rule on (xlog⁡x)−1(x\log x)^{-1}

    Write dydx=(xlog⁡x)−1\frac{dy}{dx} = (x\log x)^{-1}⁠. Outer function w−1w^{-1}⁠, with derivative −w−2-w^{-2} (power rule, n=−1n = -1⁠); inner function w=xlog⁡xw = x\log x⁠, with derivative log⁡x+1\log x + 1 (Step 3). So

    d2ydx2=−(xlog⁡x)−2⋅(log⁡x+1)=−1+log⁡x(xlog⁡x)2.\begin{aligned} \frac{d^2y}{dx^2} &= -(x\log x)^{-2}\cdot(\log x + 1) \\ &= -\frac{1 + \log x}{(x\log x)^2}. \end{aligned}

    So d2ydx2=−1+log⁡x(xlog⁡x)2\dfrac{d^2y}{dx^2} = -\dfrac{1 + \log x}{(x\log x)^2} for x>1x \gt 1⁠.

    The second derivative is the derivative of the first derivative from Step 2. Writing "one over something" as "something to the power −1-1" lets the power rule and the chain rule do the work. (The quotient rule gives the same: 0−1⋅(log⁡x+1)(xlog⁡x)2\frac{0 - 1\cdot(\log x + 1)}{(x\log x)^2}⁠.) The denominator is positive for x>1x \gt 1 (Step 1).
    Chain rule (Theorem 4); power rule (Table 5.3). Lesson: second order derivative
  5. Compare with the textbook and read the sign

    The textbook's answer is −(1+log⁡x)(xlog⁡x)2-\frac{(1 + \log x)}{(x\log x)^2}⁠, exactly our expression. An equivalent expanded form is −1+log⁡xx2(log⁡x)2-\frac{1 + \log x}{x^2(\log x)^2}⁠, since (xlog⁡x)2=x2(log⁡x)2(x\log x)^2 = x^2(\log x)^2⁠.

    For x>1x \gt 1⁠, log⁡x>0\log x \gt 0⁠, so 1+log⁡x>01 + \log x \gt 0 and the second derivative is negative: the slope 1xlog⁡x\frac{1}{x\log x} decreases as xx grows, and the graph of log⁡(log⁡x)\log(\log x) bends downward everywhere on its domain.

    The book's answer does not state the domain; it is understood to be the domain x>1x \gt 1 of the function, which we found in Step 1.
Result

For y=log⁡(log⁡x)y = \log(\log x)⁠, defined for x>1x \gt 1⁠:

dydx=1xlog⁡x,d2ydx2=−1+log⁡x(xlog⁡x)2.\begin{aligned} \frac{dy}{dx} &= \frac{1}{x\log x}, \\ \frac{d^2y}{dx^2} &= -\frac{1 + \log x}{(x\log x)^2}. \end{aligned}

(Textbook answer: −(1+log⁡x)(xlog⁡x)2-\dfrac{(1 + \log x)}{(x\log x)^2}⁠.)

Check it with numbers

At x=e≈2.7182818x = e \approx 2.7182818⁠, log⁡e=1\log e = 1⁠, so y=log⁡1=0y = \log 1 = 0⁠, and the formulas give

dydx=1e≈0.3678794,d2ydx2=−2e2≈−0.2706706.\begin{aligned} \frac{dy}{dx} &= \frac{1}{e} \approx 0.3678794, \\ \frac{d^2y}{dx^2} &= -\frac{2}{e^2} \approx -0.2706706. \end{aligned}

With h=0.001h = 0.001⁠: the central difference y(e+h)−y(e−h)2h\frac{y(e + h) - y(e - h)}{2h} is about 0.36787950.3678795⁠, and the second difference y(e+h)−2y(e)+y(e−h)h2\frac{y(e + h) - 2y(e) + y(e - h)}{h^2} is about −0.2706706-0.2706706⁠. ✓

Common mistakes
  1. Stopping at 1log⁡x\frac{1}{\log x} for the first derivative: the inner derivative 1x\frac1x must be multiplied in.
  2. Differentiating xlog⁡xx\log x as 1⋅1x1\cdot\frac1x: it is a product, and its derivative is log⁡x+1\log x + 1⁠.
  3. Giving the domain as x>0x \gt 0⁠. For 0<x≤10 \lt x \le 1⁠, log⁡x≤0\log x \le 0 and log⁡(log⁡x)\log(\log x) does not exist.
What to take away
  1. For a composite of logarithms, each logarithm needs a positive input: here x>0x \gt 0 and log⁡x>0\log x \gt 0⁠, so x>1x \gt 1⁠.
  2. To differentiate 1g(x)\frac{1}{g(x)}⁠, use the chain rule on (g(x))−1(g(x))^{-1}⁠: the result is −g′(x)(g(x))2-\frac{g'(x)}{(g(x))^2}⁠.

Every fact used, and where it comes from

FactUsed inSource
log⁡t\log t defined for t>0t \gt 0⁠; log⁡1=0\log 1 = 0⁠; log⁡\log increasingSteps 1, 5Section 5.4 (Basics: exponentials and logarithms)
ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1xSteps 2, 3Theorem 5(2), Section 5.4 (Lesson: exponential and logarithmic functions)
Chain ruleSteps 2, 4Theorem 4, Section 5.3.1; compare Example 26(ii) (Lesson: chain rule)
(uv)′=u′v+uv′(uv)' = u'v + uv'Step 3Section 5.3, rule (2)
ddwwn=nwn−1\frac{d}{dw}w^n = nw^{n-1}⁠, here n=−1n = -1Step 4Table 5.3 (Basics: derivative rules)
d2ydx2=ddx(dydx)\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)Step 4Section 5.7 (Lesson: second order derivative)
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 →