TExcelTAD
Home › Calculus in Depth › Exponential Functions

Exponential Functions

An exponential function f(x)=bxf(x) = b^x multiplies its value by the same factor for every unit step in xx. This lesson defines bxb^x carefully for irrational xx, collects the exponent laws, shows why exponentials eventually beat every power, and introduces the number ee as the one base whose graph has slope exactly 1 where it crosses the yy-axis.

For a first look, see Exponential and Logarithmic Functions and, for the arithmetic of exponents, Exponent Laws.

Defining bxb^x for every real xx

Fix a base b>0b > 0. The meaning of bxb^x is built up in stages:

Exponent Definition Example with b=8b = 8
positive integer nn bn=b⋅b⋅…⋅bb^n = b \cdot b \cdot \ldots \cdot b (nn factors) 82=648^2 = 64
zero b0=1b^0 = 1 80=18^0 = 1
negative integer −n-n b−n=1/bnb^{-n} = 1/b^n 8−1=1/88^{-1} = 1/8
rational p/qp/q, q>0q > 0 bp/q=(bq)pb^{p/q} = (\sqrt[q]{b})^p 82/3=22=48^{2/3} = 2^2 = 4
irrational xx the limit of brb^r over rationals r→xr \to x 82≈18.938^{\sqrt{2}} \approx 18.93

Each stage is forced by wanting the law bx+y=bx⋅byb^{x+y} = b^x \cdot b^y to keep holding. The last stage needs a fact that is proved in real analysis: for b>0b > 0 the rational powers fit together into exactly one continuous, monotone function on R\mathbb{R}. You can watch the limit being approached:

python · try it yourself
from fractions import Fraction
import math

b = 8
for digits in [1, 2, 3, 4, 6, 8]:
    r = Fraction(round(math.sqrt(2) * 10**digits), 10**digits)  # rational approximation of √2
    print(f"r = {str(r):>20}   8^r = {b ** float(r):.10f}")
print(f"{'8^√2 (library)':>24} = {b ** math.sqrt(2):.10f}")
r =                  7/5   8^r = 18.3791736800
r =              141/100   8^r = 18.7653591877
r =              707/500   8^r = 18.9220960039
r =            7071/5000   8^r = 18.9299671190
r =        707107/500000   8^r = 18.9305182197
r =    35355339/25000000   8^r = 18.9305008992
          8^√2 (library) = 18.9305009926

Better rational exponents give values that settle down to 82≈18.930508^{\sqrt{2}} \approx 18.93050, and each extra correct digit in the exponent buys roughly one more correct digit in the power.

Properties

For b>0b > 0, b≠1b \ne 1, the function f(x)=bxf(x) = b^x has domain R\mathbb{R} and range (0,∞)(0, \infty): it is never zero or negative. It is increasing if b>1b > 1 and decreasing if 0<b<10 < b < 1, every graph passes through (0,1)(0, 1), and the xx-axis is a horizontal asymptote on one side. For a,b>0a, b > 0 and all real x,yx, y:

bx+y=bx⋅bybx−y=bx/by(bx)y=bxy(ab)x=ax⋅bx\begin{aligned} b^{x+y} &= b^x \cdot b^y & b^{x-y} &= b^x / b^y \\ (b^x)^y &= b^{xy} & (ab)^x &= a^x \cdot b^x \end{aligned}

The defining feature: f(x+1)/f(x)=bf(x + 1)/f(x) = b for every xx. Linear functions add a constant amount per step; exponentials multiply by a constant factor. That is why data that grows by "3 % per month" or "doubles every 18 months" is exponential.

Exponentials beat powers

Every exponential with b>1b > 1 eventually exceeds every power function, however large the exponent. The crossover can come late, though:

python · try it yourself
from scipy.optimize import brentq
import math

for n in [2, 5, 10, 50]:
    # the last crossing of 2^x and x^n, where x ln 2 = n ln x
    g = lambda x: x * math.log(2) - n * math.log(x)
    x_star = brentq(g, n + 1, 1000)
    print(f"x^{n:<3} is overtaken by 2^x for good at x ≈ {x_star:.3f}")
x^2   is overtaken by 2^x for good at x ≈ 4.000
x^5   is overtaken by 2^x for good at x ≈ 22.440
x^10  is overtaken by 2^x for good at x ≈ 58.770
x^50  is overtaken by 2^x for good at x ≈ 438.885

In chapter 4 we will prove the limit statement behind this, xn/bx→0x^n/b^x \to 0 as x→∞x \to \infty, with l'Hospital's rule (Indeterminate Forms).

The number e

Look at the slope of y=bxy = b^x where it crosses the yy-axis. The secant slope from x=0x = 0 to x=hx = h is (bh−1)/h(b^h - 1)/h, and its limit as h→0h \to 0 depends on bb:

  • for b=2b = 2 the slope is about 0.693, for b=3b = 3 it is about 1.099;
  • some base in between gives slope exactly 1. That base is called ee.
python · try it yourself
def slope_at_zero(b, h=1e-8):
    return (b**h - 1) / h

for b in [2, 2.5, 2.7, 2.8, 3]:
    print(f"b = {b}: slope at 0 ≈ {slope_at_zero(b):.5f}")

lo, hi = 2.0, 3.0                      # bisection: find b with slope exactly 1
for _ in range(40):
    mid = (lo + hi) / 2
    lo, hi = (mid, hi) if slope_at_zero(mid) < 1 else (lo, mid)
