CHAPTER 1 The Natural Logarithm

The natural logarithm, denoted y = ln x, is the function defined as follows: ln x is the area under the reciprocal function 1/u from u = 1 to u = x. Using the integral notation, we write:

ln x = ∫_{1}^{x} \frac{du}{u}.

In the drawing to the right the shaded area is ln x. Here we are showing the case x > 1, when the area is positive. If x < 1, on the other hand, then the limits of integration are “backwards” (i.e., the top limit of integration is less than the bottom limit of integration). In other words, if x < 1, then we traverse the area going from right to left rather than from left to right. In that case the area in question is counted with a negative sign. If x = 1, then the area is 0. If x ≤ 0, then we cannot define

1 x y = \frac{1}{u}

ln x, because in that case the reciprocal function 1/u has an asymptote (i.e., it goes to infinity) between u = 1 and u = x. Thus, our first property of ln x is:

(Property 1) ln x \begin{cases}> 0 & if x > 1; \\ = 0 & if x = 1; \\ < 0 & if 0 < x < 1; \\ is undefined & if x ≤ 0. \end{cases}

We say that the domain of ln x is all positive x.

The next group of properties are the main reason for defining ln x.

(Property 2 a)  \frac{d}{dx} ln x = \frac{1}{x};  \frac{d}{dx} ln u = \frac{1}{u} \frac{du}{dx}.

The first of these equalities is a direct result of the “ fundamental theorem of calculus,” which says that the derivative of this type of area function is obtained by removing the integral sign and replacing the dummy variable by the variable in the upper limit of integration: \frac{d}{dx} ∫_{1}^{x} \frac{1}{u}du = \frac{1}{x}. The second equality follows from the chain rule: if y = ln u and u = u(x), then

\frac{dy}{dx} = \frac{dy}{du} · \frac{du}{dx} = \frac{1}{u} \frac{du}{dx}.

(Property 2 b) ∫ \frac{dx}{x} = ln x + C.

This means that ∫_{a}^{b} \frac{dx}{x} = ln b − ln a. Property 2(b) follows from 2(a), which says that ln x is an antiderivative of 1/x. We shall later see that if we want to allow the possibility of negative limits of integration, we must replace x by |x| inside the ln, i.e., we modify the antiderivative formula as follows:

∫ \frac{dx}{x} = ln |x| + C.

This antiderivative formula fills in a gap in the antiderivative formula we had before for x^{n}, namely, the case n = −1. For all n ≠ −1, the antiderivative of x^{n} is another power function; but the antiderivative of x^{−1} is a different type of function, namely, our “natural logarithm.” To summarize, we write:

∫ x^{n} dx = \begin{cases}\frac{1}{n+1}x^{n+1} + C & if n ≠ −1; \\ ln |x| + C & if n = −1. \end{cases}

Before discussing further properties of ln x, we give some examples of the use of Properties 2(a) and 2(b).

Example 1.1. Find the derivative of x ln^{2}(sin x).

By the product rule,

\frac{d}{dx}(x ln^{2}(sin x)) = x \frac{d}{dx}(ln^{2}(sin x)) + 1 · ln^{2}(sin x)
= x · 2 ln(sin x)\frac{d}{dx}(ln(sin x)) + ln^{2}(sin x)

= 2x ln(sin x)\frac{1}{sin x} cos x + ln^{2}(sin x) = 2x cot x ln(sin x) + ln^{2}(sin x).

Example 1.2. Find the definite integrals

(a) ∫_{0}^{2} \frac{dx}{3x + 1};  (b) ∫_{−2}^{−1} \frac{dx}{x};  (c) ∫_{0}^{π/4} tan x dx;  (d) ∫_{2}^{4} \frac{2x}{x^{2} − 2}dx.

In several of these integrals it is useful to rewrite Property 2(a) with x replaced by u, and then make a u-substitution to transform the integral with respect to x to an integral with respect to u having the form in Property 2(a), i.e., ∫ \frac{1}{u}du.

(a) We make the substitution u = 3x + 1, so that du = 3dx, and hence dx = \frac{1}{3}du. The limits of integration in (a) change as follows: x = 0 ⟹ u = 3 · 0 + 1 = 1; and x = 2 ⟹ u = 3 · 2 + 1 = 7. Thus, we obtain

