2.2 Derivatives of Univariate Functions
A critical feature of any function is how the output changes with the changes to its inputs.
Derivatives
For a function of one variable $f(x)$, the derivative at some value $x$ may be written as $df/dx$: \({df \over dx} = \lim_{\Delta x \rightarrow 0} {f(x + \Delta x) - f(x) \over \Delta x}\) The reason we use this notation is that the $df$ refers to the vertical distance measured in the numerator, and $dx$ represents the horizontal distance in the denominator.
Visually, this means a line connecting $(x, f(x))$ and $(x + \Delta x, f(x + \Delta x))$ converges to a line tangent to the function at $(x, f(x))$ as $\Delta x \rightarrow 0$. The following diagram illustrates this for a few functions. Use the slider to bring $\Delta x$ to zero; you can also change the value of $x$ to see how the derivative changes (or doesn’t) as $x$ changes.
[ See interactive graph online at https://www.econgraphs.org/graphs/math/multivariable_calculus/derivative ]
Calculating derivatives
There are a few important rules for calculating derivatives, and examples of specific derivatives, that you should memorize:
- Constant rule: if $f(x) = c$, then $f^\prime(x) = 0$.
- Power rule: if $f(x) = x^n$, then $f^\prime(x) = nx^{n-1}$.
- Natural log rule: if $f(x) = \ln(x)$, then $f^\prime(x) = 1/x$.
- Addition rule: if $f(x) = g(x) + h(x)$, then $f^\prime(x) = g^\prime(x) +h^\prime(x)$.
- Multiplication rule: if $f(x) = g(x)h(x)$, then $f^\prime(x) = g(x)h^\prime(x) + g^\prime(x)h(x)$.
- Chain rule: if $h(x) = f(g(x))$, then $h^\prime(x) = f^\prime(g(x)) \times g^\prime(x)$.
These five rules together form many other familiar rules. For example:
- Linear functions: If $f(x) = cx$, then $f^\prime(x) = c$. This follows from the constant rule, the power rule, and the multiplication rule.
- Polynomial functions: If $f(x) = c_0 + c_1x + c_2x^2 +c_3x^3 + \cdots$, where $c_0$, $c_1$, $c_2$, $c_3$, etc. are constants, then $f^\prime(x) = c_1 + 2c_2x + 3c_3x^2 + \cdots$. This follows from the constant rule, the power rule, the multiplication rule, and the addition rule.
- Square roots: If $f(x) = \sqrt{x}$, then $f^\prime(x) = {1 \over 2\sqrt{x}}$. This is a straightforward application of the power rule for $n = {1 \over 2}$.
Inverse derivatives
As described above, the derivative $f^\prime(x)$ or $dy/dx$ is the limit of the ratio $\Delta y/\Delta x$ as $\Delta x$ gets infinitesimally small. If we invert the function — that is, solve for $x$ as a function of $y$ — then the derivative is just the inverse.
For example, let’s consider the simple function \(y = x^2\) The derivative of this is \({dy \over dx} = 2x\) If we invert the function, we get \(x = \sqrt{y}\) The derivative of this is \({dx \over dy} = {1 \over 2\sqrt{y}}\) However, note that $x = \sqrt{y}$, so this can be rewritten as \({dx \over dy} = {1 \over 2x}\) which is just the inverse of $2x$! (Likewise, you could write ${dy \over dx} = 2x = 2\sqrt{y}$, which is the inverse of ${1 \over 2\sqrt{y}}$.)
The following graph illustrates this relationship. At any point along the curve $y = x^2$, the slope of a tangent line is $2x$ (or equivalently, $2\sqrt{y}$), and the inverse slope is ${1 \over 2x}$ (or ${1 \over 2\sqrt{y}}$):
[ See interactive graph online at https://www.econgraphs.org/graphs/math/univariate_calculus/inverse_derivatives ]
Inverse derivatives have extremely important economic interpretations. For example, one type of function we’ll consider is a production function, which describes how many units of output $(q)$ are produced for a given amount of labor $(L)$, which we could write as $q(L)$. The derivative of this is called the marginal product of labor, and describes how much more output would be produced from an additional unit of labor: \(MP_L = {dq \over dL}\) However, you could also think about the inverse problem: if you wanted to produce $q$ units of output, how much labor would you need? We might call this the labor requirement function, $L(q)$. The derivative of this tells us how many additional units of labor we would need in order to produce another unit of output, $dL/dq$; which in turn, as we’ll see, affects the marginal cost of producing an additional unit of output.