Navigation

Concept Review

Differential Calculus

Derivatives of Exponential and Logarithmic Functions

Exponential functions are exactly the functions whose rate of change is proportional to their own size (on an interval, f=kff'=kf forces f(x)=Cekxf(x)=Ce^{kx}; the interval hypothesis matters, since on a disconnected domain each piece may carry its own CC), which is why they govern compound interest, population growth, radioactive decay and Newtonian cooling; logarithms come along as their inverses. This topic pins down the number ee by exactly that property, derives the four core derivatives (exe^x, axa^x, lnx\ln x, logax\log_a x), and then develops logarithmic differentiation, the technique that converts a monstrous product or quotient into a sum and is one of the two standard ways to handle a variable base with a variable exponent such as xxx^x (the other being the rewrite uv=evlnuu^{v}=e^{v\ln u}, valid when u>0u>0). Everything here sits on top of the chain rule, which you will combine with every formula below.

Where the number ee comes from

Fix a base a>0a>0 and let f(x)=axf(x)=a^{x}. From the limit definition of the derivative,

f(x)=limh0ax+haxh=limh0ax(ah1)h=axlimh0ah1h=axf(0).\begin{aligned} f'(x) &= \lim_{h\to 0}\frac{a^{x+h}-a^{x}}{h} \\ &= \lim_{h\to 0}\frac{a^{x}\left(a^{h}-1\right)}{h} \\ &= a^{x}\lim_{h\to 0}\frac{a^{h}-1}{h} = a^{x}\,f'(0). \end{aligned}

The factor axa^{x} comes out of the limit because it does not depend on hh. So the derivative of every exponential function is a constant multiple of the function itself, and the constant is exactly the slope of its graph at x=0x=0. Write m(a)=limh0ah1h=f(0)m(a)=\lim_{h\to 0}\dfrac{a^{h}-1}{h}=f'(0). One shows (this needs a separate argument, usually via the integral definition of ln\ln) that m(a)m(a) exists for every a>0a>0 and increases continuously in aa, with m(1)=0m(1)=0 and m(a)m(a)\to\infty as aa\to\infty.

Definition. ee is the unique base for which that slope equals 11:

limh0eh1h=1,equivalentlyddxex=ex.\lim_{h\to 0}\frac{e^{h}-1}{h}=1, \qquad\text{equivalently}\qquad \frac{d}{dx}e^{x}=e^{x}.

Equivalent characterisations: e=limh0(1+h)1/h=limn(1+1n)n=2.718281828e=\lim_{h\to 0}(1+h)^{1/h}=\lim_{n\to\infty}\left(1+\frac{1}{n}\right)^{n}=2.718281828\ldots Once the log derivative is available we get m(a)=lnam(a)=\ln a for free, so the mysterious constant m(a)m(a) above was always a logarithm.

The four core derivatives

Natural exponential. ddxex=ex\dfrac{d}{dx}e^{x}=e^{x} for all real xx — this is the definition of ee applied to f(x)=axf(0)f'(x)=a^{x}f'(0) with a=ea=e.

General exponential (a>0a>0). Because a>0a>0, lna\ln a exists and ax=(elna)x=exlnaa^{x}=\left(e^{\ln a}\right)^{x}=e^{x\ln a}. The chain rule with inner function u=xlnau=x\ln a, u=lnau'=\ln a, gives

ddxax=exlnalna=axlna.\frac{d}{dx}a^{x}=e^{x\ln a}\cdot\ln a=a^{x}\ln a .

Sanity checks: a=ea=e gives lne=1\ln e=1; a=1a=1 gives ln1=0\ln 1=0, correct since 1x1^{x} is constant. The hypothesis a>0a>0 cannot be dropped: for a<0a<0 the power axa^{x} is not defined on any interval (only at scattered rationals), and for a=0a=0 the function 0x0^{x} exists only on (0,)(0,\infty), where it is identically 00 while ln0\ln 0 does not exist at all.

Natural logarithm. ln\ln is the inverse of exp\exp; exp\exp is differentiable, strictly increasing, maps the real line bijectively onto (0,)(0,\infty), and has exp=exp0\exp'=\exp\ne 0 everywhere, so by the Inverse Function Theorem ln\ln is differentiable on (0,)(0,\infty). Put y=lnxy=\ln x, so ey=xe^{y}=x with x>0x>0. Differentiating both sides with respect to xx (chain rule on the left):

eydydx=1dydx=1ey=1x,x>0.e^{y}\frac{dy}{dx}=1 \quad\Longrightarrow\quad \frac{dy}{dx}=\frac{1}{e^{y}}=\frac{1}{x},\qquad x>0 .

Absolute-value version. For every x0x\ne 0,

ddxlnx=1x.\frac{d}{dx}\ln\left|x\right|=\frac{1}{x}.

Proof by cases: for x>0x>0, lnx=lnx\ln|x|=\ln x and the derivative is 1x\frac1x; for x<0x<0, lnx=ln(x)\ln|x|=\ln(-x) and the chain rule gives 1x(1)=1x\frac{1}{-x}\cdot(-1)=\frac1x. The point x=0x=0 must be excluded — the function is not even defined there.

Other bases. For a>0a>0, a1a\ne 1, and x>0x>0, change of base gives logax=lnxlna\log_a x=\dfrac{\ln x}{\ln a} with 1lna\dfrac{1}{\ln a} a constant, so

ddxlogax=1xlna,ddxlogax=1xlna  (x0).\frac{d}{dx}\log_a x=\frac{1}{x\ln a}, \qquad \frac{d}{dx}\log_a\left|x\right|=\frac{1}{x\ln a}\ \ (x\ne 0).

Rule table (chain-rule form, u=u(x)u=u(x) differentiable)

FunctionDerivativeConditions
exe^{x}exe^{x}all xx
eue^{u}euue^{u}\,u'all xx
ekxe^{kx}kekxk\,e^{kx}kk constant
axa^{x}axlnaa^{x}\ln aa>0a>0
aua^{u}aulna  ua^{u}\ln a\;u'a>0a>0
lnx\ln x1x\dfrac{1}{x}x>0x>0
lnu\ln uuu\dfrac{u'}{u}u(x)>0u(x)>0
logax\log_a x1xlna\dfrac{1}{x\ln a}x>0x>0, a>0a>0, a1a\ne 1
logau\log_a uuulna\dfrac{u'}{u\ln a}u(x)>0u(x)>0, a>0a>0, a1a\ne 1
xnx^{n}nxn1n x^{\,n-1}nn constant; all xx for positive integer nn, x0x\ne 0 for negative integer nn, x>0x>0 when nn is not an integer
uvu^{v}uv(vlnu+vuu)u^{v}\left(v'\ln u+\dfrac{v\,u'}{u}\right)u(x)>0u(x)>0, vv differentiable
xxx^{x}xx(lnx+1)x^{x}\left(\ln x+1\right)x>0x>0

With absolute values the two log rows extend to ddxlnu=uu\dfrac{d}{dx}\ln\left|u\right|=\dfrac{u'}{u} wherever u(x)0u(x)\ne 0 — a genuinely useful widening, since uu is allowed to be negative.

Logarithmic differentiation

Use it when yy is a product or quotient of three or more factors, when factors carry awkward powers or roots, or when the exponent itself contains xx.

Method. Let y=f(x)y=f(x) be differentiable with f(x)0f(x)\ne 0 near the point of interest.

  1. Write lny=lnf(x)\ln\left|y\right|=\ln\left|f(x)\right|.
  2. Break the right side up with the log laws: lnAB=lnA+lnB\ln\left|AB\right|=\ln\left|A\right|+\ln\left|B\right|, lnA/B=lnAlnB\ln\left|A/B\right|=\ln\left|A\right|-\ln\left|B\right|, and lnAp=plnA\ln\left|A^{p}\right|=p\ln\left|A\right| (integer pp; for a general real exponent you need A>0A>0).
  3. Differentiate both sides in xx. The chain rule turns the left side into yy\dfrac{y'}{y}.
  4. Multiply through by yy and substitute the original expression back in.

Hypotheses that matter. Step 1 requires f(x)0f(x)\ne 0: at a zero of ff the method says nothing and you must differentiate directly. The log laws split products, quotients and powers only — there is no law for ln(A+B)\ln(A+B), so logarithmic differentiation does not help with sums.

Worked Example 1 — a heavy quotient. Differentiate y=x32x+1(3x2)4y=\dfrac{x^{3}\sqrt{2x+1}}{(3x-2)^{4}} for x>23x>\frac{2}{3} (where all three factors are positive).

lny=3lnx+12ln(2x+1)4ln(3x2).\ln y=3\ln x+\frac{1}{2}\ln(2x+1)-4\ln(3x-2).

Differentiate term by term, each with the chain rule (lnu)=u/u\left(\ln u\right)'=u'/u:

yy=3x+1222x+1433x2=3x+12x+1123x2.\begin{aligned} \frac{y'}{y} &= \frac{3}{x}+\frac{1}{2}\cdot\frac{2}{2x+1}-4\cdot\frac{3}{3x-2} \\ &= \frac{3}{x}+\frac{1}{2x+1}-\frac{12}{3x-2}. \end{aligned}

Multiply by yy:

y=x32x+1(3x2)4(3x+12x+1123x2).y'=\frac{x^{3}\sqrt{2x+1}}{(3x-2)^{4}}\left(\frac{3}{x}+\frac{1}{2x+1}-\frac{12}{3x-2}\right).

Check at x=1x=1. Then y=3y=\sqrt{3} and the bracket is 3+1312=2633+\frac{1}{3}-12=-\frac{26}{3}, so y(1)=263315.0111y'(1)=-\frac{26\sqrt{3}}{3}\approx-15.0111. A centred difference quotient with step 10610^{-6} gives 15.0111-15.0111.

Worked Example 2 — variable base and variable exponent. Differentiate y=xsinxy=x^{\sin x} for x>0x>0.

The power rule is illegal (the exponent is not constant) and the axa^{x} rule is illegal (the base is not constant). Two equivalent routes.

Route A (rewrite as base ee). Since x>0x>0, xsinx=esinxlnxx^{\sin x}=e^{\sin x\ln x}, so by the chain rule with the product rule inside,

y=esinxlnx(cosxlnx+sinxx)=xsinx(cosxlnx+sinxx).y'=e^{\sin x\ln x}\left(\cos x\ln x+\frac{\sin x}{x}\right)=x^{\sin x}\left(\cos x\ln x+\frac{\sin x}{x}\right).

Route B (take logs). lny=sinxlnx\ln y=\sin x\ln x, so yy=cosxlnx+sinxx\dfrac{y'}{y}=\cos x\ln x+\dfrac{\sin x}{x}, and multiplying by yy gives the same thing.

Check at x=π2x=\frac{\pi}{2}. There y=(π2)1=π2y=\left(\frac{\pi}{2}\right)^{1}=\frac{\pi}{2}, cosπ2=0\cos\frac{\pi}{2}=0, sinπ2=1\sin\frac{\pi}{2}=1, so y=π2(0+2π)=1y'=\frac{\pi}{2}\left(0+\frac{2}{\pi}\right)=1; the numerical derivative is 1.00001.0000.

Why the power rule cannot touch xxx^{x}

ddxxn=nxn1\dfrac{d}{dx}x^{n}=nx^{\,n-1} is proved under the standing hypothesis that nn is a constant, and ddxax=axlna\dfrac{d}{dx}a^{x}=a^{x}\ln a under the hypothesis that aa is a constant. In xxx^{x} both move at once, so neither theorem applies. The correct general statement, for u(x)>0u(x)>0, comes from uv=evlnuu^{v}=e^{v\ln u}:

ddxuv=uv(vlnu+vuu).\frac{d}{dx}u^{v}=u^{v}\left(v'\ln u+\frac{v\,u'}{u}\right).

The two familiar rules are its degenerate cases: if vv is constant then v=0v'=0 and the formula collapses to vuv1uv\,u^{\,v-1}u'; if uu is constant then u=0u'=0 and it collapses to uvlnuvu^{v}\ln u\cdot v'. For u=v=xu=v=x neither term dies:

ddxxx=xx(1lnx+x1x)=xx(lnx+1),x>0.\frac{d}{dx}x^{x}=x^{x}\left(1\cdot\ln x+\frac{x\cdot 1}{x}\right)=x^{x}\left(\ln x+1\right),\qquad x>0 .

At x=2x=2 the true slope is 4(ln2+1)6.77264(\ln 2+1)\approx 6.7726; the two popular wrong answers give xxx1=xx=4x\cdot x^{\,x-1}=x^{x}=4 and xxlnx2.7726x^{x}\ln x\approx 2.7726. Both are badly wrong, and the numerical derivative 6.77266.7726 settles it.

Common mistakes

WrongRightWhy
ddxe3x=e3x\dfrac{d}{dx}e^{3x}=e^{3x}3e3x3e^{3x}chain rule: the inner derivative 33 must appear
ddx2x=x2x1\dfrac{d}{dx}2^{x}=x\,2^{\,x-1}2xln22^{x}\ln 2the power rule needs variable base and constant exponent; this is the reverse
ddxxx=xxx1=xx\dfrac{d}{dx}x^{x}=x\cdot x^{\,x-1}=x^{x}xx(lnx+1)x^{x}(\ln x+1)the exponent is not constant, so no theorem licenses the power rule
ddxln(3x)=13x\dfrac{d}{dx}\ln(3x)=\dfrac{1}{3x}1x\dfrac{1}{x}uu=33x=1x\dfrac{u'}{u}=\dfrac{3}{3x}=\dfrac1x; also ln3x=ln3+lnx\ln 3x=\ln 3+\ln x
ddx(lnx)2=1x2\dfrac{d}{dx}(\ln x)^{2}=\dfrac{1}{x^{2}}2lnxx\dfrac{2\ln x}{x}outer function is squaring, inner is ln\ln
ddxlog2x=1x\dfrac{d}{dx}\log_{2}x=\dfrac1x1xln2\dfrac{1}{x\ln 2}change of base leaves ln2\ln 2 in the denominator
ddxex2=2xe2x\dfrac{d}{dx}e^{x^{2}}=2xe^{2x}2xex22xe^{x^{2}}ex2e^{x^{2}} and (ex)2=e2x\left(e^{x}\right)^{2}=e^{2x} are different functions
reporting yy\dfrac{y'}{y} as the answermultiply back by yylogarithmic differentiation produces y/yy'/y; the last step is not optional
ln(A+B)=lnA+lnB\ln(A+B)=\ln A+\ln Bno such law existslogs split products, never sums
using ddxlnx=1x\dfrac{d}{dx}\ln x=\dfrac1x at x=2x=-2use the absolute-value version insteadlnx\ln x is undefined for x0x\le 0; only the absolute-value form reaches negative xx

Two identities students overuse: elnx=xe^{\ln x}=x holds only for x>0x>0, while ln(ex)=x\ln\left(e^{x}\right)=x holds for every real xx.

Fast sanity checks

  • Any derivative of ee^{\square} must still contain ee^{\square} as a factor — exponentials never disappear under differentiation.
  • Any derivative of ln(something)\ln(\text{something}) must carry that something in a denominator, since (lnu)=u/u\left(\ln u\right)'=u'/u. A leftover ln\ln outside that fraction usually means you differentiated the wrong layer — the honest exceptions are nested logs, where ddxln(lnx)=1xlnx\dfrac{d}{dx}\ln\left(\ln x\right)=\dfrac{1}{x\ln x} for x>1x>1, and powers of logs, where ddx(lnx)2=2lnxx\dfrac{d}{dx}\left(\ln x\right)^{2}=\dfrac{2\ln x}{x}; in both the surviving ln\ln is correct.
  • If your answer for a variable-base-variable-exponent problem has only one term inside the bracket, you probably dropped either the lnu\ln u term or the u/uu'/u term.

Key terms

  • the number e
  • natural exponential function
  • natural logarithm
  • change of base formula
  • chain rule
  • logarithmic differentiation
  • implicit differentiation
  • inverse function theorem
  • variable base with variable exponent
  • power rule (constant exponent)
  • exponential rule (constant base)
  • log laws (product, quotient, power)
  • absolute value inside a logarithm
  • domain restriction
  • exponential growth and decay

Practice Problems

Differentiate f(x)=5ex3lnx+2xf(x)=5e^{x}-3\ln x+2^{x}. State the domain of ff and evaluate f(1)f'(1) exactly, then give a decimal to four places.

Show hint

Differentiate term by term. Two of the three terms are not simply "the same thing back again" — remember which one picks up a ln\ln of its base, and which one picks up a reciprocal.

Show answer

Domain. exe^{x} and 2x2^{x} are defined for every real xx, but lnx\ln x requires x>0x>0. So the domain of ff is (0,)(0,\infty).

Differentiate term by term using the sum and constant-multiple rules, with ddxex=ex\frac{d}{dx}e^{x}=e^{x}, ddxlnx=1x\frac{d}{dx}\ln x=\frac1x (valid on x>0x>0) and ddxax=axlna\frac{d}{dx}a^{x}=a^{x}\ln a with a=2a=2:

f(x)=5ddxex3ddxlnx+ddx2x=5ex31x+2xln2=5ex3x+2xln2.\begin{aligned} f'(x) &= 5\frac{d}{dx}e^{x}-3\frac{d}{dx}\ln x+\frac{d}{dx}2^{x} \\ &= 5e^{x}-3\cdot\frac{1}{x}+2^{x}\ln 2 \\ &= 5e^{x}-\frac{3}{x}+2^{x}\ln 2 . \end{aligned}

Evaluate at x=1x=1:

f(1)=5e131+21ln2=5e3+2ln2.f'(1)=5e^{1}-\frac{3}{1}+2^{1}\ln 2=5e-3+2\ln 2 .

Numerically 5e13.591415e\approx 13.59141 and 2ln21.386292\ln 2\approx 1.38629, so

f(1)13.591413+1.38629=11.9777.f'(1)\approx 13.59141-3+1.38629=11.9777 .

Check. A centred difference quotient f(1+106)f(1106)2×106\dfrac{f(1+10^{-6})-f(1-10^{-6})}{2\times10^{-6}} gives 11.9777011.97770, matching.

Answer: f(x)=5ex3x+2xln2f'(x)=5e^{x}-\dfrac{3}{x}+2^{x}\ln 2 on (0,)(0,\infty), and f(1)=5e3+2ln211.9777f'(1)=5e-3+2\ln 2\approx 11.9777.

Differentiate each function and state its largest domain.

(a) y=e2xy=e^{-2x} (b) y=ln(3x+4)y=\ln(3x+4) (c) y=log5xy=\log_{5}x

Show hint

Each one is a standard rule with a very simple inner function; identify uu first and write down uu' before you touch the outer rule.

Show answer

(a) y=e2xy=e^{-2x}. Outer function eue^{u}, inner u=2xu=-2x with u=2u'=-2. The chain rule gives

y=euu=e2x(2)=2e2x.y'=e^{u}u'=e^{-2x}\cdot(-2)=-2e^{-2x}.

Domain: all real numbers (an exponential is never undefined). Check: at x=1x=1, 2e20.27067-2e^{-2}\approx-0.27067; the numerical derivative is 0.27067-0.27067.

(b) y=ln(3x+4)y=\ln(3x+4). Outer lnu\ln u, inner u=3x+4u=3x+4 with u=3u'=3:

y=uu=33x+4.y'=\frac{u'}{u}=\frac{3}{3x+4}.

Domain: ln\ln needs a strictly positive argument, so 3x+4>03x+4>0, i.e. x>43x>-\frac{4}{3}; the domain is (43,)\left(-\frac43,\infty\right), and the derivative formula is valid exactly there. Check: at x=1x=1, 370.42857\frac{3}{7}\approx0.42857; the numerical derivative is 0.428570.42857.

(c) y=log5xy=\log_{5}x. Change of base: log5x=lnxln5\log_{5}x=\dfrac{\ln x}{\ln 5}, and 1ln5\dfrac{1}{\ln 5} is a constant, so

y=1ln51x=1xln5.y'=\frac{1}{\ln 5}\cdot\frac{1}{x}=\frac{1}{x\ln 5}.

Domain: x>0x>0. Check: at x=3x=3, 13ln50.20711\frac{1}{3\ln 5}\approx0.20711; the numerical derivative is 0.207110.20711.

Answer: (a) 2e2x-2e^{-2x} for all real xx; (b) 33x+4\dfrac{3}{3x+4} on (43,)\left(-\frac43,\infty\right); (c) 1xln5\dfrac{1}{x\ln 5} on (0,)(0,\infty).

Let f(x)=x3exf(x)=x^{3}e^{-x}. Find f(x)f'(x), factor it completely, find all critical numbers, and use a sign chart to classify them.

Show hint

Product rule first; then look for the largest common factor of the two resulting terms before hunting for zeros — one factor is never zero, which makes the sign chart short.

Show answer

Differentiate with the product rule (uv)=uv+uv(uv)'=u'v+uv', taking u=x3u=x^{3} (u=3x2u'=3x^{2}) and v=exv=e^{-x} (v=exv'=-e^{-x} by the chain rule with inner x-x):

f(x)=3x2ex+x3(ex)=3x2exx3ex=x2ex(3x).\begin{aligned} f'(x) &= 3x^{2}e^{-x}+x^{3}\left(-e^{-x}\right) \\ &= 3x^{2}e^{-x}-x^{3}e^{-x} \\ &= x^{2}e^{-x}\left(3-x\right). \end{aligned}

Critical numbers. ff is differentiable everywhere, so critical numbers are the zeros of ff'. Since ex>0e^{-x}>0 for every real xx, that factor never contributes a zero. Hence

x2(3x)=0x=0  or  x=3.x^{2}(3-x)=0\quad\Longrightarrow\quad x=0\ \text{ or }\ x=3 .

Sign chart. The sign of ff' is the sign of x2(3x)x^{2}(3-x), and x20x^{2}\ge 0 always:

intervalsign of x2x^{2}sign of 3x3-xsign of ff'behaviour
x<0x<0++++++increasing
0<x<30<x<3++++++increasing
x>3x>3++--decreasing

Classification. At x=0x=0 the derivative is zero but does not change sign, so x=0x=0 gives a horizontal tangent that is not a local extremum (it is a stationary inflection-type point). At x=3x=3 the derivative changes from ++ to -, so x=3x=3 is a local maximum by the First Derivative Test, with

f(3)=27e31.3443.f(3)=27e^{-3}\approx 1.3443 .

Since ff increases on (,3)(-\infty,3) and decreases on (3,)(3,\infty), this local maximum is in fact the absolute maximum of ff over all real numbers.

Check: f(1)=1e12=2/e0.73576f'(1)=1\cdot e^{-1}\cdot 2=2/e\approx0.73576, and the numerical derivative at x=1x=1 is 0.735760.73576.

Answer: f(x)=x2ex(3x)f'(x)=x^{2}e^{-x}(3-x); critical numbers x=0x=0 (no extremum) and x=3x=3 (absolute maximum, value 27e31.344327e^{-3}\approx1.3443).

(a) Differentiate y=5x2y=5^{x^{2}}.

(b) Differentiate y=log2(3x1)y=\log_{2}(3x-1) and state its domain.

(c) Show that 2lnx=xln22^{\ln x}=x^{\ln 2} for x>0x>0, then differentiate both expressions and verify that the two answers agree.

Show hint

For (a) and (b) identify the inner function before applying the aua^{u} and logau\log_a u rules. For (c), push everything down to base ee using AB=eBlnAA^{B}=e^{B\ln A}.

Show answer

(a) Use ddxau=aulnau\dfrac{d}{dx}a^{u}=a^{u}\ln a\cdot u' with a=5a=5, u=x2u=x^{2}, u=2xu'=2x:

y=5x2ln52x=2xln5  5x2.y'=5^{x^{2}}\ln 5\cdot 2x=2x\ln 5\;5^{x^{2}} .

Check: at x=1x=1 this is 2ln5516.09442\ln 5\cdot 5\approx16.0944, and the numerical derivative is 16.094416.0944.

(b) Domain first: log2\log_{2} needs a positive argument, so 3x1>03x-1>0, i.e. x>13x>\frac13. On (13,)\left(\frac13,\infty\right), use ddxlogau=uulna\dfrac{d}{dx}\log_{a}u=\dfrac{u'}{u\ln a} with a=2a=2, u=3x1u=3x-1, u=3u'=3:

y=3(3x1)ln2.y'=\frac{3}{(3x-1)\ln 2}.

Check: at x=1x=1 this is 32ln22.1640\dfrac{3}{2\ln 2}\approx2.1640, and the numerical derivative is 2.16402.1640.

(c) The identity. For x>0x>0 both sides are defined, and pushing each to base ee:

2lnx=e(lnx)(ln2)andxln2=e(ln2)(lnx).2^{\ln x}=e^{\left(\ln x\right)\left(\ln 2\right)} \qquad\text{and}\qquad x^{\ln 2}=e^{\left(\ln 2\right)\left(\ln x\right)} .

The exponents are the same number, so 2lnx=xln22^{\ln x}=x^{\ln 2}.

Differentiating the left form (aua^{u} with a=2a=2, u=lnxu=\ln x, u=1xu'=\frac1x):

ddx2lnx=2lnxln21x=2lnxln2x.\frac{d}{dx}2^{\ln x}=2^{\ln x}\ln 2\cdot\frac{1}{x}=\frac{2^{\ln x}\ln 2}{x}.

Differentiating the right form. Here the exponent ln2\ln 2 is a constant, so the ordinary power rule is legal:

ddxxln2=(ln2)xln21=(ln2)xln2x.\frac{d}{dx}x^{\ln 2}=\left(\ln 2\right)x^{\,\ln 2-1}=\frac{\left(\ln 2\right)x^{\ln 2}}{x}.

Since 2lnx=xln22^{\ln x}=x^{\ln 2}, the two answers are identical.

Check: at x=ex=e we get 21ln2e=2ln2e0.50999\dfrac{2^{1}\ln 2}{e}=\dfrac{2\ln 2}{e}\approx0.50999, and the numerical derivative is 0.509990.50999.

Answer: (a) 2xln5  5x22x\ln 5\;5^{x^{2}}; (b) 3(3x1)ln2\dfrac{3}{(3x-1)\ln 2} on (13,)\left(\frac13,\infty\right); (c) both forms give (ln2)2lnxx=(ln2)xln2x\dfrac{\left(\ln 2\right)2^{\ln x}}{x}=\dfrac{\left(\ln 2\right)x^{\ln 2}}{x}.

(a) Prove that ddxlnx=1x\dfrac{d}{dx}\ln\left|x\right|=\dfrac{1}{x} for every x0x\ne 0.

(b) Use it to differentiate y=lnx24y=\ln\left|x^{2}-4\right| and state exactly where your formula is valid.

(c) Evaluate y(1)y'(1) and y(3)y'(3).

Show hint

Split the real line at 00 and rewrite the absolute value without bars on each piece; the negative piece needs the chain rule.

Show answer

(a) Proof by cases.

Case x>0x>0. Then x=x\left|x\right|=x, so lnx=lnx\ln\left|x\right|=\ln x and ddxlnx=1x\dfrac{d}{dx}\ln x=\dfrac{1}{x}.

Case x<0x<0. Then x=x>0\left|x\right|=-x>0, so lnx=ln(x)\ln\left|x\right|=\ln(-x). Apply the chain rule with outer lnu\ln u and inner u=xu=-x, u=1u'=-1:

ddxln(x)=uu=1x=1x.\frac{d}{dx}\ln(-x)=\frac{u'}{u}=\frac{-1}{-x}=\frac{1}{x}.

Both cases give 1x\dfrac1x, so ddxlnx=1x\dfrac{d}{dx}\ln\left|x\right|=\dfrac1x for all x0x\ne 0. The point x=0x=0 must be excluded: lnx\ln\left|x\right| is not even defined there.

(b) Apply the chain-rule form ddxlnu=uu\dfrac{d}{dx}\ln\left|u\right|=\dfrac{u'}{u} (valid wherever u0u\ne 0) with u=x24u=x^{2}-4, u=2xu'=2x:

y=2xx24.y'=\frac{2x}{x^{2}-4}.

Validity: we need x240x^{2}-4\ne 0, i.e. x2x\ne 2 and x2x\ne-2. So the formula holds on (,2)(2,2)(2,)(-\infty,-2)\cup(-2,2)\cup(2,\infty) — note this includes negative xx and xx between 2-2 and 22, where x24<0x^{2}-4<0; the absolute value is exactly what buys us those intervals.

(c)

y(1)=2(1)14=23=230.6667,y(3)=2(3)94=65=1.2.y'(1)=\frac{2(1)}{1-4}=\frac{2}{-3}=-\frac{2}{3}\approx-0.6667, \qquad y'(3)=\frac{2(3)}{9-4}=\frac{6}{5}=1.2 .

Check: numerical derivatives of lnx24\ln\left|x^{2}-4\right| at x=1x=1 and x=3x=3 give 0.66667-0.66667 and 1.200001.20000.

Answer: (a) proved by cases; (b) y=2xx24y'=\dfrac{2x}{x^{2}-4} for x±2x\ne\pm 2; (c) y(1)=23y'(1)=-\dfrac23, y(3)=65y'(3)=\dfrac65.

Let a>0a>0 and f(x)=axf(x)=a^{x}.

(a) Using only the limit definition of the derivative, show that f(x)=axf(0)f'(x)=a^{x}f'(0), where f(0)=limh0ah1hf'(0)=\displaystyle\lim_{h\to 0}\frac{a^{h}-1}{h} (you may assume this limit exists).

(b) State the property that singles out the number ee from all other bases.

(c) Given the rule ddxax=axlna\dfrac{d}{dx}a^{x}=a^{x}\ln a, find the exact value of limh03h1h\displaystyle\lim_{h\to 0}\frac{3^{h}-1}{h} and confirm it numerically.

Show hint

In the difference quotient, use the exponent law ax+h=axaha^{x+h}=a^{x}a^{h} and notice that one of the resulting factors has nothing to do with hh.

Show answer

(a) By definition,

f(x)=limh0ax+haxh=limh0axahaxh(exponent law ax+h=axah)=limh0ax(ah1)h=axlimh0ah1h(ax is a constant with respect to h)=axf(0),\begin{aligned} f'(x) &= \lim_{h\to 0}\frac{a^{x+h}-a^{x}}{h} \\ &= \lim_{h\to 0}\frac{a^{x}a^{h}-a^{x}}{h} &&\text{(exponent law }a^{x+h}=a^{x}a^{h}\text{)}\\ &= \lim_{h\to 0}\frac{a^{x}\left(a^{h}-1\right)}{h} \\ &= a^{x}\lim_{h\to 0}\frac{a^{h}-1}{h} &&\text{(}a^{x}\text{ is a constant with respect to }h\text{)}\\ &= a^{x}f'(0), \end{aligned}

where the last equality is the definition of f(0)f'(0) applied at x=0x=0, since a0=1a^{0}=1 gives f(0)=limh0aha0h=limh0ah1hf'(0)=\lim_{h\to 0}\frac{a^{h}-a^{0}}{h}=\lim_{h\to 0}\frac{a^{h}-1}{h}. Note the assumption that the limit exists is what lets us split the limit of a product this way.

So the derivative of every exponential function is a constant multiple of the function itself, and the constant is the slope of the graph at the yy-intercept.

(b) ee is the unique base a>0a>0 for which that constant equals 11:

limh0eh1h=1,equivalentlyddxex=ex,\lim_{h\to 0}\frac{e^{h}-1}{h}=1, \qquad\text{equivalently}\qquad \frac{d}{dx}e^{x}=e^{x},

that is, ee is the unique base whose exponential graph crosses the yy-axis with slope exactly 11, and hence the unique base for which the function equals its own derivative. (Uniqueness is guaranteed because af(0)=lnaa\mapsto f'(0)=\ln a is strictly increasing.)

(c) Put x=0x=0 into ddxax=axlna\dfrac{d}{dx}a^{x}=a^{x}\ln a: the derivative at 00 is a0lna=lnaa^{0}\ln a=\ln a. But by part (a) that derivative at 00 is precisely limh0ah1h\lim_{h\to 0}\frac{a^{h}-1}{h}. Therefore

limh0ah1h=lna,solimh03h1h=ln31.098612.\lim_{h\to 0}\frac{a^{h}-1}{h}=\ln a, \qquad\text{so}\qquad \lim_{h\to 0}\frac{3^{h}-1}{h}=\ln 3\approx 1.098612 .

Numerical confirmation. With h=106h=10^{-6}, 310611061.0986129\dfrac{3^{10^{-6}}-1}{10^{-6}}\approx 1.0986129, agreeing with ln3=1.0986123\ln 3=1.0986123 to six significant figures.

Answer: (a) shown; (b) ee is the unique base with limh0eh1h=1\lim_{h\to 0}\frac{e^{h}-1}{h}=1, equivalently ddxex=ex\frac{d}{dx}e^{x}=e^{x}; (c) the limit equals ln31.0986\ln 3\approx1.0986.

Let y=exlnxy=e^{x}\ln x for x>0x>0. Find the equation of the tangent line to the curve at x=1x=1, and compute yy'' at x=1x=1.

Show hint

Product rule. Before plugging in x=1x=1, notice the value of ln1\ln 1 — it kills exactly one term each time.

Show answer

Point of tangency. At x=1x=1, y=e1ln1=e0=0y=e^{1}\ln 1=e\cdot 0=0, so the point is (1,0)(1,0).

First derivative (product rule with u=exu=e^{x}, v=lnxv=\ln x, so u=exu'=e^{x}, v=1xv'=\frac1x):

y=exlnx+ex1x=ex(lnx+1x).\begin{aligned} y' &= e^{x}\ln x+e^{x}\cdot\frac{1}{x} \\ &= e^{x}\left(\ln x+\frac{1}{x}\right). \end{aligned}

At x=1x=1: y(1)=e1(0+1)=ey'(1)=e^{1}\left(0+1\right)=e.

Tangent line. Point-slope form through (1,0)(1,0) with slope ee:

y0=e(x1)y=e(x1)=exe.y-0=e\left(x-1\right) \qquad\Longrightarrow\qquad y=e\left(x-1\right)=ex-e .

Second derivative. Differentiate y=ex(lnx+x1)y'=e^{x}\left(\ln x+x^{-1}\right) with the product rule again:

y=ex(lnx+1x)+ex(1x1x2)=ex(lnx+2x1x2).\begin{aligned} y'' &= e^{x}\left(\ln x+\frac{1}{x}\right)+e^{x}\left(\frac{1}{x}-\frac{1}{x^{2}}\right) \\ &= e^{x}\left(\ln x+\frac{2}{x}-\frac{1}{x^{2}}\right). \end{aligned}

At x=1x=1:

y(1)=e(0+21)=e2.7183.y''(1)=e\left(0+2-1\right)=e\approx 2.7183 .

Check. A second centred difference y(1+h)2y(1)+y(1h)h2\dfrac{y(1+h)-2y(1)+y(1-h)}{h^{2}} with h=104h=10^{-4} gives 2.718282.71828, matching ee.

Answer: tangent line y=e(x1)y=e(x-1); y(x)=ex(lnx+2x1x2)y''(x)=e^{x}\left(\ln x+\frac{2}{x}-\frac{1}{x^{2}}\right) and y(1)=ey''(1)=e.

Let f(x)=ln(x2x+1(2x3)5)f(x)=\ln\left(\dfrac{x^{2}\sqrt{x+1}}{(2x-3)^{5}}\right).

(a) Find the largest domain of ff.

(b) Expand using log laws and differentiate.

(c) Evaluate f(2)f'(2) exactly.

Show hint

Do not reach for the quotient rule inside the logarithm. Also, work out the domain from the requirement that the whole argument be strictly positive before you split anything up.

Show answer

(a) Domain. The argument of ln\ln must be strictly positive.

  • x2>0x^{2}>0 requires x0x\ne 0.
  • x+1\sqrt{x+1} requires x+10x+1\ge 0, and for the product to be nonzero we need x+1>0x+1>0, i.e. x>1x>-1.
  • The numerator is then positive, so the whole quotient is positive exactly when (2x3)5>0(2x-3)^{5}>0. An odd power has the sign of its base, so this needs 2x3>02x-3>0, i.e. x>32x>\frac{3}{2}.

Intersecting, x>32x>\frac32 (which automatically gives x0x\ne 0 and x>1x>-1). Domain: (32,)\left(\frac32,\infty\right).

(b) Expand first. On (32,)\left(\frac32,\infty\right) each of xx, x+1x+1 and 2x32x-3 is positive, so the log laws apply cleanly:

f(x)=ln(x2)+ln(x+1)ln((2x3)5)=2lnx+12ln(x+1)5ln(2x3).\begin{aligned} f(x) &= \ln\left(x^{2}\right)+\ln\left(\sqrt{x+1}\right)-\ln\left((2x-3)^{5}\right) \\ &= 2\ln x+\frac{1}{2}\ln(x+1)-5\ln(2x-3). \end{aligned}

Now differentiate term by term with (lnu)=u/u\left(\ln u\right)'=u'/u:

f(x)=21x+121x+1522x3=2x+12(x+1)102x3.\begin{aligned} f'(x) &= 2\cdot\frac{1}{x}+\frac{1}{2}\cdot\frac{1}{x+1}-5\cdot\frac{2}{2x-3} \\ &= \frac{2}{x}+\frac{1}{2(x+1)}-\frac{10}{2x-3}. \end{aligned}

(c) At x=2x=2 (which is in the domain, since 2>322>\frac32):

f(2)=22+12(3)1043=1+1610=66+16606=536.f'(2)=\frac{2}{2}+\frac{1}{2(3)}-\frac{10}{4-3}=1+\frac{1}{6}-10=\frac{6}{6}+\frac{1}{6}-\frac{60}{6}=-\frac{53}{6}.

Numerically 5368.8333-\frac{53}{6}\approx-8.8333; a centred difference quotient on the original unexpanded ff gives 8.8333-8.8333.

Answer: (a) (32,)\left(\frac32,\infty\right); (b) f(x)=2x+12(x+1)102x3f'(x)=\dfrac{2}{x}+\dfrac{1}{2(x+1)}-\dfrac{10}{2x-3}; (c) f(2)=5368.8333f'(2)=-\dfrac{53}{6}\approx-8.8333.

Use logarithmic differentiation to find yy' for

y=(2x+1)5(x3)4(x2+4)3,y=\frac{(2x+1)^{5}(x-3)^{4}}{\left(x^{2}+4\right)^{3}},

then evaluate y(0)y'(0) exactly. Say precisely where the method is valid and what happens at the points it excludes.

Show hint

Near x=0x=0 one of the factors is negative, so take the log of the absolute value rather than of yy itself. Also check which factor can never vanish.

Show answer

Set up. The factor x3x-3 is negative near x=0x=0, so we must work with absolute values. Note x2+44>0x^{2}+4\ge 4>0 always, so that factor causes no trouble. For x12x\ne-\frac12 and x3x\ne 3 (where y0y\ne 0),

lny=5ln2x+1+4lnx33ln(x2+4).\ln\left|y\right|=5\ln\left|2x+1\right|+4\ln\left|x-3\right|-3\ln\left(x^{2}+4\right).

Differentiate both sides in xx, using ddxlnu=uu\dfrac{d}{dx}\ln\left|u\right|=\dfrac{u'}{u} on the left (u=yu=y) and on each right-hand term:

yy=522x+1+41x332xx2+4=102x+1+4x36xx2+4.\frac{y'}{y}=5\cdot\frac{2}{2x+1}+4\cdot\frac{1}{x-3}-3\cdot\frac{2x}{x^{2}+4} =\frac{10}{2x+1}+\frac{4}{x-3}-\frac{6x}{x^{2}+4}.

Multiply by yy and substitute back:

y=(2x+1)5(x3)4(x2+4)3(102x+1+4x36xx2+4).y'=\frac{(2x+1)^{5}(x-3)^{4}}{\left(x^{2}+4\right)^{3}}\left(\frac{10}{2x+1}+\frac{4}{x-3}-\frac{6x}{x^{2}+4}\right).

Evaluate at x=0x=0. First the function value:

y(0)=(1)5(3)4(4)3=8164.y(0)=\frac{(1)^{5}(-3)^{4}}{\left(4\right)^{3}}=\frac{81}{64}.

Then the bracket:

101+4304=1043=3043=263.\frac{10}{1}+\frac{4}{-3}-\frac{0}{4}=10-\frac{4}{3}=\frac{30-4}{3}=\frac{26}{3}.

Therefore

y(0)=8164263=8126192=2106192=35132=10.96875.y'(0)=\frac{81}{64}\cdot\frac{26}{3}=\frac{81\cdot 26}{192}=\frac{2106}{192}=\frac{351}{32}=10.96875 .

Check. A centred difference quotient with step 10610^{-6} gives 10.9687510.96875.

Where the method is valid. Step 1 needs y0y\ne 0, so the derivation excludes x=12x=-\frac12 and x=3x=3; at those points the bracket has a pole and the displayed formula for yy' is literally undefined. That is a limitation of the method, not of yy: yy is a polynomial-over-positive-polynomial and is differentiable everywhere. At x=3x=3 the factor (x3)4(x-3)^{4} is a zero of order 424\ge 2, so y(3)=0y'(3)=0; at x=12x=-\frac12 the factor (2x+1)5(2x+1)^{5} is a zero of order 525\ge 2, so y(12)=0y'\left(-\frac12\right)=0 as well. (Both follow from writing y=(xc)kg(x)y=(x-c)^{k}g(x) with k2k\ge2 and using the product rule.)

Answer: y=(2x+1)5(x3)4(x2+4)3(102x+1+4x36xx2+4)y'=\dfrac{(2x+1)^{5}(x-3)^{4}}{\left(x^{2}+4\right)^{3}}\left(\dfrac{10}{2x+1}+\dfrac{4}{x-3}-\dfrac{6x}{x^{2}+4}\right) for x12,3x\ne-\frac12,3, and y(0)=35132=10.96875y'(0)=\dfrac{351}{32}=10.96875.

Let y=xxy=x^{x} for x>0x>0.

(a) Explain why neither ddxxx=xxx1\dfrac{d}{dx}x^{x}=x\cdot x^{\,x-1} nor ddxxx=xxlnx\dfrac{d}{dx}x^{x}=x^{x}\ln x is correct.

(b) Find yy'.

(c) Find the exact xx-value and exact yy-value of the minimum of xxx^{x} on (0,)(0,\infty), and justify that it is a minimum.

Show hint

Look hard at the hypotheses of the two rules you already know: one demands a constant exponent, the other a constant base. Then take logs of both sides before differentiating.

Show answer

(a) Why both are wrong. The power rule ddxxn=nxn1\dfrac{d}{dx}x^{n}=nx^{\,n-1} is a theorem about a constant exponent nn — its proof (binomial expansion, or the limit definition) treats nn as a fixed number. The rule ddxax=axlna\dfrac{d}{dx}a^{x}=a^{x}\ln a is a theorem about a constant base aa — its proof rewrites ax=exlnaa^{x}=e^{x\ln a} with lna\ln a a constant. In xxx^{x} the base and exponent vary together, so neither hypothesis is satisfied and neither conclusion is available.

Numerically, at x=2x=2 the true slope is 6.77266.7726 (centred difference), while the first candidate gives xxx1=xx=4x\cdot x^{\,x-1}=x^{x}=4 and the second gives xxlnx=4ln22.7726x^{x}\ln x=4\ln 2\approx 2.7726. Both are wrong, and interestingly the correct answer 4(ln2+1)6.77264(\ln 2+1)\approx 6.7726 is their sum — the two bad answers are each one of the two terms the true rule produces.

(b) Logarithmic differentiation. For x>0x>0 we have y=xx>0y=x^{x}>0, so we may take logs:

lny=ln(xx)=xlnx.\ln y=\ln\left(x^{x}\right)=x\ln x .

Differentiate both sides with respect to xx (chain rule on the left, product rule on the right):

yy=1lnx+x1x=lnx+1.\begin{aligned} \frac{y'}{y} &= 1\cdot\ln x+x\cdot\frac{1}{x} \\ &= \ln x+1 . \end{aligned}

Multiply by y=xxy=x^{x}:

y=xx(lnx+1),x>0.y'=x^{x}\left(\ln x+1\right),\qquad x>0 .

Check: at x=2x=2, y=4(ln2+1)6.77259y'=4\left(\ln 2+1\right)\approx 6.77259; the numerical derivative is 6.772596.77259. At x=12x=\frac12, y=(12)1/2(ln12+1)0.21698y'=\left(\frac12\right)^{1/2}\left(\ln\frac12+1\right)\approx 0.21698; the numerical derivative is 0.216980.21698.

(c) The minimum. Since xx>0x^{x}>0 for all x>0x>0, the factor xxx^{x} never vanishes, so

y=0    lnx+1=0    lnx=1    x=e1=1e.y'=0\iff \ln x+1=0\iff \ln x=-1\iff x=e^{-1}=\frac{1}{e}.

Sign of yy': lnx+1<0\ln x+1<0 for 0<x<1e0<x<\frac1e and lnx+1>0\ln x+1>0 for x>1ex>\frac1e, so yy decreases then increases — by the First Derivative Test x=1ex=\frac1e is a local and (since it is the only critical point on the interval) the absolute minimum. The minimum value is

y(1e)=(1e)1/e=e1/e0.69220.y\left(\frac1e\right)=\left(\frac1e\right)^{1/e}=e^{-1/e}\approx 0.69220 .

Second-derivative confirmation. Differentiating y=xx(lnx+1)y'=x^{x}(\ln x+1) gives y=xx(lnx+1)2+xx1xy''=x^{x}\left(\ln x+1\right)^{2}+x^{x}\cdot\frac1x. At x=1ex=\frac1e the first term is 00, so y(1e)=ee1/e1.8816>0y''\left(\frac1e\right)=e\cdot e^{-1/e}\approx 1.8816>0: concave up, a minimum.

Answer: (b) y=xx(lnx+1)y'=x^{x}\left(\ln x+1\right); (c) minimum at x=1ex=\dfrac1e with value e1/e0.6922e^{-1/e}\approx0.6922.

Let y=(sinx)xy=\left(\sin x\right)^{x} on the interval (0,π)(0,\pi).

(a) Explain why logarithmic differentiation is legitimate on this interval but not on (π,2π)(\pi,2\pi).

(b) Find yy'.

(c) Evaluate y(π2)y'\left(\frac{\pi}{2}\right) and y(π6)y'\left(\frac{\pi}{6}\right) exactly.

Show hint

Everything hinges on the sign of the base. Once you have taken logs, the right-hand side is a product of two familiar functions.

Show answer

(a) Legitimacy. The expression uvu^{v} with a non-integer, variable exponent is defined as a real number only when the base u>0u>0 (apart from the degenerate case u=0u=0 with v>0v>0), and taking ln\ln requires strict positivity. On (0,π)(0,\pi) we have sinx>0\sin x>0, so (sinx)x>0\left(\sin x\right)^{x}>0 and lny=xlnsinx\ln y=x\ln\sin x makes sense. On (π,2π)(\pi,2\pi) we have sinx<0\sin x<0, so (sinx)x\left(\sin x\right)^{x} is not a real number for most xx there (e.g. x=3π2x=\frac{3\pi}{2} would need an irrational power of a negative number). The function itself does not exist there, let alone its logarithm.

(b) Differentiate. Take logs on (0,π)(0,\pi):

lny=xln(sinx).\ln y=x\ln\left(\sin x\right).

Differentiate both sides in xx; the left side gives y/yy'/y by the chain rule, the right side needs the product rule and then the chain rule on ln(sinx)\ln(\sin x):

yy=1ln(sinx)+xcosxsinx=ln(sinx)+xcotx.\begin{aligned} \frac{y'}{y} &= 1\cdot\ln\left(\sin x\right)+x\cdot\frac{\cos x}{\sin x} \\ &= \ln\left(\sin x\right)+x\cot x . \end{aligned}

Multiply by yy:

y=(sinx)x(ln(sinx)+xcotx),0<x<π.y'=\left(\sin x\right)^{x}\left(\ln\left(\sin x\right)+x\cot x\right),\qquad 0<x<\pi .

(c) Values.

At x=π2x=\frac{\pi}{2}: sinπ2=1\sin\frac{\pi}{2}=1, so y=1π/2=1y=1^{\pi/2}=1, ln1=0\ln 1=0, and cotπ2=cos(π/2)sin(π/2)=01=0\cot\frac{\pi}{2}=\frac{\cos(\pi/2)}{\sin(\pi/2)}=\frac{0}{1}=0. Hence

y(π2)=1(0+π20)=0.y'\left(\frac{\pi}{2}\right)=1\cdot\left(0+\frac{\pi}{2}\cdot 0\right)=0 .

(Sensible: (sinx)x1\left(\sin x\right)^{x}\le 1 on (0,π)(0,\pi) with equality at x=π2x=\frac{\pi}{2}, so that point is a maximum and the tangent is horizontal.)

At x=π6x=\frac{\pi}{6}: sinπ6=12\sin\frac{\pi}{6}=\frac12, cosπ6=32\cos\frac{\pi}{6}=\frac{\sqrt3}{2}, so cotπ6=3\cot\frac{\pi}{6}=\sqrt3 and ln12=ln2\ln\frac12=-\ln 2. Therefore

y(π6)=(12)π/6(ln2+π63)=(12)π/6(π36ln2).y'\left(\frac{\pi}{6}\right)=\left(\frac{1}{2}\right)^{\pi/6}\left(-\ln 2+\frac{\pi}{6}\sqrt3\right) =\left(\frac{1}{2}\right)^{\pi/6}\left(\frac{\pi\sqrt3}{6}-\ln 2\right).

Numerically (12)π/60.695634\left(\frac12\right)^{\pi/6}\approx 0.695634 and π36ln20.9069000.693147=0.213753\frac{\pi\sqrt3}{6}-\ln 2\approx 0.906900-0.693147=0.213753, so y(π6)0.14869y'\left(\frac{\pi}{6}\right)\approx 0.14869. A centred difference quotient gives 0.148690.14869.

Answer: (b) y=(sinx)x(ln(sinx)+xcotx)y'=\left(\sin x\right)^{x}\left(\ln\left(\sin x\right)+x\cot x\right) on (0,π)(0,\pi); (c) y(π2)=0y'\left(\frac{\pi}{2}\right)=0 and y(π6)=(12)π/6(π36ln2)0.1487y'\left(\frac{\pi}{6}\right)=\left(\frac12\right)^{\pi/6}\left(\frac{\pi\sqrt3}{6}-\ln 2\right)\approx 0.1487.

(a) Let u(x)>0u(x)>0 and v(x)v(x) be differentiable. Prove that

ddxuv=uv(vlnu+vuu),\frac{d}{dx}u^{v}=u^{v}\left(v'\ln u+\frac{v\,u'}{u}\right),

and show that it degenerates to the power rule when vv is constant and to the exponential rule when uu is constant.

(b) Use it to differentiate the tower y=xxxy=x^{x^{x}} for x>0x>0, where xxxx^{x^{x}} means x(xx)x^{\left(x^{x}\right)}.

(c) Evaluate y(1)y'(1).

Show hint

For (a), the only honest starting point is uv=evlnuu^{v}=e^{v\ln u}. For (b) apply the formula with u=xu=x and v=xxv=x^{x} — and you will need the derivative of xxx^{x} from the previous problem.

Show answer

(a) Proof. Because u(x)>0u(x)>0, lnu\ln u is defined and uv=evlnuu^{v}=e^{v\ln u} (this is the definition of a real power with a non-integer exponent). Differentiate with the chain rule, outer function ewe^{w} with w=vlnuw=v\ln u, and the product rule inside:

w=vlnu+vuu,ddxuv=eww=evlnu(vlnu+vuu)=uv(vlnu+vuu).\begin{aligned} w' &= v'\ln u+v\cdot\frac{u'}{u},\\ \frac{d}{dx}u^{v} &= e^{w}w' = e^{v\ln u}\left(v'\ln u+\frac{v\,u'}{u}\right) = u^{v}\left(v'\ln u+\frac{v\,u'}{u}\right). \end{aligned}

Degenerate case 1: vnv\equiv n constant. Then v=0v'=0 and

ddxun=unnuu=nun1u,\frac{d}{dx}u^{n}=u^{n}\cdot\frac{n\,u'}{u}=n\,u^{\,n-1}u',

which is precisely the chain-rule power rule.

Degenerate case 2: ua>0u\equiv a>0 constant. Then u=0u'=0 and

ddxav=avlnav,\frac{d}{dx}a^{v}=a^{v}\ln a\cdot v',

which is precisely the chain-rule exponential rule. So the general formula is literally "power-rule term ++ exponential-rule term", and xxx^{x} is the case where both terms survive.

(b) The tower. First, a notation warning: exponentiation associates upward, so xxx=x(xx)x^{x^{x}}=x^{\left(x^{x}\right)}, which is not (xx)x=xx2\left(x^{x}\right)^{x}=x^{x^{2}}. (At x=3x=3 the first is 3273^{27} and the second is 393^{9}.)

Apply the formula with u=xu=x (so u=1u'=1, and u>0u>0 as required) and v=xxv=x^{x}, whose derivative we know:

v=ddxxx=xx(lnx+1).v'=\frac{d}{dx}x^{x}=x^{x}\left(\ln x+1\right).

Then

y=uv(vlnu+vuu)=xxx(xx(lnx+1)lnx+xx1x)=xxx(xx(lnx+1)lnx+xx1).\begin{aligned} y' &= u^{v}\left(v'\ln u+\frac{v\,u'}{u}\right) \\ &= x^{x^{x}}\left(x^{x}\left(\ln x+1\right)\ln x+\frac{x^{x}\cdot 1}{x}\right) \\ &= x^{x^{x}}\left(x^{x}\left(\ln x+1\right)\ln x+x^{\,x-1}\right). \end{aligned}

Same answer by logs. lny=xxlnx\ln y=x^{x}\ln x, so by the product rule yy=xx(lnx+1)lnx+xx1x\dfrac{y'}{y}=x^{x}(\ln x+1)\ln x+x^{x}\cdot\dfrac{1}{x}, and multiplying by y=xxxy=x^{x^{x}} reproduces the line above.

(c) At x=1x=1. Here xx=11=1x^{x}=1^{1}=1, so xxx=11=1x^{x^{x}}=1^{1}=1, and ln1=0\ln 1=0, xx1=10=1x^{\,x-1}=1^{0}=1. Hence

y(1)=1(1(0+1)0+1)=1.y'(1)=1\cdot\left(1\cdot(0+1)\cdot 0+1\right)=1 .

Check. A centred difference quotient of xxxx^{x^{x}} at x=1x=1 with step 10610^{-6} gives 1.00001.0000. A second check away from the trivial point: at x=2x=2,

y(2)=24(4(1+ln2)ln2+2)=32+64ln2(1+ln2)107.1104,y'(2)=2^{4}\left(4\left(1+\ln 2\right)\ln 2+2\right)=32+64\ln 2\left(1+\ln 2\right)\approx 107.1104,

and the numerical derivative there is 107.1104107.1104.

Answer: (b) y=xxx(xx(lnx+1)lnx+xx1)y'=x^{x^{x}}\left(x^{x}\left(\ln x+1\right)\ln x+x^{\,x-1}\right) for x>0x>0; (c) y(1)=1y'(1)=1.