The Natural Logarithm

The Power Rule says

$$\int x^n\,dx = \dfrac{1}{n + 1}x^{n+1} + C$$

provided that $n \ne -1$ . The formula does not apply to

$$\int \dfrac{1}{x}\,dx.$$

An antiderivative $F(x)$ of $\dfrac{1}{x}$ would have to satisfy

$$\der {} x F(x) = \dfrac{1}{x}.$$

But the Fundamental Theorem implies that if $x > 0$ , then

$$\der {} x \int_1^x \dfrac{1}{t}\,dt = \dfrac{1}{x}.$$

Thus, $\displaystyle \int_1^x
   \dfrac{1}{t}\,dt$ plays the role of $F(x)$ .

Define the natural log function $\ln x$ by

$$\ln x = \int_1^x \dfrac{1}{t}\,dt \quad\hbox{for}\quad x > 0.$$

By construction, if $x > 0$ ,

$$\der {} x \ln x = \dfrac{1}{x}, \quad\hbox{and}\quad \int \dfrac{1}{x}\,dx = \ln x + C.$$

$\displaystyle \int_1^x
   \dfrac{1}{t}\,dt$ represents the area under $f(t) = \dfrac{1}{t}$ from 1 to x:

$$\hbox{\epsfysize=2in \epsffile{natlog1.eps}}$$

But why is this called a logarithm?

You've probably seen logarithms used like this:

$$\log_2 8 = 3 \quad\hbox{because}\quad 2^3 = 8.$$

It's not clear what $\ln x =
   \displaystyle \int_1^x \dfrac{1}{t}\,dt$ has to do with raising numbers to powers.

Well, for one thing, $\ln x$ has many properties you'd expect a logarithm to have. For example,

$$\ln 1 = \int_1^1 \dfrac{1}{t}\,dt = 0.$$

You'd expect the log of a product to equal the sum of the logs. If a and b are positive numbers, then

$$\ln (ab) = \int_1^{ab} \dfrac{1}{t}\,dt = \int_1^a \dfrac{1}{t}\,dt + \int_a^{ab} \dfrac{1}{t}\,dt.$$

In the second integral, let $u =
   \dfrac{t}{a}$ , so $du = \dfrac{dt}{a}$ , and $dt = a\,du$ . When $t = a$ , $u = 1$ ; when $t = ab$ , $u = b$ . So

$$\int_1^a \dfrac{1}{t}\,dt + \int_a^{ab} \dfrac{1}{t}\,dt = \int_1^a \dfrac{1}{t}\,dt + \int_1^b \dfrac{1}{u}\,du = \ln a + \ln b.$$

In other words,

$$\ln (ab) = \ln a + \ln b.$$

In similar fashion, you can verify that

$$\ln \dfrac{a}{b} = \ln a - \ln b \quad\quad\hbox{and}\quad\quad \ln x^r = r \ln x.$$

Thus, there is some justification in calling $\ln x$ a logarithm, because it has the same properties you'd expect logs to have.

It turns out that the whole story is backwards! When you discuss logs as the opposite of powers, you are actually being a little sloppy. To define the familiar logs (and exponentials) with mathematical precision, what you actually do is to define $\ln x$ and its inverse $e^x$ first, as I've done above. Then you define the other logs and powers using $\ln x$ and $e^x$ .

For example, if a and b are positive numbers, define

$$\log_a b = \dfrac{\ln b}{\ln a}.$$

It's possible to check that logs base a, as I've just defined them, behave the way you'd expect logs to behave.

Here are some additional properties of $\ln x$ .

First,

$$\der {} x \ln x = \dfrac{1}{x} > 0 \quad\hbox{for}\quad x > 0.$$

Therefore, the graph of $\ln x$ is increasing for $x > 0$ .

Moreover,

$$\dfrac{d^2}{dx^2} \ln x = -\dfrac{1}{x^2} < 0 \quad\hbox{for}\quad x > 0.$$

Therefore, the graph of $\ln x$ is concave down for $x > 0$ .

Next, consider the following picture:

$$\hbox{\epsfysize=2in \epsffile{natlog2.eps}}$$

The area under the curve from 1 to 4 is $\ln 4$ . It is greater than the sum of the areas of the three rectangles, so

$$\ln 4 > \dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{4} = \dfrac{13}{12} > 1.$$

If n is a positive integer, then

$$n \ln 4 > n, \quad\quad\hbox{or}\quad\quad \ln 4^n > n.$$

So if $x > 4^n$ , then

$$\ln x > \ln 4^n > n.$$

Since n is an arbitrary positive integer, I can make $\ln x$ arbitrarily large by making x sufficiently large. This proves that

$$\lim_{x\to +\infty} \ln x = +\infty.$$

Here's the graph of $\ln x$ :

$$\hbox{\epsfysize=2in \epsffile{natlog3.eps}}$$


Example. The differentiation formula for $\ln x$ works together with the other differentiation rules in the usual ways.

$$\der {} x \ln (x^2 + x + 7) = \dfrac{2x + 1}{x^2 + x + 7}.$$

$$\der {} x \ln (\sin x + x^3) = \dfrac{\cos x + 3x^2}{\sin x + x^3}.$$

$$\der {} x \left[(\ln x)^7 + \ln (x^7)\right] = \der {} x \left[(\ln x)^7 + 7 \ln x\right] = 7(\ln x)^6\left(\dfrac{1}{x}\right) + \dfrac{7}{x}.$$

$$\der {} x \dfrac{x^2}{\ln x} = \dfrac{(\ln x)(2x) - (x^2)\left(\dfrac{1}{x}\right)}{(\ln x)^2} = \dfrac{2x \ln x - x}{(\ln x)^2}.$$

