TMV035 Analysis and Linear Algebra B, 2005

LECTURE 2.2

In this lecture we present the exponential function. This covers AMBS Ch 31.

1. The exponential function

1.1. The construction. We shall construct a unique solution of the initial value problem:

\{ \begin{matrix}u′(x) = u(x), x ∈ [0, b], \\ u(0) = 1. \end{matrix} (1)

Here b > 0 is an arbitrary number.

We recall the constructive proof in four steps:

(1) An algorithm which produces a sequence.

(2) The sequence is a Cauchy sequence.

(3) The limit of the sequence solves the problem.

(4) The solution is unique.

Step 1. Algorithm. We use the same algorithm as in the Fundamental Theorem of Calculus but modified to take into account that the right-hand side is not f(x) but u(x):

Algorithm. (Euler’s method) First set the initial values:

\{ \begin{matrix}x_{0}^{n} = 0, \\ U(x_{0}^{n}) = 1. \end{matrix} (2)

Then set h_{n} = 2^{−n}b, N = 2^{n}, and compute for n = 1, …, N:

\{ \begin{matrix}x_{i}^{n} = x_{i−1}^{n} + h_{n}, \\ U^{n}(x_{i}^{n}) = U^{n}(x_{i−1}^{n}) + U(x_{i−1}^{n})h_{n}. \end{matrix} (3)

If we repeat the calculation we get:

U^{n}(x_{i}^{n}) = U^{n}(x_{i−1}^{n}) + U(x_{i−1}^{n})h_{n}
= (1 + h_{n})U(x_{i−1}^{n})
= (1 + h_{n})^{2}U(x_{i−2}^{n})
⋮
= (1 + h_{n})^{i}U(x_{0}^{n})
= (1 + h_{n})^{i}.

That is

U^{n}(x_{i}^{n}) = (1 + h_{n})^{i}. (4)

Date: November 1, 2005, Stig Larsson, Mathematical Sciences, Chalmers University of Technology.

It is important to note that U^{n}(x_{i}^{n}) can also be expressed as a sum:

U^{n}(x_{i}^{n}) = U^{n}(x_{i−1}^{n}) + U(x_{i−1}^{n})h_{n}

= U^{n}(x_{i−2}^{n}) + U(x_{i−2}^{n})h_{n} + U(x_{i−1}^{n})h_{n}

⋮

= U^{n}(x_{0}^{n}) + U(x_{0}^{n})h_{n} + ⋯ + U(x_{i−1}^{n})h_{n}

= 1 + ∑_{j=1}^{i} U(x_{j−1}^{n})h_{n},

that is,

U^{n}(x_{i}^{n}) = 1 + ∑_{j=1}^{i} U(x_{j−1}^{n})h_{n}. (5)

Step 2. Cauchy sequence. We must show that {U^{n}(x)}_{n=1}^{∞} is a Cauchy sequence (for each fixed x), i.e.,

|U^{n}(x) − U^{m}(x)| → 0, as m, n → ∞.

The proof of this is rather long and complicated. It is written in detail in the book. You may skip this part of the proof if you like.

That {U^{n}(x)}_{n=1}^{∞} is a Cauchy sequence means that it generates a decimal expansion, and a decimal expansion is the same as a real number. Therefore we get a real number u(x) such that

u(x) = lim_{n→∞} U^{n}(x). (6)

We have constructed a new function u(x). It is called the exponential function and it is denoted

u(x) = exp(x), x ∈ [0, b]. (7)

If we use the formula in (4), then we see that the limit in (6) can be expressed as

exp(x) = lim_{i→∞} (1 + x/i)^{i}, (8)

if i is related to x and n so that x = ih_{n}, h_{n} = x/i. Note that n → ∞ implies i → ∞ because i = x/h_{n} = 2^{n}x/b.

Matlab has the function exp which computes the exponential function approximately.

>> y=exp(x)

Step 3. The limit solves the equation. We have to show that the new function u(x) satisfies the initial-value problem (1).

If we let n → ∞ in (5) we get

u(x) = 1 + ∫_{0}^{x} u(y) dy

and it follows that

\{ \begin{matrix}u′(x) = u(x), x ∈ [0, b], \\ u(0) = 1. \end{matrix}

This is (1).

Step 4. Uniqueness. We must show that u is the only solution of (1). Assume then that v is another solution. This means that

\{ \begin{matrix}v′(x) = v(x), x ∈ [0, b], \\ v(0) = 1. \end{matrix}

The difference w = u − v then satisfies

\{ \begin{matrix}w′(x) = w(x), x ∈ [0, b], \\ w(0) = 0. \end{matrix}

Hence

w(x) = w(0) + ∫_{0}^{x} w(y) dy = ∫_{0}^{x} w(y) dy.

Let M_{\frac{1}{2}} be a bound for w on the interval [0, \frac{1}{2}]:

|w(x)| ≤ M_{\frac{1}{2}} , ∀x ∈ [0, \frac{1}{2}].

Then, for x ∈ [0, \frac{1}{2}],

|w(x)| = | ∫_{0}^{x} w(y) dy| ≤ ∫_{0}^{x} |w(y)| dy ≤ ∫_{0}^{1/2} |w(y)| dy ≤ ∫_{0}^{1/2} M_{\frac{1}{2}} dy = \frac{1}{2}M_{\frac{1}{2}} .

This implies that

M_{\frac{1}{2}} ≤ \frac{1}{2}M_{\frac{1}{2}} .

Thus M_{\frac{1}{2}} = 0 and we conclude that w(x) = 0 for x ∈ [0, \frac{1}{2}]. Continuing in the same way, we let M_{1} be a bound for w on the interval [\frac{1}{2}, 1] and we prove that M_{1} = 0, so that w(x) = 0 for x ∈ [\frac{1}{2}, 1]. After a finite number of steps we have proved that w(x) = 0 for x ∈ [0, b]. This means that u = v and there is only one solution.

1.2. Domain of definition. We have constructed a new function u(x). It is called the exponential function and it is denoted

u(x) = exp(x), x ∈ [0, b].

Since b is arbitrary it is defined for all x ≥ 0. For x < 0 we define it by

exp(x) = \frac{1}{exp(−x)}, x < 0. (9)

Therefore its domain of definition is:

D_{exp} = R.

1.3. Derivative and initial value. From the construction we have

D exp(x) = exp(x), x ≥ 0, (10)

exp(0) = 1. (11)

For x < 0 we have

D exp(x) = D \frac{1}{exp(−x)} = \frac{−D exp(−x)}{(exp(−x))^{2}} = \frac{exp(−x)}{(exp(−x))^{2}} = \frac{1}{exp(−x)} = exp(x).

Therefore

D exp(x) = exp(x), x ∈ R. (12)

1.4. Positivity. It is clear from the construction in (4) that U^{n}(x_{i}^{n}) ≥ 1 and hence exp(x) ≥ 1 > 0 for x ≥ 0, and then also exp(x) > 0 for x < 0. Hence

exp(x) > 0, x ∈ R.

1.5. Monotonicity. The function exp is strictly increasing because D exp(x) = exp(x) > 0 for all x.

4 LECTURE 2.2

1.6. Inverse function. Since exponential function is strictly increasing, it is invertible. We shall prove that its inverse is the natural logarithm: log(exp(x)) = x, ∀x ∈ R, (13) exp(log(y)) = y, ∀y > 0. (14) Proof. We compute the derivative by means of the chain rule:

D log(exp(x)) = log′(exp(x)) exp′(x) = \frac{1}{exp(x)} exp(x) = 1.

Hence

log(exp(x)) = x + C.

We determine the constant by taking x = 0:

C = log(exp(0)) = log(1) = 0.

We conclude

log(exp(x)) = x,

which is (13). Then we take x = log(y) in (13):

log(exp(log(y))) = log(y).

Since log is strictly increasing we can solve this equation uniquely for exp(log(y)):

exp(log(y)) = y.

This is (14). □

Note that (13) means that the unique solution of the equation exp(x) = y is x = log(y), i.e., exp^{−1} = log. And (14) means that the unique solution of log(y) = x is y = exp(x), i.e., log^{−1} = exp. 1.7. Product of exponentials.

(15) exp(a + b) = exp(a) exp(b), a, b ∈ R. Proof. We use the known rule for the logarithm of a product:

log(exp(a) exp(b)) = log(exp(a)) + log(exp(b)) = a + b.

Then take the exp of this. □ 1.8. Asymptotic behavior.

lim_{x→∞} exp(x) = ∞, (16)

lim_{x→−∞} exp(x) = 0. (17)

Proof. Let x and y be related as

y = exp(x), x = log(y).

We know from the properties of the logarithm that

x → ∞ ⟺ y → ∞,
x → −∞ ⟺ y → 0.

This proves the required limits. □ 1.9. Range. We conclude that exp takes all positive values:

R_{exp} = (0, ∞).

1.10. Graph. We can now sketch the graph y = exp(x). The slope of the graph at x = 0 is 1. Therefore, y = x + 1 is the tangent at x = 0. Matlab plots can be seen in Figures 1 and 2.

LECTURE 2.2 5

Figure 1. The graph y = exp(x) together with the tangent y = x + 1. Figure 2. The graph y = exp(x). Note how fast it grows.

1.11. The number e. We define the number e according to e = exp(1). (18)

If we take b = 1 in (1) and recall (8) we have

e = exp(1) = lim_{n→∞}(1 + h_{n})^{N},

where h_{n} = 2^{−n}, N = 2^{n}, h_{N} = 1/N. Thus

e = lim_{N→∞}(1 + 1/N)^{N}. (19)

With N = 1000 we get

e ≈ 2.72.

In Matlab:

>> N=1000; e=(1+1/N)^N

Do this now!

We also have

log(e) = 1.

We now define “e to the power x”:

e^{x} = exp(x), x ∈ R. (20)

This is what you have waited for, isn’t it? We must check that this is consistent with our previous definitions of e^{x} for integers and rational numbers x. First we check it for integers. Using (15) we get:

e^{2} = exp(1) exp(1) = exp(1 + 1) = exp(2).

In the same way, for n ∈ N,

e^{n} = exp(1) ⋯ exp(1) = exp(1 + ⋯ + 1) = exp(n),
e^{−n} = \frac{1}{e^{n}} = \frac{1}{exp(n)} = exp(−n).

In the last one we also used (9). Therefore

e^{n} = exp(n), n = 0, ±1, ±2, …,

which is in agreement with (20). We must also check that (20) is consistent with our old definition of a^{r} for a > 0 and r = p/q ∈ Q in AMBS 18.4. This is done below, but this is advanced and you may skip it.

Advanced: We now check that (20) is consistent with our old definition of a^{r} for a > 0 and r = p/q ∈ Q in AMBS 18.4. With a = e the old definition gives y = e^{p/q} as the unique solution of the equation y^{q} = e^{p}. Here p, q ∈ Z.

Now set z = exp(p/q). We want to show that z = e^{p/q}, because this means that exp(r) = e^{r} for r ∈ Q. We do this by proving that z^{q} = e^{p}.

Note that (exp(x))^{n} = exp(nx), x ∈ R, n ∈ Z, according to (15). Using this we compute:

z^{q} = (exp(p/q))^{q} = exp (q · \frac{p}{q}) = exp(p) = (exp(1))^{p} = e^{p}.

Hence z satisfies the equation z^{q} = e^{p}. But the unique solution is e^{p/q}. Hence z = e^{p/q}. Now when we know that exp(r) = e^{r} for r ∈ Q it is safe to extend the definition as in (20).

1.12. Exponential function with base a. Now we define

a^{x} = exp(x log(a)), x ∈ R, a > 0. (21)

Of course, this can also be written a^{x} = e^{x log(a)}. Then we have the familiar rule

(a^{x})^{y} = exp(y log(a^{x})) = exp(y log(exp(x log(a)))) = exp(yx log(a)) = a^{yx}.

That is

(a^{x})^{y} = a^{yx}, x, y ∈ R, a > 0,

and, in particular,

(e^{x})^{y} = e^{yx}, x, y ∈ R.

Also

log(a^{x}) = log(exp(x log(a))) = x log(a), x ∈ R, a > 0.

The function f(x) = a^{x} is called an exponential function and g(x) = x^{b} is called a power function.

1.13. Logarithm with base a. We compute the inverse of the function y = a^{x} = exp(x log(a)) by solving uniquely for x. By taking the logarithm we get:

log(y) = x log(a)

so that, if a ≠ 1,

x = \frac{log(y)}{log(a)}.

The inverse is called the logarithm with base a and is denoted:

x = log_{a}(y) = \frac{log(y)}{log(a)}, y > 0, a > 1.

(It is not necessary to consider the case 0 < a < 1 because then log(a) = − log(1/a) and we would have log_{a} = − log_{1/a} with \frac{1}{a} > 1.)

In particular with a = 10 we get the logarithm with base 10:

lg(x) = log_{10}(x) = \frac{log(x)}{log(10)}.

Note log_{10}(1000) = 3, log_{10}(0.001) = −3, etc. The base 2 is also important:

log_{2}(x) = \frac{log(x)}{log(2)}.

1.14. Solving differential equations with exp. From the construction of exp we know that

\{ \begin{matrix}u′(x) = u(x), x ≥ 0, \\ u(0) = 1, \end{matrix}

has the unique solution

u(x) = exp(x).

We can also solve the following variant of the previous equation:

\{ \begin{matrix}u′(x) = cu(x), x ≥ 0, \\ u(0) = u_{0}, \end{matrix}

for c ∈ R. This problem has the solution

u(x) = u_{0} exp(cx),

because, by the chain rule, u′(x) = u_{0} exp(cx)c = cu(x), u(0) = u_{0} exp(0) = u_{0}. Uniqueness is proved in the same way as for (1).

This is a very important solution formula. Remember it! You must also remember the graph of this function for various values of c, see Figure 3.

More generally:

\{ \begin{matrix}u′(x) = cu(x), x ≥ a, \\ u(a) = u_{a}, \end{matrix}

has the solution

u(x) = u_{a} exp(c(x − a)).

Check this!

Figure 3. The graph y = u_{0} exp(cx) for u_{0} = 1, c > 0, c = 0, and c < 0.

Figure 3 was created by

>> hold on
>> fplot('exp(0.8*x)',[-.01,1])
>> fplot('exp(  0*x)',[-.01,2])
>> fplot('exp( -2*x)',[-.01,2])
>> axis equal
>> grid on

Do this now!

1.15. Reaction kinetics. In a chemical reaction of first order the reaction rate is proportional to the concentration:

                                r = kc. [mol/(Ls)]

Here k [1/s] is the rate constant. If a substance is created in a first order reaction then its concentration c(t) [mol/L] at time t [s] satisfies:

\{ \begin{matrix}c′(t) = kc(t), t ≥ 0, \\ c(0) = c_{0}, \end{matrix}

with solution

c(t) = c_{0}e^{kt}.

If a substance is consumed in a first order reaction then its concentration satisfies:

\{ \begin{matrix}c′(t) = −kc(t), t ≥ 0, \\ c(0) = c_{0}, \end{matrix}

with solution

c(t) = c_{0}e^{−kt}.

LECTURE 2.2 9

The half-life is the time t_{1/2} such that

c(t_{1/2}) = \frac{1}{2}c(0).

A simple calculation shows c_{0}e^{−kt_{1/2}} = \frac{1}{2}c_{0}, −kt_{1/2} = log(\frac{1}{2}) = − log(2),

t_{1/2} = \frac{log(2)}{k}.

/stig