Mascot image.
#Math#Differentiation

The Natural Logarithm

Lesson 5AM closed with the Reduction of bxb^{x} to ekxe^{k x} theorem: every base b>0b > 0 admits a unique constant kk with bx=ekxb^{x} = e^{k x}, and that constant is the unique solution of ek=be^{k} = b. The numerical experiments at the start of that lesson, m20.693m_{2} \approx 0.693, m31.099m_{3} \approx 1.099, m51.609m_{5} \approx 1.609, were exactly these values of kk for b=2,3,5b = 2, 3, 5. Knowing kk exists is enough to differentiate bxb^{x}, but the constant is still nameless: a tabulation, not a formula. Investing £1000 at 15%15\% per year writes B(t)=1000ektB(t) = 1000 \, e^{k t} with ek=1.15e^{k} = 1.15, and reading kk off requires a procedure for inverting ee.

That inverse is the natural logarithm. It names the constants from Lesson 5AM, gives the derivative of lnx\ln x, simplifies product differentiation, and extends the power rule from rational exponents to all real exponents.

The Natural Logarithm Function

Recitation 4 established that for every b>0b > 0 with b1b \neq 1, the function bxb^{x} is strictly monotonic, hence one-to-one. With b=eb = e, the graph of y=exy = e^{x} is strictly increasing, passes through (0,1)(0, 1), approaches 00 as xx \to -\infty, and grows without bound as xx \to \infty. We now use the inverse-function idea.

Definition 38 (Inverse function)

Suppose a function never takes the same output value twice. Its inverse function sends each output back to the input that produced it. Graphically, the inverse is obtained by reflecting the original graph across the line y=xy = x. For example, the inverse of f(x)=x+2f(x) = x + 2 is f1(x)=x2f^{-1}(x) = x - 2.

Applying this to y=exy = e^{x}, the reflected curve is defined for every x>0x > 0 (since eye^{y} ranges over (0,)(0, \infty) as yy ranges over the real line). For each such positive xx, exactly one yy satisfies x=eyx = e^{y}. That unique yy is named lnx\ln x.

Definition 39 (Natural logarithm)

For every x>0x > 0, the natural logarithm of xx, written lnx\ln x, is the unique real number yy such that

ey=x.e^{y} = x.

Equivalently, the two equations

y=lnxandx=ey(1)y = \ln x \qquad \text{and} \qquad x = e^{y} \tag{1}

describe the same pair (x,y)(x, y): each one is true exactly when the other is.

Graphs of y = e^x and y = ln x on the same axes, with the line y = x drawn dotted as a reflecting mirror. A sample point (a, e^a) on the exponential curve is reflected across y = x to the point (e^a, a) on the logarithm curve, the two points joined by a perpendicular dashed segment. The exponential passes through (0, 1); the logarithm passes through (1, 0).

Five facts read directly off the figure.

  1. lnx\ln x is defined only for x>0x > 0.
  2. ln1=0\ln 1 = 0, since (0,1)(0, 1) on y=exy = e^{x} reflects to (1,0)(1, 0) on y=lnxy = \ln x.
  3. lnx<0\ln x < 0 for 0<x<10 < x < 1, and lnx>0\ln x > 0 for x>1x > 1.
  4. lnx\ln x is strictly increasing.
  5. lnx\ln x \to -\infty as xx shrinks toward 00 from the positive side, and lnx\ln x \to \infty as xx \to \infty.

The two equations expressing the inverse relationship cancel one function with the other:

Theorem 22 (Inverse identities)

For every real xx in the appropriate domain,

elnx=x(x>0),(2)e^{\ln x} = x \quad (x > 0), \tag{2}ln(ex)=x(every real x).(3)\ln(e^{x}) = x \quad (\text{every real } x). \tag{3}
Proof

For (2): pick x>0x > 0. The point (lnx,x)(\ln x, x) sits on the graph of y=exy = e^{x} by definition, since the reflected point (x,lnx)(x, \ln x) sits on y=lnxy = \ln x and the reflection swaps coordinates. So elnx=xe^{\ln x} = x.

For (3): pick any real xx. The point (x,ex)(x, e^{x}) sits on y=exy = e^{x}, so its reflection (ex,x)(e^{x}, x) sits on y=lnxy = \ln x. Since the second coordinate of a point on y=lnxy = \ln x at first coordinate exe^{x} is exactly ln(ex)\ln(e^{x}), we read off ln(ex)=x\ln(e^{x}) = x.

In words: lnx\ln x is the exponent to which ee must be raised to get xx. Identity (2) says that exponentiating after taking a log returns the original positive input; identity (3) says that taking a log after exponentiating returns the original real input.

Example 141 (Simplifying expressions in ln\ln and ee)

Simplify each expression to a number.

  1. eln4+2ln3e^{\ln 4 + 2 \ln 3}.

  2. ln(e5e2)\ln (e^{5} \cdot e^{-2}).

  3. e3ln2ln8e^{3 \ln 2 - \ln 8}.

  4. Split using law (i) of exponents from Recitation 4, then use e2ln3=(eln3)2e^{2 \ln 3} = (e^{\ln 3})^{2} from law (iv):

eln4+2ln3=eln4(eln3)2=432=36,e^{\ln 4 + 2 \ln 3} = e^{\ln 4} \cdot (e^{\ln 3})^{2} = 4 \cdot 3^{2} = 36,