$$\der {} x \ln \left(\ln \left(\ln x + 1\right)\right) = \left(\dfrac{1}{\ln \left(\ln x + 1\right)}\right) \left(\dfrac{1}{\ln x + 1}\right)\left(\dfrac{1}{x}\right). \quad\halmos$$


If I say that "$\der {} x f(x) =
   g(x)$ " --- the derivative of $f(x)$ is $g(x)$ --- then $g(x)$ should be defined wherever $f(x)$ is defined. Therefore, it is not really correct to say without the qualification $x > 0$ that "$\der {} x \ln x = \dfrac{1}{x}$ ". For $\dfrac{1}{x}$ is defined for $x \ne 0$ , whereas $\ln x$ is only defined for $x > 0$ .

It turns out that the correct statement is:

$$\der {} x \ln |x| = \dfrac{1}{x} \quad\hbox{for}\quad x \ne 0.$$

For $x > 0$ , this is the same as the old formula. For $x < 0$ , $|x| = -x$ , so

$$\der {} x \ln |x| = \der {} x \ln (-x) = \dfrac{-1}{-x} = \dfrac{1}{x}.$$

So the updated antiderivative formula is

$$\int \dfrac{1}{x}\,dx = \ln |x| + C.$$

You can omit the absolute value signs if the quantity inside is never negative. For example, it turns out that

$$\int \dfrac{2x}{x^2 + 1}\,dx = \ln (x^2 + 1) + C.$$

(Deriving this formula requires an integration technique called substitution. However, you can check that it's correct by differentiating $\ln (x^2 +
   1)$ to get $\dfrac{2x}{x^2 + 1}$ .) I can omit the absolute values around the "$x^2 + 1$ ", because $x^2 +
   1$ is always positive.


Example.

$$\int \dfrac{dx}{2x - 5} = \dfrac{1}{2} \ln |2x - 5| + C.$$

$$\int \tan x\,dx = -\ln |\cos x| + C = \ln |\sec x| + C.$$

$$\int \dfrac{x^2}{x^3 + 2}\,dx = \dfrac{1}{3} \ln |x^3 + 2| + C. \quad\halmos$$


Example. You can use logarithmic differentiation to compute derivatives which are difficult to compute in other ways. For example, suppose you want to differentiate $y = x^x$ .

You can't use the Power Rule, because the exponent is x, not a {\it number}.

You can't use the rule $\der {} x a^x =
   a^x \ln a$ (which you'll see later), because the base is x, not a number.

Instead, take logs of both sides:

$$\ln y = \ln x^x = x \ln x.$$

Differentiate implicitly:

$$\dfrac{y'}{y} = 1 + \ln x.$$

Hence,

$$y' = y\left(1 + \ln x\right) = x^x(1 + \ln x).$$

By a similar procedure, you can differentiate complicated products and quotients. For example, to differentiate $y = \dfrac{(x^2 + 3)^{10}}{\sqrt{5x + 3}(\sin x)^4}$ , take logs of both sides:

$$\ln y = \ln \dfrac{(x^2 + 3)^{10}}{\sqrt{5x + 3}(\sin x)^4} = \ln (x^2 + 3)^{10} - \ln \left(\sqrt{5x + 3}(\sin x)^4\right) = \ln (x^2 + 3)^{10} - \ln \sqrt{5x + 3} - \ln (\sin x)^4 =$$

$$10 \ln (x^2 + 3) - \dfrac{1}{2} \ln (5x + 3) - 4 \ln \sin x.$$

To simplify, I used (in order) the following properties of logs:

$$\ln \dfrac{a}{b} = \ln a - \ln b, \quad \ln ab = \ln a + \ln b, \quad \ln a^r = r \ln a.$$

Differentiate implicitly:

$$\dfrac{y'}{y} = \dfrac{20x}{x^2 + 3} - \dfrac{1}{2}\dfrac{5}{5x + 3} - \dfrac{4\cos x}{\sin x}.$$

Hence,

$$y' = y\left(\dfrac{20x}{x^2 + 3} - \dfrac{1}{2}\dfrac{5}{5x + 3} - \dfrac{4\cos x}{\sin x}\right) = \dfrac{(x^2 + 3)^{10}}{\sqrt{5x + 3}(\sin x)^4} \left(\dfrac{20x}{x^2 + 3} - \dfrac{5}{2(5x + 3)} - \dfrac{4 \cos x}{\sin x}\right).\quad\halmos$$


Example. Compute $\der {} x (x^2 + 1)^{x^4}$ .

Let $y = (x^2 + 1)^{x^4}$ . Taking logs and bringing the power down, I get

$$\ln y = \ln (x^2 + 1)^{x^4} = x^4 \ln (x^2 + 1).$$

Differentiate both sides, using the Chain Rule on the left and the Product Rule (and Chain Rule) on the right:

$$\dfrac{y'}{y} = (x^4)\left(\dfrac{2x}{x^2 + 1}\right) + [\ln (x^2 + 1)](4x^3).$$

Multiply both sides by y to clear the fraction on the left, then substitute $y = (x^2 + 1)^{x^4}$ :

$$y' = y\left((x^4)\left(\dfrac{2x}{x^2 + 1}\right) + [\ln (x^2 + 1)](4x^3)\right) = (x^2 + 1)^{x^4}\left((x^4)\left(\dfrac{2x}{x^2 + 1}\right) + [\ln (x^2 + 1)](4x^3)\right).\quad\halmos$$


Contact information

Bruce Ikenaga's Home Page

Copyright 2006 by Bruce Ikenaga