Chapter IX · The logarithmic, exponential and circular functions of a real variable

Common logarithms, and working with exe^x

§217 35 min

Logarithms to any base are constant multiples of log⁡x\log x; plus a tour of Hardy's examples on the exponential function, the hyperbolic functions and their inverses.

Why this matters

Hardy’s logarithm is the natural logarithm, to base ee. For three centuries before electronic calculators, numerical work used logarithms to base 1010, and today computer science uses base 22. §217 shows that nothing essential depends on the base: all logarithms are constant multiples of one another. The section is short, but it is followed by one of the longest sets of examples in the book: derivatives and integrals involving exe^x, equations such as eax=bxe^{ax} = bx, and the hyperbolic functions cosh⁡\cosh, sinh⁡\sinh, tanh⁡\tanh. This lesson works through a representative selection.

The idea

A logarithm turns multiplication into addition: log⁡ab=log⁡a+log⁡b\log ab = \log a + \log b. Mark the numbers 1,2,3,…1, 2, 3, \dots on a line at distances proportional to their logarithms, and multiplying two numbers becomes laying two lengths end to end. That is a slide rule. Which base you use only decides the unit of length; the marks themselves sit in the same places.

Explore Multiply by adding lengths

Try this. Set a=2a = 2 and b=3.5b = 3.5, and read the product on the D scale under the 3.53.5 of the sliding C scale. Then switch the ruler at the bottom between base 1010 and base ee.

12345678910C123456789102030405060708090100D00.511.52
ruler shows logarithms to base
The blue length is log⁡102=0.301\log_{10} 2 = 0.301, the ochre length is log⁡103.5=0.5441\log_{10} 3.5 = 0.5441; together they reach log⁡107=0.8451\log_{10} 7 = 0.8451, so the rule reads 2×3.5=72 \times 3.5 = 7. Changing the base relabels the bottom ruler by the factor log⁡10=2.30259\log 10 = 2.30259; the scales themselves do not move.
What to notice

The blue length (to aa) plus the ochre length (from aa to abab) reaches ab=7ab = 7: lengths add because logarithms add. Switching the base changes only the numbers on the bottom ruler, stretching them by the factor log⁡10=2.3026\log 10 = 2.3026; every mark stays where it is. So log⁡10x\log_{10} x and log⁡x\log x are the same function up to a constant factor.

Precise statements

Definition Logarithm to base aa Hardy: §217

Let a>0a > 0, a≠1a \ne 1. For x>0x > 0, log⁡ax\log_a x is the number yy such that ay=xa^{y} = x. Hardy’s log⁡x\log x is log⁡ex\log_e x. Logarithms to base 1010 are called common logarithms.

Theorem Change of base Hardy: §217

For a>0a > 0, a≠1a \ne 1 and x>0x > 0,

log⁡ax=log⁡xlog⁡a.\log_a x = \frac{\log x}{\log a}.

In particular log⁡10x=μlog⁡x\log_{10} x = \mu\log x, where μ=1/log⁡10=0.434294…\mu = 1/\log 10 = 0.434294\ldots, and log⁡x=2.302585…×log⁡10x\log x = 2.302585\ldots \times \log_{10} x.

Proof Change of base
Strategy

Take natural logarithms of ay=xa^y = x.

Existence and uniqueness of yy

ay=eylog⁡aa^y = e^{y\log a}, and log⁡a≠0\log a \ne 0, so aya^y is a strictly monotone continuous function of yy taking every positive value exactly once. Hence log⁡ax\log_a x is well defined.

Compute it

If ay=xa^y = x then log⁡x=log⁡ay=ylog⁡a\log x = \log a^y = y\log a, so y=log⁡x/log⁡ay = \log x/\log a.

The constants for base 1010

log⁡10=2.302585…\log 10 = 2.302585\ldots and its reciprocal is 0.434294…0.434294\ldots. So common logarithms are natural logarithms multiplied by 0.43430.4343.

