Skip to main content

3  Derivatives, Elasticity, and Limit Methods

This section develops derivative rules, elasticity concepts, and limit tools such as L’Hopital’s rule. The goal is to connect calculus mechanics with economic interpretation and approximation methods.

3.1 Derivative Rules

3.1.1 The product rule

There is a number of rules for taking derivatives derivative rules in one variable calculus. All derivative rules are built on the product rule and the chain rule.

The product rule states that if \(u\) and \(v\) are differentiable, then the derivative of their product \(h(x) = u(x)v(x)\) is given by:

\[ h'(x) = u'(x)v(x) + u(x)v'(x) \]

We prove the product rule, by applying the definition of derivative several times:

\[\begin{align} h'(x) &= \lim_{h\to 0} \frac{h(x+h) - h(x)}{h}\\ &= \lim_{h\to 0} \frac{u(x+h)v(x+h) - u(x)v(x)}{h}\\ &= \lim_{h\to 0} \frac{u(x+h)v(x+h) - u(x)v(x+h) + u(x)v(x+h) - u(x)v(x)}{h}\\ &= \lim_{h\to 0} \frac{(u(x+h) - u(x))v(x+h) + u(x)(v(x+h) - v(x))}{h}\\ &= \lim_{h\to 0} \frac{u(x+h) - u(x)}{h} v(x+h) + u(x) \lim_{h\to 0} \frac{v(x+h) - v(x)}{h}\\ &= u'(x)v(x) + u(x)v'(x) \end{align}\]

3.1.2 Quotient rule and power rule

If \(v(x)\ne 0\), the product rule delivers the quotient rule:

\[ \left(\frac{u(x)}{v(x)}\right)' = \left(u(x)v(x)^{-1}\right)' = u'(x)v(x)^{-1} + u(x)(-1)v(x)^{-2}v'(x) = \frac{u'(x)v(x) - u(x)v'(x)}{v(x)^2} \]

For a positive integer \(n\), the product rule delivers the power rule:

\[ \left(u(x)^n\right)' = \left(u(x)u(x)^{n-1}\right)' = u'(x)u(x)^{n-1} + u(x)(n-1)u(x)^{n-2}u'(x) = nu'(x)u(x)^{n-1} \]

3.1.3 The chain rule

The chain rule states that if we have two functions \(f(x)\) and \(g(x)\), then the derivative of their composition \(h(x) = f(g(x))\) is given by:

\[ \left(f(g(x))\right)' = f'(g(x))g'(x) \]

To see why the chain rule holds, let \(\Delta g=g(x+h)-g(x)\). Differentiability of \(f\) at \(g(x)\) gives

\[ f(g(x+h))-f(g(x))=f'(g(x))\Delta g+o(|\Delta g|). \]

Since \(\Delta g/h\to g'(x)\), dividing by \(h\) and taking the limit yields the chain rule. If \(\Delta g=0\), the change in \(f(g(x))\) is also zero.

3.1.4 The log rule

For \(x>0\), the derivative of the natural logarithm function is given by:

\[ \frac{d\ln x}{dx} = \frac{1}{x} \]

By the definition of derivative, and using the property of log we have:

\[\begin{align} \frac{d\ln x}{dx} &= \lim_{h\to 0} \frac{\ln(x+h) - \ln(x)}{h}\\ &= \lim_{h\to 0} \frac{\ln\left(\frac{x+h}{x}\right)}{h}\\ &= \lim_{h\to 0} \frac{\ln\left(1 + \frac{h}{x}\right)}{h}\\ &= \lim_{h\to 0} \frac{\ln\left(1 + \frac{h}{x}\right)}{\frac{h}{x}} \cdot \frac{1}{x}\\ &= \frac{1}{x} \end{align}\]

The second to the last step uses the fact that \(\lim_{u\to 0} \frac{\ln(1+u)}{u} = 1\). You might want to use l’Hôpital’s rule to prove this limit, but that would be circular reasoning. So one can use the squeeze theorem to prove this limit.

3.1.5 The exponential rule

The derivative of the exponential function is given by:

\[ \frac{d e^x}{dx} = e^x \]

By the definition of derivative, and using the property of exponential function we have:

\[\begin{align} \frac{d e^x}{dx} &= \lim_{h\to 0} \frac{e^{x+h} - e^x}{h}\\ &= \lim_{h\to 0} \frac{e^x e^h - e^x}{h}\\ &= e^x \lim_{h\to 0} \frac{e^h - 1}{h}\\ &= e^x \cdot 1\\ &= e^x \end{align}\]

The second to the last step uses the fact that \(\lim_{h\to 0} \frac{e^h - 1}{h} = 1\). You might want to use l’Hôpital’s rule to prove this limit, but that would be circular reasoning. So we can use a squeeze theorem to prove this limit.

3.2 Derivative and elasticity

3.2.1 Derivative

The limiting definition of derivative is:

\[ f'(x) = \lim_{h\to 0} \frac{f(x+h) - f(x)}{h} \]

3.2.2 Elasticity

The definition of elasticity is percentage change in \(f(x)\) given percentage change in \(x\). Let \(h\) be the change in \(x\), we have:

\[ \text{Elasticity} = \frac{\frac{f(x+h) - f(x)}{f(x)}}{\frac{h}{x}} = \frac{x}{f(x)} \cdot \frac{f(x+h) - f(x)}{h} \]

Taking the limit as \(h \to 0\), we get the point elasticity:

\[ \text{Elasticity at } x = \lim_{h \to 0} \frac{x}{f(x)} \cdot \frac{f(x+h) - f(x)}{h} = \frac{x}{f(x)} f'(x) \]

3.2.3 Log derivation of elasticity

Elasticity is also the derivative of \(\log(f(x))\) with respect to \(\log(x)\).

Let \(y = f(x)\). Then:

\[ \text{Elasticity} = \frac{d \log(f(x))}{d \log(x)} \]

From the chain rule, we know that given function \(y = g(h(x))\), the derivative of \(y\) with respect to \(x\) is:

\[ \frac{dy}{dx} = \frac{dy}{dh} \cdot \frac{dh}{dx} \]

Let \(y = log(f(x))\) and let \(h = \log(x)\), then we have:

\[ \begin{aligned} \frac{d \log(f(x))}{d \log(x)} &= \frac{d \log(f(x))}{dx} \cdot \frac{dx}{d \log(x)}\\ \frac{d \log(f(x))}{d \log(x)} &= \frac{ \frac{d \log(f(x))}{dx}}{ \frac{d \log(x)}{dx} } \end{aligned} \]

Taking both derivatives, we have:

\[ \frac{ \frac{d \log(f(x))}{dx}}{ \frac{d \log(x)}{dx} } = \frac{ \frac{1}{f(x)} f'(x) }{ \frac{1}{x} } = \frac{x}{f(x)} f'(x) \] This matches the earlier definition of point elasticity.

3.3 Implicit Differentiation

3.3.1 Mixture, quantiles, and implicit differentiation

From Sorensen, Wang, and Zytek (2026):

There is some distribution represented by cumualative distribution function \(F(q)\), which is a mixture of two distributions \(F_1(q)\) and \(F_r(q)\). \(q_\tau\) is the \(\tau\) quantile of the mixture distribution. The mixture distribution is defined as:

\[ \tau=F(q_\tau)= \omega_1 F_1(q_\tau)+(1-\omega_1 ) F_r(q_\tau) \]

Suppose we are looking at the wage distribution, and suppose group one is the wage distribution for immigrations, and group \(r\) is the wage distribution for natives. Then \(\omega_1\) represents the share of immigrants in the population.

Suppose \(F_1(5) = 0.5\), and \(F_r(5) = 0.25\), and suppose that \(\omega_1 = 0.1\). Then \(F(5) = 0.1 \cdot 0.5 + 0.9 \cdot 0.25 = 0.275\). This means that 50 percent of immigrants earn less than 5, and 25 percent of natives earn less than 5, and overall, 27.5 percent of the population earns less than 5.

We are interested in the marginal effect of a shift in \(\omega_1\) on the \(\tau\) quantile of the mixture distribution. Assume \(F_1\) and \(F_r\) are continuously differentiable, with corresponding densities \(f_1\) and \(f_r\), and that the mixture density is positive at \(q_\tau\). Holding \(\tau\) fixed and applying the chain rule gives:

\[ 0=[ F_1(q_\tau)-F_r(q_\tau)]+[\omega_1 f_1(q_\tau)+ (1-\omega_1 ) f_r(q_\tau)]\frac{dq_\tau }{d \omega_1} \]

Note that \(f(q_\tau)=\omega_1 f_1(q_\tau)+ (1-\omega_1 ) f_r(q_\tau)\) is the density of the mixture distribution evaluated at \(q_\tau\). So we have, after moving terms around: \[ \frac{dq_\tau }{d \omega_1}=\frac{[F_r(q_\tau)-F_1(q_\tau)]}{f(q_\tau)} \]

When wage is equal to 5, which is the 27.5th percentile of the overall wage distribution, the numerator is \(F_r(5)-F_1(5)=0.25-0.5=-0.25\), so \(\frac{dq_\tau}{d\omega_1}=-\frac{0.25}{f(5)}\). This indicates that an increase in the share of immigrants in the population would decrease the 27.5th percentile of the overall wage distribution. Given sufficient sample size, we can compute accurately the distributions of \(F_1\) and \(F_r\) at any quantiles of interest, and we can approximate the density of the mixture distribution at any quantile of interest.

3.4 L’Hôpital’s rule and average cash holding at zero interest rate

3.4.1 L’Hôpital’s rule

The L’Hôpital’s rule states that:

Suppose \(f(x)\) and \(g(x)\) are functions differentiable on an open interval containing \(a\) (except possibly at \(a\) itself), and \(g'(x) \neq 0\) near \(a\). If

\[ \lim_{x \to a} f(x) = 0 \quad \text{and} \quad \lim_{x \to a} g(x) = 0 \]

or

\[ \lim_{x \to a} |f(x)| = \infty \quad \text{and} \quad \lim_{x \to a} |g(x)| = \infty, \]

and the limit

\[ \lim_{x \to a} \frac{f'(x)}{g'(x)} \]

exists (or is \(\pm\infty\)), then

\[ \lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}. \]

For L’Hôpital’s rule to be applicable, both the numerator and denominator must approach \(0\) (“0/0” form) or both must approach infinity (“\(\infty/\infty\)” form) as \(x \to a\). If only the denominator approaches zero and the numerator does not, the limit typically diverges to infinity or does not exist, and L’Hôpital’s rule cannot be used.

3.4.2 Example application of L’Hôpital’s rule

Consider the limit: \[ \lim_{x \to 0} \frac{\sin x}{x} \] As \(x \to 0\), both the numerator \(\sin x \to 0\) and the denominator \(x \to 0\), so the limit is of the indeterminate form \(0/0\). We can apply L’Hôpital’s rule:

Take derivatives of the numerator and denominator with respect to \(x\): - Numerator:\(\frac{d}{dx} \sin x = \cos x\) - Denominator:\(\frac{d}{dx} x = 1\)

Apply L’Hôpital’s rule: \[ \lim_{x \to 0} \frac{\sin x}{x} = \lim_{x \to 0} \frac{\cos x}{1} = \cos 0 = 1 \]

Therefore, \[ \lim_{x \to 0} \frac{\sin x}{x} = 1 \]

3.4.3 Interest rate at zero and applying L’Hôpital’s rule twice

Consider the following equation, which comes a continuous time cash accounting problem. In the problem, an individual has \(x_{\tau}\) dollars in pocket to support flow consumption \(c\).\(x_{\tau}\) decreases towards zero, and we want to know the average level of \(x_{\tau}\) between withdrawals. We start at time \(t=0\), and know that at \(\tau=t\), \(x_{\tau} = 0\) (next withdraw happens).

There is an interest rate on cash, \(r\). If this is negative, that means as money stays in pocket, it loses value due to “leakage”. If the interest rate is positive, money in your pocket grows (maybe you are lending continuously to others to earn interests the cash you have before it’s needed for consumption).

The average cash in pocket between withdrawals is:

\[ \frac{c \left(r t + \exp(-r t) - 1\right)}{r^2 t} \]

We need to know the average cash holding value at zero interest rate, \(r=0\). This is useful for several reasons:

  1. Check if our formula is correct, if it is, we should not have jump at zero, but average cash holding should be smooth across levels of interest rate negative to zero to positive.
  2. Maybe the interest rate is zero, so we need to have value at zero.
  3. Value at zero might have simple algebraic form that is easy to interpret, and help understand results deviating away from zero.

But we can not evaluate the function at \(r=0\) directly. To see why L’Hôpital’s rule applies, let’s check the numerator and denominator as \(r \to 0\):

  • Numerator: As \(r \to 0\), \(r t \to 0\) and \(\exp(-r t) \to 1\), so \(r t + \exp(-r t) - 1 \to 0 + 1 - 1 = 0\).
  • Denominator:\(r^2 t \to 0\) as \(r \to 0\).

Both numerator and denominator approach zero, so the limit is of the indeterminate form \(0/0\) and L’Hôpital’s rule can be applied.

So we proceed to evaluate the limit as \(r \to 0\), using L’Hôpital’s rule. Note that we will be using derivative, not to find the marginal effect of interest rate on average cash holding, but to evaluate the level of average cash holding at zero interest rate. The average formula we have is the solution to an integral, so we are using derivatives to help evaluate an integral at a particular point.

Below, we actually apply L’Hôpital’s rule twice, because the first application still gives us a \(0/0\) form.

\[\begin{align} & \lim_{r \to 0} \frac{c \cdot r \cdot t + (c ) \cdot (\exp(-r \cdot t) - 1)}{(r)^2 \cdot t} \\ =& \lim_{r \to 0} \frac{c \cdot t - (c ) \cdot \exp(-r \cdot t) \cdot t}{2 \cdot (r) \cdot t} \\ =& \lim_{r \to 0} \frac{(c ) \cdot \exp(-r \cdot t) \cdot t^2}{2 \cdot t} \\ =& \lim_{r \to 0} \frac{(c ) \cdot \exp(-r \cdot t) \cdot t}{2} \\ =& (c ) \cdot \frac{t}{2} \end{align}\]

We arrive at a very simple formulation. When the interest rate is zero, average cash holding is consumption multiplied by the time between withdrawals and divided by two. This is a standard Baumol-Tobin cash-inventory result (Baumol 1952; Tobin 1956).