∫_{0}^{2} \frac{dx}{3x + 1} = \frac{1}{3} ∫_{1}^{7} \frac{du}{u} = \frac{1}{3} ln 7.

(b) Since our limits of integration are negative, we use the version of the antiderivative formula with the absolute value inside the ln. We obtain:

ln |x| |_{−2}^{−1}= ln | − 1| − ln | − 2| = ln 1 − ln 2 = − ln 2.

We can verify directly that this is the right answer: the area in question is an integral of the negative branch of the reciprocal function (which is in the third quadrant). But the area there from −2 to −1 is exactly the same as the area under the positive branch of the reciprocal function from 1 to 2, except that it is counted negatively because of being below the axis. Thus, the answer − ln 2 agrees with the picture in the graph at the right.

−2  ^{−1}  ^{2}^{1}y = 1/x

(c) At first glance, this has nothing to do with ln. However, if we rewrite tan x as sin x/ cos x, and notice that the derivative of u = cos x is du = − sin xdx, we can transform this integral into ∫ du/u. More precisely, we obtain

∫_{0}^{π/4} \frac{sin x dx}{cos x} = ∫_{cos 0}^{cos(π/4)} \frac{−du}{u} = − ∫_{1}^{\sqrt{2}/2} \frac{du}{u} = − ln(\sqrt{2}/2).

(d) Here we notice that the expression in the denominator has its derivative sitting with dx in the numerator. This means that substituting u for the denominator will result in du/u. That is, we set u = x^{2} − 2, so that du = 2xdx. The limits of integration change from 2 to 2^{2} − 2 = 2 and from 4 to 4^{2} − 2 = 14. So we obtain ∫_{2}^{14} du/u = ln(14) − ln 2.

We will soon see that the answers to parts (c) and (d) can be simplified.

Before giving the next group of properties of ln, we make a useful observation. We defined ln a to be the area under y = 1/x from x = 1 to x = a. But it turns out that for any positive number b this value ln a is also the area under y = 1/x from x = b to x = ab. For example, ln 2 is the area from 1 to 2, and it is also the area from 3 to 6 (or from 1000 to 2000, etc.). Roughly speaking, this is because the latter area is obtained by taking the area from 1 to 2, expanding it horizontally, and then contracting it vertically by the same factor. More precisely, to show that ln a is equal to ∫_{b}^{ab} dx/x, we write ln a = ∫_{1}^{a} dx/x and make the u-substitution u = bx. Then du = b dx, and the limits of integration become b · 1 to b · a, i.e.,

ln a = ∫_{1}^{a} \frac{dx}{x} = ∫_{1}^{a} \frac{b dx}{b x} = ∫_{b}^{ab} \frac{du}{u}.

The name of the variable of integration is irrelevant, so that we can equally well write ln a = ∫_{b}^{ab} dx/x. It is now easy to obtain our next basic group of properties.

(Property 3 a) ln(ab) = ln a + ln b .

This follows because ln a = ∫_{b}^{ab} dx/x = ln(ab) − ln b.

(Property 3 b) ln(1/a) = − ln a.

This is because, by part (a), we have ln(1/a) + ln a = ln 1 = 0.

(Property 3 c) ln(a/b) = ln a − ln b .

This follows immediately from part (a) if we replace b by 1/b and use part (b).

(Property 3 d) ln(a^{n}) = n ln a .

First note that part (a) can be repeated when you have more than two factors: ln(abc) = ln a + ln(bc) = ln a + ln b + ln c, and so on. Thus, if n is a positive integer, we can write ln(a^{n}) = ln(a · a · a ⋯ a) = ln a + ln a + ln a + ⋯ + ln a = n ln a. If n is a negative integer, one uses a similar argument with a replaced by 1/a. The formula ln(a^{n}) = n ln a applies for any n (integer or not), but we shall omit the proof in the case when n is not an integer. (But see Problem 2 in the homework for a proof.)

Example 1.3. Simplify the answers to parts (c)–(d) of Example 2.

In part (c) we have − ln(\sqrt{2}/2) = −(ln(2^{1/2}) − ln 2) = − (\frac{1}{2} ln 2 − ln 2) = \frac{1}{2} ln 2. In part (d) we have ln(14) − ln 2 = ln(14/2) = ln 7.

1. Appearance of the Curve y = ln x.