The theorem fits the uniqueness result of the second lesson: log⁡a\log_a satisfies f(xy)=f(x)+f(y)f(xy) = f(x) + f(y), so it must be Clog⁡xC\log x, and C=1/log⁡aC = 1/\log a because log⁡aa=1\log_a a = 1.

Working with the exponential: Hardy’s examples

The examples after §217 use everything built so far. We take a selection. The first is an equation whose number of roots changes as a parameter crosses a critical value.

Explore When does eax=bxe^{ax} = bx have a solution?

Try this. Keep a=1a = 1 and lower bb from 44 towards 22. Watch the two roots move together. Then change aa and find the new critical bb.

xy
  • y=eaxy = e^{ax}
  • y=bxy = bx
  • y=aexy = aex
  • roots
ae=2.718ae = 2.718 and b=4b = 4: b > ae, so the line cuts the curve twice, at x=0.3574x = 0.3574 and x=2.153x = 2.153.
What to notice

The two roots merge when the line becomes the dashed tangent y=aexy = aex, at b=aeb = ae (for a=1a = 1, b=e≈2.718b = e \approx 2.718), touching the curve at (1/a,e)(1/a, e). For smaller bb the line passes underneath and there is no root. The critical case is where the line through the origin is tangent to the curve.

Exercise ●●○ Hardy: Examples LXXXVIII, 17

Show that, for a>0a > 0 and b>0b > 0, the equation eax=bxe^{ax} = bx has two real roots, one, or none, according as b>aeb > ae, b=aeb = ae or b<aeb < ae.

Hint
Roots can only be positive (for x≤0x \le 0 the left side is positive and the right side is not). Study h(x)=eax−bxh(x) = e^{ax} - bx on (0,∞)(0, \infty).
Hint
h′(x)=aeax−bh'(x) = ae^{ax} - b vanishes once, at x0=1alog⁡bax_0 = \frac1a\log\frac ba (when b>ab > a). Compute h(x0)h(x_0).

Solution

For x≤0x \le 0, eax>0≥bxe^{ax} > 0 \ge bx, so every root is positive. Let h(x)=eax−bxh(x) = e^{ax} - bx; then h(0)=1>0h(0) = 1 > 0 and h(x)→∞h(x) \to \infty as x→∞x \to \infty (the exponential beats the linear term).

h′(x)=aeax−bh'(x) = ae^{ax} - b is strictly increasing. If b≤ab \le a, then h′>0h' > 0 on (0,∞)(0, \infty), hh increases from 11, and there is no root; note b≤a<aeb \le a < ae, consistent with the claim. If b>ab > a, hh decreases on (0,x0)(0, x_0) and increases on (x0,∞)(x_0, \infty), where eax0=b/ae^{ax_0} = b/a. Its least value is

h(x0)=ba−bx0=ba(1−log⁡ba),h(x_0) = \frac ba - bx_0 = \frac ba\left(1 - \log\frac ba\right),

which is negative, zero or positive as b/a>eb/a > e, =e= e or <e< e. By the intermediate value theorem and monotonicity on each side of x0x_0, there are two roots, one (double) root at x0=1/ax_0 = 1/a, or none, in the three cases. Geometrically, y=aexy = aex is the tangent from the origin, touching at (1/a,e)(1/a, e).

Exercise ●●○ Hardy: Examples LXXXVIII, 18

Show that ex=1+xe^x = 1 + x has no real root except x=0x = 0, and that ex=1+x+12x2e^x = 1 + x + \tfrac12x^2 has no real root except x=0x = 0, which is a triple root. (Hardy says it has “three real roots”; that is true only if the root x=0x = 0 is counted three times, with its multiplicity.)

Hint
For the first, ex−1−xe^x - 1 - x has derivative ex−1e^x - 1. For the second, look at g(x)=ex−1−x−12x2g(x) = e^x - 1 - x - \frac12x^2 and its first three derivatives at 00.