print(f"base with slope 1 ≈ {lo:.6f}")
b = 2: slope at 0 ≈ 0.69315
b = 2.5: slope at 0 ≈ 0.91629
b = 2.7: slope at 0 ≈ 0.99325
b = 2.8: slope at 0 ≈ 1.02962
b = 3: slope at 0 ≈ 1.09861
base with slope 1 ≈ 2.718282

So e≈2.71828e \approx 2.71828, and the defining property is

lim⁡h→0eh−1h=1\lim_{h \to 0} \frac{e^h - 1}{h} = 1

This limit is the reason the derivative of exe^x is exe^x itself (Derivatives of Polynomials and Exponential Functions). The slopes printed above for other bases are in fact ln⁡b\ln b, which the next lesson explains. The function exe^x is often called the exponential function and written exp⁡(x)\exp(x).

In software

Exponentials are everywhere in code: retry back-off (wait 2k⋅base2^k \cdot \text{base} ms), compound interest, learning-rate decay, the softmax function ezi/∑ezje^{z_i} / \sum e^{z_j} in every classifier and LLM, exponential moving averages, radioactive and cache-eviction decay models, and the cost of brute-force search over 2n2^n subsets (Growth Rates and Big-O). Floating-point limits matter: math.exp(710) overflows a double, which is why softmax implementations subtract the maximum score first.

Exercises

Exercise 1: Equal bases

Solve 4x+1=8x−14^{x + 1} = 8^{x - 1}.

Answer

x=5x = 5

Solution

Write both sides as powers of 2 and compare exponents (2x2^x is one-to-one):

4x+1=22x+2,8x−1=23x−32x+2=3x−3 ⇒ x=5\begin{aligned} &4^{x + 1} = 2^{2x + 2}, \qquad 8^{x - 1} = 2^{3x - 3} \\ &2x + 2 = 3x - 3 \ \Rightarrow\ x = 5 \end{aligned}

Exercise 2: Fit an exponential through two points

Find f(x)=a⋅bxf(x) = a \cdot b^x with f(1)=6f(1) = 6 and f(3)=24f(3) = 24.

Answer

f(x)=3⋅2xf(x) = 3 \cdot 2^x

Solution
f(3)/f(1)=b2=24/6=4 ⇒ b=2(b>0)a⋅2=6 ⇒ a=3\begin{aligned} f(3)/f(1) = b^2 = 24/6 = 4 &\ \Rightarrow\ b = 2 && (b > 0) \\ a \cdot 2 = 6 &\ \Rightarrow\ a = 3 \end{aligned}

Exercise 3: Simplify with the laws

Simplify e2x⋅e−xex+1\dfrac{e^{2x} \cdot e^{-x}}{e^{x + 1}}.

Answer

e−1=1/ee^{-1} = 1/e, a constant.

Solution
e2x⋅e−x=e2x−x=exex/ex+1=ex−x−1=e−1\begin{aligned} e^{2x} \cdot e^{-x} &= e^{2x - x} = e^x \\ e^x / e^{x + 1} &= e^{x - x - 1} = e^{-1} \end{aligned}

Exercise 4: Decay below a threshold

A ranking score is multiplied by 0.9 every hour. After how many whole hours is it below half its starting value? Find the answer with a loop, then check it with logarithms.

Answer

After 7 hours (0.96≈0.5310.9^6 \approx 0.531, 0.97≈0.4780.9^7 \approx 0.478).

Solution

We need 0.9n<0.50.9^n < 0.5, that is n>ln⁡0.5/ln⁡0.9≈6.58n > \ln 0.5 / \ln 0.9 \approx 6.58, so n=7n = 7.

python · try it yourself
import math

score, hours = 1.0, 0
while score >= 0.5:
    score *= 0.9
    hours += 1
print(hours, round(score, 4), round(math.log(0.5) / math.log(0.9), 2))
7 0.4783 6.58

Exercise 5: Estimate a slope at zero

Estimate the slope of y=10xy = 10^x at x=0x = 0 using (10h−1)/h(10^h - 1)/h with h=10−6h = 10^{-6}. Compare with 1 to decide whether 10 is bigger or smaller than ee.

Answer

About 2.302588; it is greater than 1, consistent with 10>e10 > e.

Solution
python · try it yourself
h = 1e-6
print(round((10**h - 1) / h, 6))
2.302588

The slope at 0 grows with the base, and the base with slope 1 is ee. A slope above 1 means the base is larger than ee. (The exact value is ln⁡10≈2.302585\ln 10 \approx 2.302585; the small difference is the error of using h>0h > 0.)

Test yourself

What is the range of f(x)=3xf(x) = 3^x?

  1. All real numbers
  2. [0,∞)[0, \infty)
  3. (0,∞)(0, \infty)
  4. (1,∞)(1, \infty)

Which property defines the number ee?

  1. The slope of exe^x at x=0x = 0 is exactly 1
  2. e2=7e^2 = 7
  3. exe^x is never negative
  4. ee is the largest base with an inverse

A quantity grows by 5 % per step. Which model fits?

  1. f(n)=5nf(n) = 5n
  2. f(n)=f0⋅1.05nf(n) = f_0 \cdot 1.05^n
  3. f(n)=f0⋅n1.05f(n) = f_0 \cdot n^{1.05}
  4. f(n)=f0+0.05nf(n) = f_0 + 0.05n