Recall what Property 1 says: the function y = ln x has domain consisting of all positive x, its graph crosses the x-axis at x = 1, and the function is positive when x > 1 and negative when 0 < x < 1. It is an increasing function, because its derivative is 1/x, which is always positive for x > 0. However, when x is large this derivative is quite small. In other words, the slope of the curve tends to “level off.” On the other hand, when x is near 0 the slope is very large, i.e., the curve is steep. At the point x = 1 where the curve crosses the x-axis, the slope is 1, i.e., the curve is increasing at a 45^{∘} angle as it crosses the axis.

1  y = ln x

We now ask whether the curve y = ln x increases without bound as x increases, or whether it is bounded by a horizontal asymptote. It is possible for an increasing curve to be bounded — for example, the curve y =Arctan x. It is also possible for a curve whose slopes are becoming smaller and smaller (“leveling off”) to increase without bound — for example, the curve y = \sqrt{x}. So our question is: does y = ln x look more like the Arctan curve or the square root curve? The answer to this question is: more like the square root curve, i.e., there is no horizontal asymptote. To see this, we can use Property 3(d) with a very large value of n. For example,

ln (2^{1000}) = 1000 ln 2 = 693, ln (2^{1000000}) = 693147, ln (2^{10000000000}) = 693147181.

Thus, we can get ln x to be as large as we want by choosing x to be 2 to a large enough power.

Even though ln x and \sqrt{x} both approach infinity (fairly slowly) as x ⟶ ∞, the former function approaches infinity more slowly than the latter one. If we look at the ratio ln x/\sqrt{x}, and set x equal to an extremely large number (like 10^{1000}, for example), we find that

\frac{ln 10^{1000}}{\sqrt{10^{1000}}} = \frac{1000 ln 10}{10^{500}}.

Here the numerator is about 230, while the denominator is a 1 followed by 500 zeros! So the ratio is extremely close to 0, i.e., ln x, while fairly large, is much much smaller than \sqrt{x}. The same argument can be used to show that ln x approaches infinity slower than any n-th root function. For example, the ratio ln x/ \sqrt[10]{x} has limit 0 as x ⟶ ∞. To summarize: the natural logarithm function grows without bound as x increases, but very, very slowly.

At the other end, as x ⟶ 0, the function ln x approaches −∞. This is because a very small positive number is the reciprocal of a very large positive number, and so its logarithm is the negative of the logarithm of the very large number.

2. Relation with Logarithm-to-the-Base-a

Historically, the first logarithms used were “ logarithms to the base 10,” denoted log_{10}. The definition of the function y = log_{10} x is: y is the power to which 10 must be raised to get x, i.e., 10^{y} = x. More generally, if a is any fixed number greater than 1 (for example, log to the base a = 2 is often used in computer science), then we define log_{a} x as the power to which a is raised to get x. That is,

y = log_{a} x  means that  a^{y} = x.

It is not hard to relate this “old-fashioned” logarithm to the natural logarithm ln. Namely, if y = log_{a} x, then to find y in terms of ln we take ln of both sides of the relation a^{y} = x, obtaining ln(a^{y}) = y ln a = ln x, i.e., y = ln x/ ln a. Since y = log_{a} x, we conclude that

log_{a} x = \frac{ln x}{ln a}.

For example, log_{10} x = ln x/ ln(10) = 0.4343 ln x. The only difference between the different kinds of logarithm is a constant factor. Thus, there is no problem in taking the derivative of log_{a}: \frac{d}{dx} log_{a} x = \frac{1}{ln a} · \frac{1}{x}.

3. Logarithmic Differentiation

Although it may seem that we can already take the derivative of almost any function for which we can write down a formula, you may have noticed that there is one type of function which we have not been able to differentiate, namely, a function of the form y = f(x)^{g(x)}, where g(x) is not a constant. Of course, if g(x) is a constant, then we can use the rule for the derivative of f(x)^{n}. But this rule cannot be used if the exponent is a function of x rather than a constant. Instead we must use a procedure called logarithmic differentiation. As its name implies, it consists of two parts: (1) take the ln of both sides of the equation y = f(x)^{g(x)}, and (2) differentiate both sides of the resulting equation. In part (1), be sure to use Property 3(d) of ln, with a replaced by f(x) and n replaced by g(x). We illustrate with the following examples.

Example 1.4. Find the derivative of (a) (sin x)^{x}; (b) (ln x)^{ln x}.

