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

Exercise 5.5 · Q6: Differentiate (x+1x)x\left(x+\frac1x\right)^x + x1+1x+\,x^{1+\frac1x}

Exercise 5.5Logarithmic differentiation · Section 5.5
The question

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

(x+1x)x+x(1+1x)\left(x+\frac1x\right)^x + x^{\left(1+\frac1x\right)}
Exam answer

Let u=(x+1x)xu = \left(x + \frac1x\right)^x and v=x1+1xv = x^{1 + \frac1x}⁠, so y=u+vy = u + v⁠, where x>0x > 0⁠.

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

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

Also log⁡v=(1+1x)log⁡x\log v = \left(1 + \frac1x\right)\log x⁠. Differentiating w.r.t. xx⁠,

1v⋅dvdx=−1x2log⁡x+(1+1x)1x=x+1−log⁡xx2\begin{aligned} \frac1v\cdot\frac{dv}{dx} &= -\frac{1}{x^2}\log x \\ &\quad + \left(1 + \frac1x\right)\frac1x \\ &= \frac{x + 1 - \log x}{x^2} \end{aligned} ∴ dvdx=x1+1x(x+1−log⁡xx2)\therefore\ \frac{dv}{dx} = x^{1 + \frac1x}\left(\frac{x + 1 - \log x}{x^2}\right)

∴ dydx=(x+1x)x[x2−1x2+1+log⁡(x+1x)]+x1+1x(x+1−log⁡xx2)\begin{aligned} \therefore\ \dfrac{dy}{dx} &= \left(x + \dfrac1x\right)^x\bigg[\dfrac{x^2 - 1}{x^2 + 1} \\ &\qquad + \log\left(x + \dfrac1x\right)\bigg] \\ &\quad + x^{1 + \dfrac1x}\left(\dfrac{x + 1 - \log x}{x^2}\right) \end{aligned}

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

The one idea this problem is built on

Each term is a power whose base and exponent both vary with xx⁠. The function is a sum, and the log of a sum does not split, so we differentiate the two terms separately (sum rule) and use logarithmic differentiation on each. Both bases must be positive, which forces x>0x > 0⁠.

Given, to find, and the plan
Given
y=u+vy = u + v⁠, with u=(x+1x)xu = \left(x + \frac1x\right)^x and v=x1+1xv = x^{1 + \frac1x}⁠.
To find
dydx\frac{dy}{dx}⁠, and where it holds.
Plan
(1) Domain: both bases positive. (2) u′u' via log⁡u=xlog⁡(x+1x)\log u = x\log\left(x + \frac1x\right)⁠. (3) v′v' via log⁡v=(1+1x)log⁡x\log v = \left(1 + \frac1x\right)\log x⁠. (4) Add.

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). 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 for log⁡g\log g