Solution

First. f(x)=ex−1−xf(x) = e^x - 1 - x has f′(x)=ex−1f'(x) = e^x - 1, negative for x<0x < 0 and positive for x>0x > 0. So ff has its least value f(0)=0f(0) = 0 and is positive elsewhere.

Second. g(x)=ex−1−x−12x2g(x) = e^x - 1 - x - \frac12x^2 has g′(x)=f(x)≥0g'(x) = f(x) \ge 0, with equality only at 00. So gg is strictly increasing, and g(0)=0g(0) = 0 is its only zero: g<0g < 0 for x<0x < 0, g>0g > 0 for x>0x > 0. Since g(0)=g′(0)=g′′(0)=0g(0) = g'(0) = g''(0) = 0 and g′′′(0)=1≠0g'''(0) = 1 \ne 0, the zero has multiplicity three: near 00, g(x)≈x3/6g(x) \approx x^3/6. Counting multiplicity, as one does for polynomial equations, that is “three real roots”, all at 00.

Exercise ●●○ Hardy: Examples LXXXVIII, 5

Prove that

∫eaxcos⁡bx dx=acos⁡bx+bsin⁡bxa2+b2 eax,∫eaxsin⁡bx dx=asin⁡bx−bcos⁡bxa2+b2 eax.\int e^{ax}\cos bx\,dx = \frac{a\cos bx + b\sin bx}{a^2 + b^2}\,e^{ax}, \qquad \int e^{ax}\sin bx\,dx = \frac{a\sin bx - b\cos bx}{a^2 + b^2}\,e^{ax}.
Hint
Call the integrals II and JJ, integrate each by parts once (differentiating the trigonometric factor), and solve the two linear equations.
Solution

Integrating by parts with eaxe^{ax} as the factor to integrate:

I=eaxcos⁡bxa+baJ,J=eaxsin⁡bxa−baI(a≠0).I = \frac{e^{ax}\cos bx}{a} + \frac ba J, \qquad J = \frac{e^{ax}\sin bx}{a} - \frac ba I \qquad (a \ne 0).

Multiply by aa: aI−bJ=eaxcos⁡bxaI - bJ = e^{ax}\cos bx and bI+aJ=eaxsin⁡bxbI + aJ = e^{ax}\sin bx. Solving, (a2+b2)I=eax(acos⁡bx+bsin⁡bx)(a^2 + b^2)I = e^{ax}(a\cos bx + b\sin bx) and (a2+b2)J=eax(asin⁡bx−bcos⁡bx)(a^2 + b^2)J = e^{ax}(a\sin bx - b\cos bx). Differentiating the answers confirms them, also when a=0a = 0. (In Chapter X both formulae become one: the real and imaginary parts of ∫e(a+ib)xdx=e(a+ib)x/(a+ib)\int e^{(a + ib)x}dx = e^{(a+ib)x}/(a + ib).)

Explore A damped oscillation

Try this. Look at e−axsin⁡bxe^{-ax}\sin bx and its successive maxima. Change aa and watch how quickly they shrink.

y=e−axsin⁡bxy = e^{-ax}\sin bxHardy: Examples LXXXVIII, 4
xy
  • e^(−ax) sin bx
  • trace point (drag)
At x=7x = 7: y=0.10245y = 0.10245
What to notice

The maxima shrink by the same factor from one to the next: they form a geometric progression with ratio e−2πa/be^{-2\pi a/b}, because consecutive maxima are a period 2π/b2\pi/b apart. The next exercise proves it and finds the curve on which they lie.

Exercise ●●○ Hardy: Examples LXXXVIII, 4

For a,b>0a, b > 0, show that y=e−axsin⁡bxy = e^{-ax}\sin bx has infinitely many maxima, that their values form a geometric progression, and that they lie on the curve y=ba2+b2 e−axy = \dfrac{b}{\sqrt{a^2 + b^2}}\,e^{-ax}.

Hint
y′=e−ax(bcos⁡bx−asin⁡bx)y' = e^{-ax}(b\cos bx - a\sin bx) vanishes where tan⁡bx=b/a\tan bx = b/a.

Solution

y′=e−ax(bcos⁡bx−asin⁡bx)=0y' = e^{-ax}(b\cos bx - a\sin bx) = 0 exactly when tan⁡bx=b/a\tan bx = b/a. Let θ∈(0,π2)\theta \in (0, \tfrac\pi2) with tan⁡θ=b/a\tan\theta = b/a, so sin⁡θ=b/a2+b2\sin\theta = b/\sqrt{a^2+b^2}. The stationary points are bx=θ+kπbx = \theta + k\pi. Where kk is even, sin⁡bx=sin⁡θ>0\sin bx = \sin\theta > 0 and y′y' changes from positive to negative (maxima); where kk is odd, minima.

At the maximum xk=(θ+2kπ)/bx_k = (\theta + 2k\pi)/b the value is yk=e−axksin⁡θ=ba2+b2e−axky_k = e^{-ax_k}\sin\theta = \dfrac{b}{\sqrt{a^2+b^2}}e^{-ax_k}, so the maxima lie on the stated curve. Consecutive maxima are 2π/b2\pi/b apart, so yk+1/yk=e−2πa/by_{k+1}/y_k = e^{-2\pi a/b}, a constant: a geometric progression.

The hyperbolic functions

Hardy introduces them in Examples LXXXVIII, 20–28:

cosh⁡x=12(ex+e−x),sinh⁡x=12(ex−e−x),tanh⁡x=sinh⁡xcosh⁡x,\cosh x = \tfrac12(e^{x} + e^{-x}), \qquad \sinh x = \tfrac12(e^{x} - e^{-x}), \qquad \tanh x = \frac{\sinh x}{\cosh x},

with sech⁡\operatorname{sech}, cosech⁡\operatorname{cosech}, coth⁡\coth as reciprocals. They satisfy identities that look like the trigonometric ones, with some signs changed, for example cosh⁡2x−sinh⁡2x=1\cosh^2 x - \sinh^2 x = 1 (the point (cosh⁡t,sinh⁡t)(\cosh t, \sinh t) runs along the hyperbola X2−Y2=1X^2 - Y^2 = 1, hence the name). Chapter X explains the likeness: cos⁡ix=cosh⁡x\cos ix = \cosh x.

Exercise ●○○ Hardy: Examples LXXXVIII, 21, 25

Prove that cosh⁡2x−sinh⁡2x=1\cosh^2 x - \sinh^2 x = 1, that cosh⁡(x+y)=cosh⁡xcosh⁡y+sinh⁡xsinh⁡y\cosh(x + y) = \cosh x\cosh y + \sinh x\sinh y, that cosh⁡x≥1\cosh x \ge 1, and that −1<tanh⁡x<1-1 < \tanh x < 1.

Hint
Expand everything in terms of exe^x and e−xe^{-x}.

Solution

cosh⁡2x−sinh⁡2x=14{(ex+e−x)2−(ex−e−x)2}=14⋅4exe−x=1\cosh^2 x - \sinh^2 x = \tfrac14\{(e^x + e^{-x})^2 - (e^x - e^{-x})^2\} = \tfrac14 \cdot 4e^{x}e^{-x} = 1.

cosh⁡xcosh⁡y+sinh⁡xsinh⁡y=14{(ex+e−x)(ey+e−y)+(ex−e−x)(ey−e−y)}=14{2ex+y+2e−x−y}=cosh⁡(x+y)\cosh x\cosh y + \sinh x\sinh y = \tfrac14\{(e^x + e^{-x})(e^y + e^{-y}) + (e^x - e^{-x})(e^y - e^{-y})\} = \tfrac14\{2e^{x+y} + 2e^{-x-y}\} = \cosh(x+y).

cosh⁡x−1=12(ex/2−e−x/2)2≥0\cosh x - 1 = \tfrac12(e^{x/2} - e^{-x/2})^2 \ge 0. And tanh⁡x=ex−e−xex+e−x\tanh x = \dfrac{e^x - e^{-x}}{e^x + e^{-x}} has numerator smaller in absolute value than the (positive) denominator, since ∣ex−e−x∣<ex+e−x|e^x - e^{-x}| < e^x + e^{-x}.

Exercise ●●○ Hardy: Examples LXXXVIII, 27

Show that sinh⁡\sinh is a one-to-one map of the real line onto itself, with inverse arg sinh⁡s=log⁡{s+s2+1}\operatorname{arg\,sinh} s = \log\{s + \sqrt{s^2 + 1}\}; and that tanh⁡\tanh maps the real line one-to-one onto (−1,1)(-1, 1), with inverse arg tanh⁡t=12log⁡1+t1−t\operatorname{arg\,tanh} t = \tfrac12\log\dfrac{1 + t}{1 - t}. Deduce ∫dxx2+a2=arg sinh⁡xa\displaystyle\int\frac{dx}{\sqrt{x^2 + a^2}} = \operatorname{arg\,sinh}\frac xa for a>0a > 0.

Hint
Solve 12(u−1/u)=s\tfrac12(u - 1/u) = s for u=ex>0u = e^x > 0: it is a quadratic in uu.

Solution

sinh⁡\sinh. (sinh⁡x)′=cosh⁡x>0(\sinh x)' = \cosh x > 0, and sinh⁡x→±∞\sinh x \to \pm\infty as x→±∞x \to \pm\infty, so sinh⁡\sinh is a continuous strictly increasing map onto R\mathbb{R}. To invert, put u=exu = e^x: u−1/u=2su - 1/u = 2s, i.e. u2−2su−1=0u^2 - 2su - 1 = 0, so u=s±s2+1u = s \pm\sqrt{s^2 + 1}. Only the plus sign gives u>0u > 0. Hence x=log⁡{s+s2+1}x = \log\{s + \sqrt{s^2+1}\}.

tanh⁡\tanh. (tanh⁡x)′=1/cosh⁡2x>0(\tanh x)' = 1/\cosh^2 x > 0, tanh⁡x→±1\tanh x \to \pm 1 as x→±∞x \to \pm\infty (divide numerator and denominator by e±xe^{\pm x}). With u=e2xu = e^{2x}, tanh⁡x=u−1u+1=t\tanh x = \frac{u - 1}{u + 1} = t gives u=1+t1−tu = \frac{1+t}{1-t}, so x=12log⁡1+t1−tx = \tfrac12\log\frac{1+t}{1-t} for −1<t<1-1 < t < 1.

The integral. ddxlog⁡{x+x2+a2}=1+x/x2+a2x+x2+a2=1x2+a2\dfrac{d}{dx}\log\{x + \sqrt{x^2 + a^2}\} = \dfrac{1 + x/\sqrt{x^2+a^2}}{x + \sqrt{x^2+a^2}} = \dfrac{1}{\sqrt{x^2 + a^2}}. And log⁡{x+x2+a2}=arg sinh⁡(x/a)+log⁡a\log\{x + \sqrt{x^2+a^2}\} = \operatorname{arg\,sinh}(x/a) + \log a, which differs by a constant.

Exercise ●●● Hardy: Examples LXXXVIII, 36

Show that ex=x1 000 000e^{x} = x^{1\,000\,000} has a very large positive root, and estimate it.

Hint
Taking logarithms, x=106log⁡xx = 10^6\log x. Try x≈106×Lx \approx 10^6 \times L with LL a moderate number, and iterate x↦106log⁡xx \mapsto 10^6\log x.

Solution

For x>1x > 1 the equation is equivalent to x=106log⁡xx = 10^6\log x. The function x−106log⁡xx - 10^6\log x is negative at x=107x = 10^7 (107−106×16.1<010^7 - 10^6 \times 16.1 < 0) and positive at x=108x = 10^8 (108−106×18.4>010^8 - 10^6 \times 18.4 > 0), so there is a root between.

Write x=106Lx = 10^6 L. Then L=log⁡x=log⁡106+log⁡L=13.82+log⁡LL = \log x = \log 10^6 + \log L = 13.82 + \log L. Starting from L=13.82L = 13.82: L=13.82+log⁡13.82=13.82+2.63=16.45L = 13.82 + \log 13.82 = 13.82 + 2.63 = 16.45; again: L=13.82+log⁡16.45=13.82+2.80=16.62L = 13.82 + \log 16.45 = 13.82 + 2.80 = 16.62; again: 16.6316.63. So the root is x≈1.663×107x \approx 1.663 \times 10^{7}. Hardy stops after one step, at 16 450 00016\,450\,000, and says the error is less than 200 000200\,000; the true root is 16 626 509…16\,626\,509\ldots, so his estimate is off by about 176 000176\,000. (There are two other real roots, near 11 and near −1-1: on each, ∣x∣106|x|^{10^6} must be close to exe^{x}, which forces ∣x∣|x| to within about 10−610^{-6} of 11.)

Check yourself

Check yourself Enter a number

What is log⁡10e\log_{10} e (to 4 decimal places)?

Why

log⁡10e=log⁡e/log⁡10=1/2.302585=0.434294…\log_{10} e = \log e/\log 10 = 1/2.302585 = 0.434294\ldots. This is the constant μ\mu that converts natural logarithms into common ones.

Check yourself Choose one

If log⁡2x=10\log_2 x = 10, what is log⁡8x\log_8 x?

Why

log⁡8x=log⁡x/log⁡8=log⁡x/(3log⁡2)=13log⁡2x=10/3\log_8 x = \log x/\log 8 = \log x/(3\log 2) = \tfrac13\log_2 x = 10/3. Check: x=210=1024=810/3x = 2^{10} = 1024 = 8^{10/3}. A larger base gives smaller logarithms, by the factor log⁡82=13\log_8 2 = \tfrac13.

Check yourself True or false?

log⁡1x\log_1 x is defined for every x>0x > 0.

Why

False. 1y=11^y = 1 for every yy, so 1y=x1^y = x has no solution when x≠1x \ne 1 and every yy is a solution when x=1x = 1. In the formula log⁡x/log⁡a\log x/\log a, the denominator log⁡1=0\log 1 = 0.

Check yourself Choose one

How many real roots has ex=3xe^{x} = 3x?

Why

Here a=1a = 1, b=3>e=aeb = 3 > e = ae, so the line y=3xy = 3x is steeper than the tangent y=exy = ex from the origin and cuts the curve twice (near x=0.62x = 0.62 and x=1.51x = 1.51). With b=2.5<eb = 2.5 < e there would be none.

Hardy’s language

Summary

Summary
  • log⁡ax=log⁡x/log⁡a\log_a x = \log x/\log a: all logarithms are constant multiples of the natural one; log⁡10x=0.4343log⁡x\log_{10} x = 0.4343\log x and log⁡10=2.3026\log 10 = 2.3026.
  • Logarithms turn multiplication into addition of lengths (the slide rule); the base only sets the unit.
  • eax=bxe^{ax} = bx (a,b>0a, b > 0) has two, one or no roots as b>b >, ==, <ae< ae: the critical line is the tangent from the origin.
  • cosh⁡\cosh, sinh⁡\sinh, tanh⁡\tanh are built from e±xe^{\pm x}; their inverses are logarithms, e.g. arg sinh⁡s=log⁡{s+s2+1}\operatorname{arg\,sinh} s = \log\{s + \sqrt{s^2+1}\}.