(a) We first take the ln of both sides of y = (sin x)^{x}, obtaining ln y = ln ((sin x)^{x}) = x ln(sin x). When taking d/dx of both sides, on the left we use Property 2(a) of ln and on the right we use the product rule:

\frac{1}{y} · \frac{dy}{dx} = x\frac{1}{sin x} cos x + 1 · ln(sin x) = x cot x + ln(sin x).

Finally, we multiply both sides by y, and express dy/dx in terms of x by replacing y by (sin x)^{x}:

\frac{dy}{dx} = (x cot x + ln(sin x))y = (x cot x + ln(sin x))(sin x)^{x}.

(b) We write y = (ln x)^{ln x}, and ln y = ln ((ln x)^{ln x}) = ln x ln(ln x). Taking d/dx of both sides gives:

\frac{1}{y} \frac{dy}{dx} = ln x \frac{d}{dx}(ln(ln x)) + \frac{1}{x} ln(ln x) = ln x(\frac{1}{ln x} \frac{1}{x}) + \frac{1}{x} ln(ln x) = \frac{1 + ln(ln x)}{x},

and hence

\frac{dy}{dx} = \frac{1 + ln(ln x)}{x} y = \frac{1 + ln(ln x)}{x}(ln x)^{ln x}.

Homework 1.

1. Find the derivative of:

(a) ln(kx) (k is a constant); (d) ln(tan x);
(b) ln^{4} x;  (e) ln ((x^{2} + 16)^{2}) − x arctan(x/4).

(c) ln^{2}(ln x);

2. (a) Find the derivative of the functions ln(ax) − ln x − ln a (where a is any constant) and ln(x^{n}) − n ln x (where n is any constant).

(b) Use part (a) to give another derivation of Properties 3(a) and 3(d) of ln.

3. Simplify:

(a) ln 30 − ln 2 − ln 5;  (d) ln \sqrt{6.75} (in terms of ln 2 and ln 3);
(b) ln \sqrt{8} (in terms of ln 2); (e) ln(πr^{2}) − 2 ln r;
(c) ln \sqrt[3]{9} (in terms of ln 3); (f) ln \sqrt{r^{2} − x^{2}} − \frac{1}{2} ln(r − x).

4. Find:

(a) ∫_{−1}^{−0.5} \frac{dx}{x};  (d) ∫_{2}^{3} \frac{dx}{x ln^{2} x};
(b) ∫ cot x dx;  (e) ∫_{0}^{2π} \frac{sin(θ/2)dθ}{2 − cos(θ/2)}.

(c) ∫ \frac{dx}{x ln x} (hint: substitute u = ln x);

5. Find the center of mass of the uniform plate contained (a) between the graphs of y = 1/x, y = −1/x, x = 1 and x = 2;

(b) between the graphs of y = 1/x^{2}, y = −1/x^{2}, x = 1 and x = 2;

(c) between the graphs of y = 1/(1 + x^{2}), y = −1/(1 + x^{2}), x = 0 and x = 1.

6. Find the area (a) between the curves y = 5/(1 + x^{2}) and y = 2/x;

(b) between the curves y = 1/\sqrt{1 − x^{2}} and y = 2/(2 − x).

7. The region bounded by y = −1/x^{2}, y = −1/4 and y = −1 is revolved around the y-axis to form a container. Find its volume.

8. A bug slides down the curve y = ln x, moving leftward (i.e., its x-coordinate is decreasing) at 10 units/min. Find its speed along the curve when x = 2, when x = 1, and when x = 1/2.

9. By “experiment” (for example, substituting x = 1/10^{1000}), find the limit as x ⟶ 0 (where x is positive) of:

(a) x^{3} ln x, (b) x ln x, (c) \sqrt{x} ln x, (d) \sqrt[10]{x} ln x.

10. Find the derivative of:

(a) y = x^{x};  (d) y = x^{ln x};
(b) y = (sin x)^{\sqrt{x}}; (e) y = (cos x)^{Arctan x}.

(c) y = (ln x)^{x};

11. One morning in January it began to snow and kept on snowing at a constant rate. A snow plow began to plow at noon. It plowed clean and at a constant rate (volume per unit time). From one o’clock until two o’clock it went only half as far as it had gone between noon and one o’clock. When did the snow begin falling?