where the last step applied identity (2)(2) to each factor.

  1. Combine the inside using law (i): e5e2=e3e^{5} \cdot e^{-2} = e^{3}. Then identity (3)(3) gives ln(e3)=3\ln(e^{3}) = 3.

  2. Collapse the ee-tower in two steps. By law (iv), e3ln2=(eln2)3=23=8e^{3 \ln 2} = (e^{\ln 2})^{3} = 2^{3} = 8. By law (iii), e3ln2ln8=e3ln2/eln8=8/8=1e^{3 \ln 2 - \ln 8} = e^{3 \ln 2} / e^{\ln 8} = 8 / 8 = 1.

The two identities are also the only tools needed to solve equations involving an exponential or a logarithm.

Example 142 (An exponential equation)

Solve 5ex3=45 \, e^{x - 3} = 4 for xx.

Divide each side by 55:

ex3=0.8.e^{x - 3} = 0{.}8.

Take the natural logarithm of each side and apply identity (3)(3) on the left:

ln(ex3)=ln0.8.\ln(e^{x - 3}) = \ln 0{.}8.

The left side is just x3x - 3, so

x3=ln0.8,x=3+ln0.8.x - 3 = \ln 0{.}8, \qquad x = 3 + \ln 0{.}8.

The closed-form answer is x=3+ln0.8x = 3 + \ln 0{.}8. A scientific calculator returns ln0.80.22314\ln 0{.}8 \approx -0{.}22314, so x2.77686x \approx 2{.}77686 to five decimals, but the symbolic value is the lesson here.

Example 143 (A logarithmic equation)

Solve 2lnx+7=02 \ln x + 7 = 0 for xx.

Solve the linear equation for lnx\ln x:

lnx=72.\ln x = -\tfrac{7}{2}.

Exponentiate both sides and use identity (2)(2) on the left:

elnx=e7/2,x=e7/2.e^{\ln x} = e^{-7/2}, \qquad x = e^{-7/2}.

The strict positivity of e7/2e^{-7/2} confirms xx lies in the domain of ln\ln, as it must.

Note (Procedure: solving with $\ln$ and $e$)
  1. If the unknown sits inside an exponential e()e^{(\cdot)}, isolate the exponential and take ln\ln of both sides; use (3)(3) to drop the ee.
  2. If the unknown sits inside a logarithm ln()\ln(\cdot), isolate the logarithm and exponentiate both sides; use (2)(2) to drop the ln\ln.
  3. Domain check: any solution involving ln\ln requires the argument to be strictly positive.
Problem 156

Solve each equation for xx. Leave answers in closed form involving ln\ln or ee.

  1. 7e2x=217 \, e^{2 x} = 21.
  2. ln(3x1)=4\ln(3 x - 1) = 4.
  3. ex2=e4x3e^{x^{2}} = e^{4 x - 3}.
  4. lnx+ln(x2)=ln15\ln x + \ln(x - 2) = \ln 15. (Use the algebraic property of ln\ln developed below; or verify the answer makes both logarithms defined.)

Algebraic Properties of ln\ln

The four core algebraic identities of natural logarithms transfer directly from the laws of exponents in Recitation 4, by exponentiating both sides and matching exponents.

Note (Real powers with positive base)

For x>0x > 0 and real bb, we interpret

xb=eblnx.x^{b} = e^{b \ln x}.

When bb is rational, this agrees with the rational-exponent notation from Recitation 1. For irrational bb, this equation is the definition that makes xbx^{b} meaningful.

Theorem 23 (Properties of ln\ln)

For positive numbers x,yx, y and any real number bb:

(LI) ln(xy)=lnx+lny\ln(x y) = \ln x + \ln y

(LII) ln ⁣(1x)=lnx\ln\!\left(\dfrac{1}{x}\right) = -\ln x

(LIII) ln ⁣(xy)=lnxlny\ln\!\left(\dfrac{x}{y}\right) = \ln x - \ln y

(LIV) ln(xb)=blnx\ln(x^{b}) = b \ln x

Proof

LI. Raise ee to each side and use (2)(2) three times: eln(xy)=xy=elnxelny=elnx+lnye^{\ln(x y)} = x y = e^{\ln x} \cdot e^{\ln y} = e^{\ln x + \ln y} by law (i). Both sides are e()e^{(\cdot)} and equal, and e()e^{(\cdot)} is one-to-one (Recitation 4), so the exponents match: ln(xy)=lnx+lny\ln(x y) = \ln x + \ln y.

LII. Same template. eln(1/x)=1/x=1/elnx=elnxe^{\ln(1/x)} = 1/x = 1/e^{\ln x} = e^{-\ln x} by law (ii). Match exponents.

LIII. Combine LI and LII: ln(x/y)=ln(x1/y)=lnx+ln(1/y)=lnxlny\ln(x/y) = \ln(x \cdot 1/y) = \ln x + \ln(1/y) = \ln x - \ln y.

LIV. By the definition of real powers with positive base, xb=eblnxx^{b} = e^{b \ln x}. Applying identity (3)(3) gives

ln(xb)=ln(eblnx)=blnx.\ln(x^{b}) = \ln(e^{b \ln x}) = b \ln x.

These four properties are used repeatedly below. They convert products into sums, quotients into differences, and powers into multiplications, which is what makes a stack of factors easier to differentiate one term at a time.

Example 144 (Combining and splitting logarithms)

Write each expression as a single logarithm.

  1. ln5+2ln3\ln 5 + 2 \ln 3.

  2. 12ln(4t)ln(t2+1)\tfrac{1}{2} \ln(4 t) - \ln(t^{2} + 1).

  3. lnx+ln3+lnyln5\ln x + \ln 3 + \ln y - \ln 5.

  4. Apply LIV to the second term, then LI:

