An exponential function is given by

$f(x) = a^x$

where $$x$$ is any real number, $$a > 0$$, and $$a \neq 1$$. The number $$a$$ is called the base. Unlike power functions, which have the variable in the base, exponential functions have the variable in the exponent.

import numpy as np
import matplotlib.pyplot as plt

def f(x):
return 2**x

def g(x):
return (1/2)**x

def h(x):
return 0.4**x

x = np.linspace(0, 3)

plt.plot(x, f(x), label="$f(x) = 2^x$")
plt.plot(x, g(x), label="$g(x) = 1/2^x$")
plt.plot(x, h(x), label="$h(x) = 0.4^x$")
plt.legend(frameon=False) $e = \lim_{h \to 0}(1 + h)^{1/h} \approx 2.71$

and we call $$e$$ the natural base. The reason why it’s important in mathematics is that it represents the base rate of growth shared by all continually growing processes.

The derivative of the function $$f(x) = e^x$$ is itself

$f^\prime(x) = f(x)$

or

$\frac{d}{dx}e^x = e^x$

The derivative of $$e$$ to some power is the product of $$e$$ to that power and the derivative of the power.

$\frac{d}{dx}e^{f(x)} = e^{f(x)} \cdot f^\prime(x)$

## Examples

Let’s find $$dy/dx$$ for (a) $$y = 3e^x$$ (b) $$y = e^{8x}$$.

from sympy import *
from math import e

def f(x):
return 3 * e**x

def g(x):
return e**(8*x)

x = symbols("x")

diff(f(x), x)
## 3.0*2.71828182845905**x
diff(g(x), x)
## 8.0*2.71828182845905**(8*x)

## Worker Efficiency (Example)

It is reasonable for a manufacturer to expect the daily output of a new worker to start out slow and continue to increase over time, but then tend to level off, never exceeding a certain amount. A firm manufactures phones and determines that after working $$t$$ days, the efficiency, in number of phones produced per day of most workers can be modeled by the function

$N(t) = 80 - 70e^{-0.13t}$

Find (a) $$N(0)$$, $$N(1)$$, $$N(5)$$, $$N(10)$$, $$N(20)$$, $$N(30)$$ (b) graph $$N(t)$$ (c) find $$N^\prime(t)$$ and interpret the derivative in terms of rate of change (d) what number of phones seems to determine where worker efficiency levels off?

def N(t):
return 80 - 70*e**(-0.13*t)

times = [round(N(t), 1) for t in [0, 1, 5, 10, 20, 30]]
times
## [10.0, 18.5, 43.5, 60.9, 74.8, 78.6]
t = np.linspace(0, 50)

plt.plot(t, N(t))

# level at which efficiency levels off
plt.axhline(80, linestyle="--", color="red") t = symbols("t")
diff(N(t), t) # rate of change of phones after t days
## 9.1*2.71828182845905**(-0.13*t)