ddxlog⁡g(x)=g′(x)g(x)\frac{d}{dx}\log g(x) = \frac{g'(x)}{g(x)} for g(x)>0g(x) > 0 (Theorems 4 and 5); ddx1x=−1x2\frac{d}{dx}\frac1x = -\frac{1}{x^2} (power rule with n=−1n = -1⁠). Basics: composite functions

Solution

  1. Domain: x>0x > 0

    The second term x1+1xx^{1 + \frac1x} has a variable exponent, so its base xx must be positive. For x>0x > 0 the first base is positive too:

    x+1x=x2+1x>0.x + \frac1x = \frac{x^2 + 1}{x} > 0.

    So both terms are defined and positive for x>0x > 0⁠, and that is where we work.

    For x<0x < 0 both bases are negative (x+1x=x2+1x<0x + \frac1x = \frac{x^2+1}{x} < 0⁠), and a negative base with a non-integer exponent is in general not a real number: at x=−12x = -\frac12 the first term is (−52)−1/2\left(-\frac52\right)^{-1/2} =1−5/2= \frac{1}{\sqrt{-5/2}}⁠, which is not real. x=0x = 0 is excluded because 1x\frac1x is undefined. Logarithmic differentiation needs each base positive (Section 5.5), which is exactly x>0x > 0⁠.
    x2+1>0x^2 + 1 > 0 always, so x2+1x\frac{x^2+1}{x} has the sign of xx⁠. Basics: exponentials and logarithms
  2. Split with the sum rule

    y=u+vy = u + v⁠, so dydx=dudx+dvdx\frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx}⁠.

    We cannot simplify log⁡(u+v)\log(u + v)⁠, so we do not take the log of yy⁠. Each of uu and vv is a single positive power, which is exactly what logarithmic differentiation handles.
    (u+v)′=u′+v′(u + v)' = u' + v' (Section 5.3). Basics: derivative rules
  3. u=(x+1x)xu = \left(x + \frac1x\right)^x⁠: take logs and differentiate

    log⁡u=xlog⁡(x+1x)\log u = x\log\left(x + \frac1x\right)⁠. The right side is a product of xx and log⁡(x+1x)\log\left(x + \frac1x\right)⁠. The second factor needs the chain rule, inner g=x+1xg = x + \frac1x⁠, g′=1−1x2g' = 1 - \frac{1}{x^2}⁠:

    1u⋅dudx=1⋅log⁡(x+1x)+x⋅1−1x2x+1x.\begin{aligned} \frac1u\cdot\frac{du}{dx} &= 1\cdot\log\left(x + \tfrac1x\right) \\ &\quad + x\cdot\frac{1 - \frac{1}{x^2}}{x + \frac1x}. \end{aligned}
    Product rule: differentiate xx (giving 11⁠) keeping the log, then differentiate the log (giving g′g\frac{g'}{g}⁠) keeping xx⁠.
    Product rule; ddxlog⁡g=g′g\frac{d}{dx}\log g = \frac{g'}{g} (Theorems 4 and 5). Lesson: logarithmic differentiation
  4. Simplify the fraction and finish u′u'

    Write x(1−1x2)=x−1x=x2−1xx\left(1 - \frac{1}{x^2}\right) = x - \frac1x = \frac{x^2 - 1}{x} and x+1x=x2+1xx + \frac1x = \frac{x^2 + 1}{x}⁠. Dividing, the 1x\frac1x cancels:

    x⋅1−1x2x+1x=x2−1x2+1.x\cdot\frac{1 - \frac{1}{x^2}}{x + \frac1x} = \frac{x^2 - 1}{x^2 + 1}.

    So

    dudx= (x+1x)x×[x2−1x2+1+log⁡(x+1x)].\begin{aligned} \frac{du}{dx} = \ &\left(x + \frac1x\right)^x \\ &\times\left[\frac{x^2 - 1}{x^2 + 1} + \log\left(x + \frac1x\right)\right]. \end{aligned}
    Clearing the small fractions puts the term in the textbook's form. Multiplying 1ududx\frac1u\frac{du}{dx} by uu (positive) isolates dudx\frac{du}{dx}⁠.
    Simplifying a compound fraction by writing both parts over xx⁠. Basics: solving for dy/dx
  5. v=x1+1xv = x^{1 + \frac1x}⁠: take logs and differentiate

    log⁡v=(1+1x)log⁡x\log v = \left(1 + \frac1x\right)\log x⁠, again a product. With ddx(1+1x)=−1x2\frac{d}{dx}\left(1 + \frac1x\right) = -\frac{1}{x^2} and ddxlog⁡x=1x\frac{d}{dx}\log x = \frac1x⁠:

    1v⋅dvdx=−1x2log⁡x+(1+1x)1x=−log⁡x+x+1x2.\begin{aligned} \frac1v\cdot\frac{dv}{dx} &= -\frac{1}{x^2}\log x + \left(1 + \frac1x\right)\frac1x \\ &= \frac{-\log x + x + 1}{x^2}. \end{aligned}

    So

    dvdx=x1+1x(x+1−log⁡xx2).\frac{dv}{dx} = x^{1 + \frac1x}\left(\frac{x + 1 - \log x}{x^2}\right).
    (1+1x)1x=1x+1x2=x+1x2\left(1 + \frac1x\right)\frac1x = \frac1x + \frac{1}{x^2} = \frac{x + 1}{x^2}⁠; putting everything over x2x^2 collects the bracket.
    Product rule; power rule ddxx−1=−x−2\frac{d}{dx}x^{-1} = -x^{-2} (Table 5.3). Basics: derivative rules
  6. Add the two derivatives

    For x>0x > 0⁠,

    dydx= (x+1x)x×[x2−1x2+1+log⁡(x+1x)]+x1+1x(x+1−log⁡xx2).\begin{aligned} \frac{dy}{dx} = \ &\left(x + \frac1x\right)^x \\ &\times\left[\frac{x^2 - 1}{x^2 + 1} + \log\left(x + \frac1x\right)\right] \\ &+ x^{1 + \frac1x}\left(\frac{x + 1 - \log x}{x^2}\right). \end{aligned}
    This is u′+v′u' + v' from Steps 4 and 5, and it is exactly the textbook's answer.
    Sum rule (Section 5.3). Basics: derivative rules
Result

For x>0x > 0⁠,

dydx= (x+1x)x×[x2−1x2+1+log⁡(x+1x)]+x1+1x(x+1−log⁡xx2).\begin{aligned} \frac{dy}{dx} = \ &\left(x + \frac1x\right)^x \\ &\times\left[\frac{x^2 - 1}{x^2 + 1} + \log\left(x + \frac1x\right)\right] \\ &+ x^{1 + \frac1x}\left(\frac{x + 1 - \log x}{x^2}\right). \end{aligned}

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

Check it with numbers

At x=1x = 1⁠: u=2u = 2⁠, x2−1x2+1=0\frac{x^2-1}{x^2+1} = 0⁠, so u′=2log⁡2=1.3862944u' = 2\log 2 = 1.3862944⁠; v=1v = 1 and v′=2−01=2v' = \frac{2 - 0}{1} = 2⁠. Total 3.38629443.3862944⁠; the central difference quotient with h=0.0001h = 0.0001 gives 3.38629443.3862944⁠.

At x=2x = 2⁠: u=2.52=6.25u = 2.5^2 = 6.25⁠, bracket 0.6+0.9162907=1.51629070.6 + 0.9162907 = 1.5162907⁠; v=21.5=2.8284271v = 2^{1.5} = 2.8284271⁠, bracket 3−0.69314724=0.5767132\frac{3 - 0.6931472}{4} = 0.5767132⁠. Total 6.25×1.51629076.25\times 1.5162907 + 2.8284271×0.5767132+\ 2.8284271\times 0.5767132 =11.1080083= 11.1080083⁠; the difference quotient gives 11.108008411.1080084⁠.

Common mistakes
  1. Taking log⁡\log of the sum as if log⁡(u+v)=log⁡u+log⁡v\log(u + v) = \log u + \log v⁠.
  2. Chain rule slip in log⁡(x+1x)\log\left(x + \frac1x\right)⁠: its derivative is 1−1/x2x+1/x\frac{1 - 1/x^2}{x + 1/x}⁠, not 1x+1/x\frac{1}{x + 1/x}⁠.
  3. ddx1x=1x2\frac{d}{dx}\frac1x = \frac{1}{x^2}: the sign is wrong; it is −1x2-\frac{1}{x^2}⁠.
  4. No domain: both bases must be positive, so x>0x > 0⁠.
What to take away
  1. Sum of variable powers: split with the sum rule, log-differentiate each term.
  2. For uvu^v with u>0u > 0⁠: ddxuv=uv[v′log⁡u+vuu′]\frac{d}{dx}u^v = u^v\left[v'\log u + \frac{v}{u}u'\right]⁠.
  3. Tidy compound fractions by writing each part over a common denominator.

Every fact used, and where it comes from

FactUsed inSource
Positive bases for logarithmic differentiationStep 1Section 5.5 (Lesson: logarithmic differentiation)
x=elog⁡xx = e^{\log x} for x>0x > 0Step 1Example 25
Sum rule, product ruleSteps 2, 3, 5, 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
ddxxn=nxn−1\frac{d}{dx}x^n = nx^{n-1} (here n=−1n = -1⁠)Steps 3, 5Table 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 →