ln5+2ln3=ln5+ln9=ln45.\ln 5 + 2 \ln 3 = \ln 5 + \ln 9 = \ln 45.
  1. Apply LIV inside, then LIII:
12ln(4t)ln(t2+1)=ln ⁣((4t)1/2)ln(t2+1)=ln ⁣(2tt2+1).\tfrac{1}{2} \ln(4 t) - \ln(t^{2} + 1) = \ln\!\left((4 t)^{1/2}\right) - \ln(t^{2} + 1) = \ln \!\left(\frac{2 \sqrt{t}}{t^{2} + 1}\right).
  1. Apply LI twice, then LIII:
lnx+ln3+lnyln5=ln(3xy)ln5=ln ⁣(3xy5).\ln x + \ln 3 + \ln y - \ln 5 = \ln(3 x y) - \ln 5 = \ln \!\left(\frac{3 x y}{5}\right).
Problem 157

Combine each into a single logarithm.

  1. ln6ln2+3ln5\ln 6 - \ln 2 + 3 \ln 5.
  2. 4lnu12ln(u2+9)+ln74 \ln u - \tfrac{1}{2} \ln(u^{2} + 9) + \ln 7.
  3. ln(2a)+ln(2b)2ln4\ln(2 a) + \ln(2 b) - 2 \ln 4.
Problem 158

Split each into a sum and difference of logarithms of xx, ln2\ln 2, ln5\ln 5, etc., as far as the four properties allow. For this problem, take x>1x > 1 and take every displayed variable inside a logarithm to be positive.

  1. ln ⁣(50x3x+1)\ln \!\left(\dfrac{50 x^{3}}{x + 1}\right).
  2. lnx4(x1)(2x+5)3\ln \sqrt{\dfrac{x^{4} (x - 1)}{(2 x + 5)^{3}}}.
  3. ln(x2e3x)\ln(x^{2} \, e^{3 x}). (Use identity (3)(3) alongside LI.)

Closing the Reduction Theorem

The reduction theorem stated that bx=ekxb^{x} = e^{k x} for the unique kk with ek=be^{k} = b. Identity (1)(1) now names that constant.

Theorem 24 (Naming the reduction constant)

For every b>0b > 0,

bx=e(lnb)xfor every real x.(4)b^{x} = e^{(\ln b) \, x} \qquad \text{for every real } x. \tag{4}

Consequently,

ddx(bx)=(lnb)bx.(5)\frac{d}{dx} (b^{x}) = (\ln b) \, b^{x}. \tag{5}
Proof

The unique kk with ek=be^{k} = b is k=lnbk = \ln b, by (1)(1). Substituting into the reduction theorem gives (4)(4). Differentiating bx=e(lnb)xb^{x} = e^{(\ln b) x} by the formula for ekxe^{k x}, with k=lnbk = \ln b, yields (5)(5).

The undetermined slope-at-zero constants mbm_{b} from Lesson 5AM’s tables are now fully named: mb=lnbm_{b} = \ln b. The numerics align: ln20.693\ln 2 \approx 0.693, ln31.099\ln 3 \approx 1.099, ln51.609\ln 5 \approx 1.609, the values the limit table produced.

