MATH 150 · Mathematics for Economics I
Derivatives of Exponentials and Logarithms
Find derivatives of e to the x and the natural log, and see why a growth rate is simply the derivative of a logarithm.
Key takeaways
- The function eˣ is its own derivative, so its slope at every point equals its height.
- For an exponential with rate r, the derivative equals r times the function, which means the growth rate is constant.
- The derivative of the natural logarithm of x is 1 divided by x.
- The chain rule extends both results, giving derivatives of e raised to a function and of the log of a function.
- The growth rate of a variable is the derivative of its logarithm, so growth rates of products add and growth rates of ratios subtract.
Nina has a savings account that pays interest continuously. Every instant, a sliver of interest lands in the account. She notices something that sounds like a riddle: the faster her balance is growing, the bigger her balance must be. And the bigger her balance, the faster it grows.
If you stare at that for a while, you can see the shape of the curve. Its rate of growth is proportional to its own height. A function that has this property is the exponential function, and it has the single most elegant derivative in all of calculus: it is its own derivative.
This lesson explains that fact, introduces the matching derivative for the natural logarithm, and shows why economists treat a growth rate as the derivative of a logarithm. After it, you can read statements like "output grows at 3% a year" with real understanding of what is under them.
The special number e
In exponential growth and compounding we met the number e ≈ 2.71828 as the limit of compounding more and more often. In logarithms and growth rates we used its logarithm, ln.
Why is e so special? Take any base a above zero and look at aˣ. Its derivative turns out to be
d/dx of aˣ = aˣ × ln(a) So the slope of aˣ is always the function itself, multiplied by the constant ln a. For base 2, the constant is ln 2 ≈ 0.693. For base 10, it is ln 10 ≈ 2.303. For base e, ln e = 1, so the constant disappears.
d/dx of eˣ = eˣ That is the reason for choosing e: it is the base that makes the constant equal to one.
Test it with 2ˣ at x = 3. The formula gives 2³ × 0.693 = 8 × 0.693 = 5.545. Now a numerical check with a step of 0.001: 2^3.001 = 8 × 2^0.001 = 8 × 1.000693 = 8.005545. The change is 0.005545, and dividing by 0.001 gives 5.545. It agrees.
For eˣ, look at a few points:
| x | Height eˣ | Slope eˣ |
|---|---|---|
| 0 | 1.000 | 1.000 |
| 1 | 2.718 | 2.718 |
| 2 | 7.389 | 7.389 |
| 3 | 20.086 | 20.086 |
At each marked point the steepness of the curve equals its height.
Exponential growth over time
Now put time in the exponent. For a quantity with a constant growth rate r, written as a decimal, the continuous growth model is
A(t) = A₀ × e^(r t) Use the chain rule from the previous lesson. The outer function is e raised to u, whose derivative is e raised to u. The inner function is rt, whose derivative is r.
dA/dt = A₀ × e^(r t) × r = r × A(t) So the rate of growth is r times the current amount. That is the riddle's answer. The ratio of the growth rate to the amount, (dA/dt) / A, equals r, and it is the same at every moment. That is what "constant growth rate" means.
Nina's balance is B(t) = 1,000 × e^(0.04t), growing at 4% continuously.
B′(t) = 0.04 × B(t)
At t = 0: B = 1,000.00, B′ = $40.00 per year
At t = 10: B = 1,000 × e^0.4 = 1,491.82, B′ = $59.67 per year After a decade, the balance is bigger, so it grows faster in dollars. In percentage terms it is still exactly 4%.
Note one subtlety. "4% continuously compounded" is not quite the same as "4% a year compounded yearly." Over a full year, e^0.04 = 1.0408, an effective rate of 4.08%. The two agree only roughly. Always check which one a statement means.
Bigger balance, faster growth in dollars, constant growth in percent.
Decay and discounting
If r is negative, the same formula describes decay. A present value that shrinks as the payment date recedes is a case. For $1,000 due t years away, discounted continuously at 5%,
PV(t) = 1,000 × e^(−0.05t)
PV′(t) = −0.05 × PV(t) At t = 10, PV = 1,000 × e^−0.5 = $606.53. The derivative is −0.05 × 606.53 = −$30.33 per year. Each added year of waiting costs about $30 of present value at that point, a loss of 5% of what is left. This is the continuous version of the arithmetic in discounting and present value.
The derivative of the natural logarithm
Next, ln x. Because ln and e undo each other, their slopes are linked. Look at the picture of ln x from the earlier lesson: it rises quickly for small x, then flattens. So its slope should be big for small x and small for big x. The result:
d/dx of ln(x) = 1 / x Check it with numbers. At x = 2, the slope should be 0.5. Compute ln(2.001) − ln(2) = ln(1.0005) ≈ 0.00049988. Divide by 0.001 and you get 0.49988, which is about 0.5.
Here is the reasoning in brief. Let y = ln x, so x = eʸ. Differentiate both sides with respect to x. On the left you get 1. On the right, using the chain rule, you get eʸ × dy/dx, which is x × dy/dx. So 1 = x × dy/dx and dy/dx = 1/x.
| Function | Derivative |
|---|---|
| eˣ | eˣ |
| e^(g(x)) | e^(g(x)) × g′(x) |
| ln x | 1 / x |
| ln (g(x)) | g′(x) / g(x) |
| aˣ | aˣ ln a |
| ln(x) with a constant multiple, like 5 ln x | 5 / x |
Examples with the chain rule:
d/dx of e^(3x) = 3e^(3x)
d/dx of e^(−x²) = −2x e^(−x²)
d/dx of ln(5x) = 5 / (5x) = 1 / x
d/dx of ln(x² + 1) = 2x / (x² + 1) Notice the second to last. ln(5x) = ln 5 + ln x by the product rule for logs, and ln 5 is a constant. So the derivative is 1/x either way. Taking a log first can make a hard derivative easy.
Growth rates are log derivatives
Take any positive quantity y that changes over time. Its growth rate at a moment is the fractional rate of change:
growth rate = (dy/dt) / y Now differentiate ln y with respect to t, using the chain rule:
d/dt of ln y = (1/y) × (dy/dt) = (dy/dt) / y The two are identical. So the growth rate of y is the derivative of its log. That is why economists work with logs so often: a chart of ln y over time has a slope equal to the growth rate.
This delivers some quick rules that appear everywhere.
- Products. If R = P × Q, then ln R = ln P + ln Q, so the growth rate of R is the growth rate of P plus the growth rate of Q.
- Ratios. If w = W / P, then ln w = ln W − ln P, so real wage growth is wage growth minus price growth.
- Powers. If Y = Kᵃ, then ln Y = a ln K, so the growth rate of Y is a times the growth rate of K.
The last one is useful with the production function Q = 20 × K^½ × L^½. Then ln Q = ln 20 + ½ ln K + ½ ln L. If capital grows 4% and labor grows 2%, output grows about ½ × 4 + ½ × 2 = 3%.
A worked example: an economy and its growth
An economy has output Y(t) = 500 × e^(0.03t), in billions of dollars, with t in years from now. Let's study it.
Step 1: Output now and in ten years.
Y(0) = 500
Y(10) = 500 × e^0.3 = 500 × 1.34986 = 674.93 Step 2: Rate of change.
Y′(t) = 0.03 × 500 × e^(0.03t) = 15 e^(0.03t)
Y′(0) = 15 billion dollars per year
Y′(10) = 15 × 1.34986 = 20.25 billion per year Step 3: Growth rate.
Y′/Y = 0.03 at every date Confirm for t = 10: 20.25 / 674.93 = 0.0300.
Step 4: Through logs. ln Y = ln 500 + 0.03t. Its derivative is 0.03, a constant. This is the cleanest route.
Step 5: Doubling time. Solve 2 = e^(0.03t). Take logs: t = ln 2 / 0.03 = 0.6931 / 0.03 = 23.1 years. This is the rule of 70 in precise form: 70 / 3 ≈ 23.3.
Step 6: Suppose population grows at 1% a year. Output per person is Y / N, so its growth rate is 3% − 1% = 2%. Check: ln(Y/N) has derivative 0.03 − 0.01.
The same logic powers the discussion of living standards in economic growth and the rule of 70. Real countries do not grow at fixed rates, so any such model is a first sketch.
Converting between rate types
Economists often need to translate between a yearly compound rate g (what a report states) and a continuous rate r (what the model uses). The link comes from setting the two growth factors equal over one year:
1 + g = e^r so r = ln(1 + g) For g = 4%, r = ln 1.04 = 0.03922. For g = 10%, r = ln 1.10 = 0.09531. The gap between g and r widens as rates rise. For g = 100%, r = ln 2 = 0.693, which is why a doubling each year is only a 69% continuous rate.
Going the other way, g = e^r − 1. A continuous rate of 3% means a yearly compound rate of e^0.03 − 1 = 3.045%.
Does the choice matter? For small rates, hardly at all, which is why people use the two interchangeably in casual talk. For large rates, such as the 20 percent a month price rises seen during a hyperinflation, it matters a great deal. The log version has a particular charm: a series of log growth rates adds up across periods, while yearly compound rates must be multiplied.
Here is a quick example. A price index rises 2% in the first year, 3% in the second and 4% in the third. The three-year compound factor is 1.02 × 1.03 × 1.04 = 1.0926. In logs, 0.0198 + 0.0296 + 0.0392 = 0.0886, and e^0.0886 = 1.0926. The same answer by a simpler sum.
Utility and the logarithm
Economists sometimes use u = ln(c), where c is consumption, to describe how satisfaction rises with spending. Its derivative is marginal utility:
u′(c) = 1 / c At c = 10 (thousand dollars), marginal utility is 0.10. At c = 100, it is 0.01. Ten times as much consumption gives one tenth the added satisfaction per dollar. This captures the common sense idea that the first thousand dollars matter more to a person than the hundredth thousand.
It also has a pleasing property: equal percentage changes in consumption give equal changes in utility. A 10% rise from 10 gives ln 11 − ln 10 = 0.0953, and a 10% rise from 100 gives ln 110 − ln 100 = 0.0953. The same.
Each extra dollar adds less satisfaction as spending rises. Hypothetical example: the numbers are made up to show the method, not a quote or an average.
A glimpse of elasticity
Economists want to know how strongly one variable responds to another in percentage terms, regardless of units. Logs deliver this. If ln Q is a straight-line function of ln P, say
ln Q = 6 − 1.5 ln P then the slope, d ln Q / d ln P, is −1.5. A 1% rise in price goes with a 1.5% fall in quantity. The slope in logs is an elasticity: the percentage response of quantity to a percentage change in price. It does not depend on whether you count in dollars or cents, dozens or single bagels.
Undo the logs to see the demand curve itself: Q = e⁶ × P^(−1.5), a power function like the ones in exponents and powers. The exponent on P is the elasticity. We build the full tool in the elasticity lesson, and the intuition is already in your hands: percentages become slopes of log graphs.
The common mistake: using the power rule on an exponential
The function eˣ is not a power of x. The variable is in the exponent. Applying the power rule gives x × e^(x−1), which is wrong. The correct derivative is eˣ.
Equally, 2ˣ has derivative 2ˣ × ln 2, not x × 2^(x−1).
Other slips to avoid:
- Forgetting the inner derivative. The derivative of e^(3x) is 3e^(3x). Dropping the 3 loses a factor.
- Writing d ln x = x. It is 1/x. The reciprocal is easy to flip.
- Splitting a log of a sum. ln(x² + 1) is not 2 ln x + ln 1. Differentiate it with the chain rule: 2x / (x² + 1).
- Mixing rate types. A growth rate in a model with e^(rt) is a continuous rate. A reported 4% annual figure may be a yearly compound rate, and you convert with ln(1.04) ≈ 0.0392.
One more matter of good habit: say what t is measured in. A rate of 0.03 per year is 0.0025 per month, and mixing them up makes a model off by a factor of twelve.
Words to know
Natural exponential function the function eˣ, whose derivative is itself.
Continuous growth rate the rate r in the model A = A₀ e^(rt), the fraction of the amount gained per unit of time.
Growth rate the rate of change of a variable divided by the variable.
Log derivative the derivative of the natural logarithm of a variable, which equals its growth rate.
Marginal utility the added satisfaction from one more unit of consumption.
Decay continuing decrease at a rate proportional to the current amount.
Check yourself
- Differentiate y = 5e^(2x).
- Differentiate y = ln(x³).
- A balance is B(t) = 2,000 × e^(0.05t). Find B′(0) and the growth rate.
- Prices grow 3% a year and nominal wages grow 5%. By about how much do real wages grow?
- If u = ln(c), find the marginal utility at c = 25.
- Explain why the growth rate of a variable equals the derivative of its logarithm.
Show the answers
- y′ = 5 × 2 × e^(2x) = 10e^(2x).
- Using ln(x³) = 3 ln x gives y′ = 3/x, which also follows from the chain rule: 3x² / x³.
- B′(t) = 0.05 × B(t), so B′(0) = 0.05 × 2,000 = $100 per year, and the growth rate is 5%.
- Real wage growth is about 5% − 3% = 2%.
- u′(25) = 1/25 = 0.04.
- By the chain rule, d(ln y)/dt = (1/y) × dy/dt, which is the rate of change of y divided by y, the definition of its growth rate.