Example 145 (A British investor's marginal growth)

A British investor’s account balance is B(t)=1000(1.15)tB(t) = 1000 \cdot (1{.}15)^{t} pounds after tt years. Find B(t)B'(t) in closed form, and compute the value of B(0)B'(0).

By (5)(5) with b=1.15b = 1{.}15,

B(t)=1000(ln1.15)(1.15)t=(ln1.15)B(t).B'(t) = 1000 \cdot (\ln 1{.}15) \cdot (1{.}15)^{t} = (\ln 1{.}15) \, B(t).

The proportionality constant in the rate equation B(t)=kB(t)B'(t) = k \, B(t) is exactly ln1.150.1398\ln 1{.}15 \approx 0{.}1398, the continuously compounded rate equivalent to a 15%15\% annual return. At t=0t = 0, B(0)=1000B(0) = 1000, so

B(0)=1000ln1.15139.8 £/year.B'(0) = 1000 \, \ln 1{.}15 \approx 139{.}8 \text{ £/year}.

The closed form ln1.15\ln 1{.}15 replaces the unnamed constant from the analogous problem in Lesson 5AM.

Problem 159

A bacteria culture grows according to N(t)=1003tN(t) = 100 \cdot 3^{t}, where tt is in hours. Use (5)(5) to write N(t)N'(t) in closed form, and compute the population’s instantaneous rate of growth at the moment the population first reaches 300300.

The Derivative of lnx\ln x

Identity (2)(2), elnx=xe^{\ln x} = x, is an equation between two differentiable functions of xx on (0,)(0, \infty). Differentiating both sides yields the derivative of ln\ln in one stroke.

Theorem 25 (Derivative of lnx\ln x)

For every x>0x > 0,

ddx(lnx)=1x.(6)\frac{d}{dx} (\ln x) = \frac{1}{x}. \tag{6}
Proof

The right-hand side of (2)(2) has derivative 11:

ddx(x)=1.\frac{d}{dx}(x) = 1.

The left-hand side, by the chain rule for exponentials with inner function g(x)=lnxg(x) = \ln x, has derivative

ddx(elnx)=elnxddx(lnx)=xddx(lnx),\frac{d}{dx} (e^{\ln x}) = e^{\ln x} \cdot \frac{d}{dx}(\ln x) = x \cdot \frac{d}{dx}(\ln x),

where the last step replaced elnxe^{\ln x} by xx via (2)(2). Setting the two derivatives equal,

xddx(lnx)=1.x \cdot \frac{d}{dx}(\ln x) = 1.

Dividing by x>0x > 0 gives ddx(lnx)=1x\dfrac{d}{dx}(\ln x) = \dfrac{1}{x}.

The graph of lnx\ln x has slope 11 at x=1x = 1 (the same point at which y=exy = e^{x} has height 11, by reflection), slope 1/21/2 at x=2x = 2, slope 1/e1/e at x=ex = e, and so on. The slope shrinks toward 00 as xx \to \infty, visible as the flattening on the right of y=lnxy = \ln x in the graph above, and grows without bound as xx approaches 00 from the positive side.

Example 146 (Three derivatives involving lnx\ln x)

Differentiate:

  1. y=(lnx)5y = (\ln x)^{5}.

  2. y=xlnxy = x \ln x.

  3. y=ln(x3+5x2+8)y = \ln(x^{3} + 5 x^{2} + 8).

  4. General power rule with inner function lnx\ln x:

dydx=5(lnx)4ddx(lnx)=5(lnx)41x=5(lnx)4x.\frac{dy}{dx} = 5 (\ln x)^{4} \cdot \frac{d}{dx}(\ln x) = 5 (\ln x)^{4} \cdot \frac{1}{x} = \frac{5 (\ln x)^{4}}{x}.
  1. Product rule:
dydx=x1x+(lnx)1=1+lnx.\frac{dy}{dx} = x \cdot \frac{1}{x} + (\ln x) \cdot 1 = 1 + \ln x.

The derivative is zero at lnx=1\ln x = -1, that is, x=e1=1/ex = e^{-1} = 1/e. By the first derivative test, the sign of 1+lnx1 + \ln x flips from negative to positive there, so (1/e,1/e)(1/e, -1/e) is a relative minimum.

  1. Chain rule with outer ln()\ln(\cdot) and inner x3+5x2+8x^{3} + 5 x^{2} + 8, on the part of the domain where x3+5x2+8>0x^{3} + 5 x^{2} + 8 > 0. The derivative of ln\ln at the inner value is 1/(inner)1/(\text{inner}):
dydx=1x3+5x2+8(3x2+10x)=3x2+10xx3+5x2+8.\frac{dy}{dx} = \frac{1}{x^{3} + 5 x^{2} + 8} \cdot (3 x^{2} + 10 x) = \frac{3 x^{2} + 10 x}{x^{3} + 5 x^{2} + 8}.

The chain-rule pattern from part (c) generalises in one line.

Theorem 26 (Chain rule for lng(x)\ln g(x))

For every differentiable gg with g(x)>0g(x) > 0,

ddx[lng(x)]=g(x)g(x).(7)\frac{d}{dx} \bigl[\ln g(x)\bigr] = \frac{g'(x)}{g(x)}. \tag{7}

In Leibniz form with u=g(x)u = g(x):

ddx(lnu)=1ududx.\frac{d}{dx} (\ln u) = \frac{1}{u} \, \frac{du}{dx}.
Proof

The chain rule with outer function f(u)=lnuf(u) = \ln u and inner function u=g(x)u = g(x) gives

ddxlng(x)=f(g(x))g(x)=1g(x)g(x),\frac{d}{dx} \ln g(x) = f'(g(x)) \cdot g'(x) = \frac{1}{g(x)} \cdot g'(x),

since f(u)=1/uf'(u) = 1/u by (6)(6).

The numerator-over-denominator shape of (7)(7), the derivative of the inside divided by the inside, is the pattern to recognise. Whenever ln\ln wraps a differentiable expression, it is often safest to write g(x)/g(x)g'(x)/g(x) first, then simplify.

Example 147 (Differentiating lng(x)\ln g(x))

Differentiate each.

  1. y=lnx2+1y = \ln \sqrt{x^{2} + 1}.

  2. y=ln ⁣(x1x)y = \ln \!\left(\dfrac{x}{1 - x}\right).

  3. y=ln(e2x+3x)y = \ln \bigl(e^{2 x} + 3 x\bigr).

  4. Two routes. Direct chain rule: g(x)=x2+1=(x2+1)1/2g(x) = \sqrt{x^{2} + 1} = (x^{2} + 1)^{1/2}, so

g(x)=12(x2+1)1/22x=xx2+1,g'(x) = \tfrac{1}{2}(x^{2} + 1)^{-1/2} \cdot 2 x = \frac{x}{\sqrt{x^{2} + 1}},

hence

dydx=g(x)g(x)=x/x2+1x2+1=xx2+1.\frac{dy}{dx} = \frac{g'(x)}{g(x)} = \frac{x / \sqrt{x^{2} + 1}}{\sqrt{x^{2} + 1}} = \frac{x}{x^{2} + 1}.

Faster route: rewrite using LIV before differentiating, y=12ln(x2+1)y = \tfrac{1}{2} \ln(x^{2} + 1), then

dydx=122xx2+1=xx2+1.\frac{dy}{dx} = \tfrac{1}{2} \cdot \frac{2 x}{x^{2} + 1} = \frac{x}{x^{2} + 1}.

The rewrite is shorter because LIV pulled the square root outside as a constant multiple, and the chain rule then ran over the simpler inside.

  1. Rewrite using LIII: y=lnxln(1x)y = \ln x - \ln(1 - x) (valid where both arguments are positive, i.e. 0<x<10 < x < 1). Then
dydx=1x11x=1x+11x=1x(1x).\frac{dy}{dx} = \frac{1}{x} - \frac{-1}{1 - x} = \frac{1}{x} + \frac{1}{1 - x} = \frac{1}{x(1 - x)}.
  1. No simplification by LI-LIV is available because the inside is a sum, not a product. Apply (7)(7) directly with g(x)=e2x+3xg(x) = e^{2 x} + 3 x, g(x)=2e2x+3g'(x) = 2 \, e^{2 x} + 3:
dydx=2e2x+3e2x+3x.\frac{dy}{dx} = \frac{2 \, e^{2 x} + 3}{e^{2 x} + 3 x}.
Remark

LI, LIII, and LIV exchange a single ln\ln of a complicated argument for a sum or difference of ln\lns of simpler arguments, and the derivative is then the sum or difference of simpler 1/u1/u terms. Always inspect a ln\ln for products, quotients, and powers in its argument before differentiating; every product, quotient, or power that LI-LIV can split usually saves one chain-rule step.

Problem 160

Differentiate. Use LI-LIV to simplify the argument before differentiating wherever possible, working on the indicated interval.

  1. y=ln ⁣(x2(x+1)3)y = \ln \!\left(x^{2} (x + 1)^{3}\right) on x>0x > 0.
  2. y=ln1+x1x3y = \ln \sqrt[3]{\dfrac{1 + x}{1 - x}} on 1<x<1-1 < x < 1.
  3. y=ln(lnx)y = \ln(\ln x) on x>1x > 1. (Two nested chain rules.)
  4. y=ln ⁣(exx2+1)y = \ln \!\left(\dfrac{e^{x}}{x^{2} + 1}\right) for all real xx.

A Relative Maximum of (lnx)/x(\ln x) / x

The function f(x)=(lnx)/xf(x) = (\ln x) / x has a single critical number on (0,)(0, \infty). Locating it shows the chain rule, the quotient rule, and the algebraic properties of ln\ln working together.

Example 148 (Relative extreme of (lnx)/x(\ln x)/x)

Find every relative extreme point of f(x)=(lnx)/xf(x) = (\ln x) / x on (0,)(0, \infty), and classify each.

By the quotient rule with u=lnxu = \ln x and v=xv = x:

f(x)=x(1/x)(lnx)1x2=1lnxx2.f'(x) = \frac{x \cdot (1/x) - (\ln x) \cdot 1}{x^{2}} = \frac{1 - \ln x}{x^{2}}.

Set f(x)=0f'(x) = 0: the denominator never vanishes on (0,)(0, \infty), so the critical numbers solve 1lnx=01 - \ln x = 0, that is, lnx=1\ln x = 1. Exponentiating both sides and using (2)(2),

x=e1=e.x = e^{1} = e.

Apply the second derivative test. By the quotient rule again,

f(x)=x2(1/x)(1lnx)2xx4=x2x(1lnx)x4=2lnx3x3.f''(x) = \frac{x^{2} \cdot (-1/x) - (1 - \ln x) \cdot 2 x}{x^{4}} = \frac{-x - 2 x (1 - \ln x)}{x^{4}} = \frac{2 \ln x - 3}{x^{3}}.

At x=ex = e:

f(e)=23e3=1e3<0.f''(e) = \frac{2 - 3}{e^{3}} = -\frac{1}{e^{3}} < 0.

So ff is concave down at x=ex = e, and the critical point is a relative maximum. The value there is

f(e)=lnee=1e.f(e) = \frac{\ln e}{e} = \frac{1}{e}.
The graph of f(x) = (ln x)/x for x in (0, 9). The curve falls steeply from negative infinity as x approaches 0 from the right, crosses the x-axis at x = 1, climbs to a maximum at the marked point (e, 1/e), then decreases and approaches the x-axis from above as x grows large.

The relative maximum at (e,1/e)(e, 1/e) is also the absolute maximum on (0,)(0, \infty): the curve crosses zero at x=1x = 1 and decays back toward zero as xx \to \infty (a fact that follows from the asymptotic flattening of lnx\ln x, made rigorous in a later analysis course). The simple constant 1/e1/e that appears repeatedly in exponential-decay applications is exactly this peak height.

Problem 161

Find and classify every relative extreme point of f(x)=x2lnxf(x) = x^{2} \ln x on (0,)(0, \infty). Use the sign of f(x)f'(x) on the intervals separated by the critical number to show that this point is also an absolute minimum.

Problem 162

A pharmacology team models the bloodstream concentration of a single dose of a drug by

C(t)=ln(1+4t)12tmg/L,t0,C(t) = \ln(1 + 4 t) - \tfrac{1}{2} t \quad \text{mg/L}, \qquad t \geq 0,

where tt is measured in hours. Find the time at which the concentration peaks, the peak concentration, and the rate at which the concentration is changing at t=0t = 0. State the unit of each rate.

The Derivative of lnx\ln |x|

The function lnx\ln x is defined only for x>0x > 0. The function lnx\ln |x| is defined for every nonzero xx, and its graph is the union of y=lnxy = \ln x on x>0x > 0 with its reflection across the yy-axis.

The graph of y = ln |x|, defined for every nonzero x. The right branch, for x > 0, is the standard logarithm curve passing through (1, 0) and rising. The left branch, for x < 0, is the mirror image across the y-axis, passing through (-1, 0) and rising as x decreases. Both branches descend to negative infinity as x approaches zero from either side.

A two-case computation, using the chain rule on the negative side, collapses to a single formula.

Theorem 27 (Derivative of lnx\ln|x|)

For every x0x \neq 0,

ddxlnx=1x.(8)\frac{d}{dx} \ln |x| = \frac{1}{x}. \tag{8}
Proof

Case x>0x > 0. x=x|x| = x, so lnx=lnx\ln|x| = \ln x, and (6)(6) gives ddxlnx=1/x\dfrac{d}{dx} \ln x = 1/x.

Case x<0x < 0. x=x|x| = -x, so lnx=ln(x)\ln|x| = \ln(-x). Apply (7)(7) with g(x)=xg(x) = -x, g(x)=1g'(x) = -1:

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

Both cases give 1/x1/x, identical formulas on either side of zero.

Equation (8)(8) matters because the same derivative formula now works on both sides of zero, provided the logarithm is written as lnx\ln|x|. The point for this lesson is the derivative identity; the integration use of this formula belongs to MA0B.

Problem 163

Differentiate each function. Each requires identifying the appropriate branch and applying (8)(8) or (7)(7) as needed.

  1. y=lnx24y = \ln |x^{2} - 4|, on each interval where the argument is nonzero.
  2. y=xlnxy = x \ln |x| for x0x \neq 0. Show that yy has a single critical number on each of (,0)(-\infty, 0) and (0,)(0, \infty), and locate them.
  3. y=ln12xy = \ln |1 - 2 x| for x1/2x \neq 1/2.

Logarithmic Differentiation

A product of three or more factors fed through the product rule produces a long expression, each term containing a derivative of one factor multiplied by every other factor. The four properties LI-LIV convert that product into a sum before differentiation, and the derivative becomes a sum of 1/u1/u-type terms.

Example 149 (Splitting before differentiating)

Differentiate f(x)=ln[x(x+1)(x+2)]f(x) = \ln \bigl[x (x + 1) (x + 2)\bigr] on x>0x > 0.

By LI applied twice,

f(x)=lnx+ln(x+1)+ln(x+2).f(x) = \ln x + \ln(x + 1) + \ln(x + 2).

Differentiating term by term:

f(x)=1x+1x+1+1x+2.f'(x) = \frac{1}{x} + \frac{1}{x + 1} + \frac{1}{x + 2}.

Three one-term derivatives replace one product-rule cascade.

The same method also differentiates the underlying product itself, by applying (7)(7) in reverse: if g(x)=x(x+1)(x+2)g(x) = x(x+1)(x+2), then ddxlng(x)=g(x)/g(x)\dfrac{d}{dx} \ln g(x) = g'(x)/g(x), and the example above computed exactly the left-hand side. So

g(x)g(x)=1x+1x+1+1x+2,\frac{g'(x)}{g(x)} = \frac{1}{x} + \frac{1}{x + 1} + \frac{1}{x + 2},

and multiplying both sides by g(x)g(x) yields

g(x)=x(x+1)(x+2) ⁣[1x+1x+1+1x+2].g'(x) = x(x+1)(x+2) \cdot \!\left[\frac{1}{x} + \frac{1}{x + 1} + \frac{1}{x + 2}\right].

This is the derivative of a three-factor product written without ever invoking the product rule directly. The method is to take ln\ln, differentiate, then multiply through; this is logarithmic differentiation.

Note (Procedure: logarithmic differentiation)

To differentiate g(x)g(x) when gg is a product, quotient, or power of factors:

  1. Take ln\ln of both sides of y=g(x)y = g(x), valid wherever g(x)>0g(x) > 0.
  2. Use LI-LIV to split the right side into a sum/difference of simpler logarithms.
  3. Differentiate both sides; the left side becomes y/yy'/y by (7)(7).
  4. Multiply through by y=g(x)y = g(x) to solve for yy'.

For gg that takes negative values, take lng(x)\ln |g(x)| instead and use (8)(8) in place of (6)(6). The final formula for gg' is the same.

Example 150 (A three-factor derivative)

Differentiate g(x)=(x2+1)(x33)(2x+5)g(x) = (x^{2} + 1)(x^{3} - 3)(2 x + 5) by logarithmic differentiation.

Step 1. Work on the interval x>33x > \sqrt[3]{3}, where all three displayed factors are positive, and take ln\ln of both sides:

lng(x)=ln(x2+1)+ln(x33)+ln(2x+5).\ln g(x) = \ln(x^{2} + 1) + \ln(x^{3} - 3) + \ln(2 x + 5).

Step 2. Differentiate by (7)(7):

g(x)g(x)=2xx2+1+3x2x33+22x+5.\frac{g'(x)}{g(x)} = \frac{2 x}{x^{2} + 1} + \frac{3 x^{2}}{x^{3} - 3} + \frac{2}{2 x + 5}.

Step 3. Multiply by g(x)g(x):

g(x)=(x2+1)(x33)(2x+5) ⁣[2xx2+1+3x2x33+22x+5].g'(x) = (x^{2} + 1)(x^{3} - 3)(2 x + 5) \cdot \!\left[\frac{2 x}{x^{2} + 1} + \frac{3 x^{2}}{x^{3} - 3} + \frac{2}{2 x + 5}\right].

The same derivative computed by direct triple application of the product rule would have produced three terms, each a product of three factors and a derivative; the logarithmic form keeps the answer in a single readable structure.

Example 151 (A quotient with roots and powers)

Differentiate y=x4x2+1(2x+7)5y = \dfrac{x^{4} \, \sqrt{x^{2} + 1}}{(2 x + 7)^{5}} by logarithmic differentiation, on the interval x>0x > 0.

By LIII, LI, and LIV in sequence,

lny=4lnx+12ln(x2+1)5ln(2x+7).\ln y = 4 \ln x + \tfrac{1}{2} \ln(x^{2} + 1) - 5 \ln(2 x + 7).

Each factor contributes a ln\ln, with the exponent pulled out front by LIV; the denominator picks up a minus sign by LIII.

Differentiate by (7)(7):

yy=4x+122xx2+1522x+7=4x+xx2+1102x+7.\frac{y'}{y} = \frac{4}{x} + \frac{1}{2} \cdot \frac{2 x}{x^{2} + 1} - 5 \cdot \frac{2}{2 x + 7} = \frac{4}{x} + \frac{x}{x^{2} + 1} - \frac{10}{2 x + 7}.

Multiply by yy:

y=x4x2+1(2x+7)5 ⁣[4x+xx2+1102x+7].y' = \frac{x^{4} \, \sqrt{x^{2} + 1}}{(2 x + 7)^{5}} \cdot \!\left[\frac{4}{x} + \frac{x}{x^{2} + 1} - \frac{10}{2 x + 7}\right].

The logarithmic form keeps each factor’s contribution visible. A direct quotient-rule computation is longer because it also needs a chain rule on the square root and a separate chain rule on (2x+7)5(2 x + 7)^{5}.

Problem 164

Differentiate each function by logarithmic differentiation. Show every step.

  1. y=(x+1)(x2)(x+5)y = (x + 1)(x - 2)(x + 5) on x>2x > 2.
  2. y=(x2+4)3(x1)2(x+3)y = \dfrac{(x^{2} + 4)^{3}}{(x - 1)^{2} (x + 3)} on x>1x > 1.
  3. y=x1+x21x3y = x \cdot \sqrt{1 + x^{2}} \cdot \sqrt[3]{1 - x} on 0<x<10 < x < 1.

The Power Rule for Every Real Exponent

The general power rule from Recitation 2 differentiated xrx^{r} for rational rr. Logarithmic differentiation extends the formula to every real rr in one move.

Theorem 28 (Power rule, all real exponents)

For every real number rr and every x>0x > 0,

ddx(xr)=rxr1.(9)\frac{d}{dx} (x^{r}) = r \, x^{r - 1}. \tag{9}
Proof

Let f(x)=xrf(x) = x^{r} for x>0x > 0. By LIV,

lnf(x)=ln(xr)=rlnx.\ln f(x) = \ln(x^{r}) = r \ln x.

Differentiate both sides on x>0x > 0. On the left, by (7)(7), ddxlnf(x)=f(x)/f(x)\dfrac{d}{dx} \ln f(x) = f'(x)/f(x). On the right, rr is a constant and ddx(rlnx)=r/x\dfrac{d}{dx}(r \ln x) = r/x. So

f(x)f(x)=rx.\frac{f'(x)}{f(x)} = \frac{r}{x}.

Multiplying both sides by f(x)=xrf(x) = x^{r},

f(x)=rf(x)x=rxrx=rxr1.f'(x) = r \cdot \frac{f(x)}{x} = r \cdot \frac{x^{r}}{x} = r \, x^{r - 1}.

For rational exponents, this agrees with the computational power rule already used earlier in MA0A. The verification above has no rationality hypothesis: it works whenever LIV applies, which is for every real rr. So ddx(x2)=2x21\dfrac{d}{dx}(x^{\sqrt{2}}) = \sqrt{2} \, x^{\sqrt{2} - 1} and ddx(xπ)=πxπ1\dfrac{d}{dx}(x^{\pi}) = \pi \, x^{\pi - 1} now sit on the same line as the polynomial cases.

Example 152 (A function with an irrational exponent)

Differentiate y=xπy = x^{\pi} at x=2x = 2, and write the equation of the tangent line there.

By (9)(9) with r=πr = \pi,

dydx=πxπ1.\frac{dy}{dx} = \pi \, x^{\pi - 1}.

At x=2x = 2, the slope is π2π1\pi \cdot 2^{\pi - 1}, and the point of tangency is (2,2π)(2, 2^{\pi}). Point-slope form gives

y2π=π2π1(x2).y - 2^{\pi} = \pi \cdot 2^{\pi - 1} \, (x - 2).

Simplifying the slope: π2π1=12π2π0.53.148.8213.86\pi \cdot 2^{\pi - 1} = \tfrac{1}{2} \pi \cdot 2^{\pi} \approx 0{.}5 \cdot 3{.}14 \cdot 8{.}82 \approx 13{.}86, so the tangent line at x=2x = 2 rises about 13.8613{.}86 units per unit gain in xx.

The same method, taking ln\ln, differentiating, and multiplying back, also handles expressions in which the variable appears in both the base and the exponent.

Example 153 (y=xxy = x^{x})

Differentiate y=xxy = x^{x} on x>0x > 0.

The expression is neither a fixed-base exponential (bxb^{x}) nor a fixed-exponent power (xrx^{r}); (5)(5) and (9)(9) both fail. Take ln\ln:

lny=xlnx.\ln y = x \ln x.

Differentiate by the product rule on the right and by (7)(7) on the left:

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

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

ddx(xx)=xx(lnx+1).\frac{d}{dx} (x^{x}) = x^{x} (\ln x + 1).

The derivative is zero where lnx+1=0\ln x + 1 = 0, that is, x=e1=1/ex = e^{-1} = 1/e. Computing f(1/e)=(1/e)1/ef(1/e) = (1/e)^{1/e} and applying the first derivative test confirms a relative minimum at x=1/ex = 1/e.

Problem 165

Differentiate each function on the indicated domain.

  1. y=x3y = x^{\sqrt{3}}, x>0x > 0.
  2. y=(3x+1)xy = (3 x + 1)^{x}, x>1/3x > -1/3.
  3. y=(lnx)xy = (\ln x)^{x}, x>1x > 1.
  4. y=x1/xy = x^{1/x}, x>0x > 0. Find the unique critical number.
Problem 166

Let f(x)=xrf(x) = x^{r} on (0,)(0, \infty), where rr is a fixed real exponent. Show, using (9)(9) and the second derivative test, that ff is concave up if and only if r<0r < 0 or r>1r > 1, and concave down if 0<r<10 < r < 1. State the cases r=0r = 0 and r=1r = 1 separately.

A Worked Application

The closing application revisits the radioactive-decay setup from Recitation 4 with the new tools in place.

Example 154 (Half-life of carbon-1414)

A pile of carbon-1414 has half-life TT years. Its mass at time tt is M(t)=M0ektM(t) = M_{0} \, e^{-k t} for some constant k>0k > 0. Express TT as a closed form in terms of kk, and the rate of decay at time tt as a closed form in terms of M(t)M(t) and kk.

The half-life is the unique T>0T > 0 with M(T)=M0/2M(T) = M_{0} / 2. Substituting and dividing by M0M_{0},

ekT=12.e^{-k T} = \tfrac{1}{2}.

Take ln\ln of both sides and apply (3)(3) on the left and LII on the right:

kT=ln12=ln2.-k T = \ln \tfrac{1}{2} = -\ln 2.

Dividing by k-k,

T=ln2k.T = \frac{\ln 2}{k}.

The half-life is therefore T=(ln2)/kT = (\ln 2) / k, a closed form replacing the previously unnamed half-life from Lesson 5AM.

The rate of decay is M(t)=kektM0=kM(t)M'(t) = -k \, e^{-k t} \cdot M_{0} = -k \, M(t) by the chain rule (or by Lesson 5AM’s ddx(Cekx)=Ckekx\dfrac{d}{dx}(C \, e^{k x}) = C k \, e^{k x}). At every tt,

M(t)=kM(t)=ln2TM(t).\bigl|M'(t)\bigr| = k \, M(t) = \frac{\ln 2}{T} \cdot M(t).

So the fractional rate of decay M(t)/M(t)|M'(t)| / M(t) is exactly (ln2)/T(\ln 2) / T, a constant independent of tt. Twice the half-life corresponds to half the fractional rate; the expression (ln2)/T(\ln 2) / T is the standard quantity for comparing decay rates of different isotopes.

Problem 167

A culture of E. coli doubles every 2020 minutes. Model the population as N(t)=N0ektN(t) = N_{0} \, e^{k t} with tt in minutes. Find kk in closed form (in terms of ln2\ln 2), and compute the time at which the population first reaches 10N010 \, N_{0}, in closed form.

Problem 168

A British investor is offered two accounts:

  • Account A: 5%5\% continuous interest, modelled by A(t)=Pe0.05tA(t) = P \, e^{0{.}05 \, t}.
  • Account B: a 2%2\% setup fee followed by 5.5%5{.}5\% annual interest compounded once per year, modelled by B(t)=0.98P(1.055)tB(t) = 0{.}98 P \, (1{.}055)^{t}.

Determine the time at which the two balances are equal, in closed form involving natural logarithms. Determine which account grows faster at that time, in absolute terms (£ per year). Compare the fractional rates of growth of the two accounts and state which is larger.

Problem 169

A vat of liquid is stirred so that its temperature T(t)T(t) in C^{\circ}\mathrm{C} above ambient satisfies T(t)=kT(t)T'(t) = -k \, T(t) for a constant k>0k > 0, with T(0)=T0T(0) = T_{0}. Show, using (5)(5) or the chain rule, that any time interval over which the temperature halves has the same length, and that this length is (ln2)/k(\ln 2)/k. The vat’s temperature at t=5t = 5 minutes is 40C40^{\circ}\mathrm{C} above ambient and at t=25t = 25 minutes is 5C5^{\circ}\mathrm{C} above ambient. Find kk and T0T_{0} in closed form.

Problem 170

Let f(x)=xex2f(x) = x \, e^{-x^{2}} on the real line. Find every relative extreme point of ff and classify each. Determine the maximum value of f|f|, and the xx-values at which it is attained. State, with reasons drawn from this lesson and Lesson 5AM, whether ff has any inflection points, and locate them in closed form.

Note (Toolkit additions from this lesson)
RuleForm
Inverse identitieselnx=xe^{\ln x} = x (x>0x > 0), ln(ex)=x\ln(e^{x}) = x
Algebra of ln\lnln(xy)=lnx+lny\ln(xy) = \ln x + \ln y, ln(xb)=blnx\ln(x^{b}) = b \ln x
Derivative of lnx\ln xddxlnx=1/x\frac{d}{dx} \ln x = 1/x (x>0x > 0)
Chain rule for lng(x)\ln g(x)ddxlng(x)=g(x)/g(x)\frac{d}{dx} \ln g(x) = g'(x)/g(x) (g(x)>0g(x) > 0)
Derivative of lnx\ln |x|ddxlnx=1/x\frac{d}{dx} \ln |x| = 1/x (x0x \neq 0)
Derivative of bxb^{x}ddx(bx)=(lnb)bx\frac{d}{dx} (b^{x}) = (\ln b) \, b^{x}
Power rule (any real rr)ddx(xr)=rxr1\frac{d}{dx} (x^{r}) = r \, x^{r - 1} (x>0x > 0)