10  Derivative

Speed ~ tangent!

Average speed is defined algebraically as the ratio of distance traveled to elapsed time (\(\frac{\Delta x}{\Delta t}\)). Geometrically, this ratio forms the opposite and adjacent sides of a right triangle, where the slope of the hypotenuse is given precisely by the angle’s tangent:

\[\frac{\Delta x}{\Delta t} = \frac{x(t_2) - x(t_1)}{t_2 - t_1} = \tan(\theta)\]

Figure 10.1: Equivalence of average speed, rate of change, and tangent

More generally, if a curve describing the position of a car (y-axis) as a function of time (x-axis), the speed at time \(t = 1\) and \(t = 3\) are the vertical displacement divided by the horizontal displacement (black curve and $x > 0)1. In that analogy, the speed is negative when the car drives in the opposite direction (green curve and \(\Delta x < 0\)).

More generally, if a curve describes the position of a car (\(y\)-axis) as a function of time (\(x\)-axis), the speeds at times \(t = 1\) and \(t = 3\) are calculated as the vertical displacement divided by the horizontal displacement (black curve, where \(\dfrac{\Delta x}{\Delta t}\)). In that analogy, the speed is negative when the car drives in the opposite direction (green curve, where \(\Delta x < 0\)).

Figure 10.2: Position of a moving car (y-axis) as a function of time (x-axis)

In summary, the derivative represents the ratio for an tiniest displacement—that is, the ratio between the change in the response variable and the change in the predictor variable.

Formal

2 Suppose \(f\) is a real-valued function defined around a real number \(a\). In classical geometry, the tangent line to the graph of the function \(f\) at \(a\) was the unique line through the point \((a, f(a))\) that did not meet the graph of \(f\) transversally, meaning that the line did not pass straight through the graph.

The derivative of \(y = f(x)\) with respect to \(x\) at \(a\) is, geometrically, the slope of the tangent line to the graph of \(f\) at \((a, f(a))\). The slope of the tangent line is very close to the slope of the line through \((a, f(a))\) and a nearby point on the graph, for example \((a + h, f(a + h))\). These lines are called secant lines. A value of \(h\) close to zero gives a good approximation to the slope of the tangent line, and smaller values (in absolute value) of \(h\) will, in general, give better approximations.

The slope \(m\) of the secant line is the difference between the \(y\) values of these points divided by the difference between the \(x\) values:

\[m = \frac{\Delta y}{\Delta x} = \frac{f(a + h) - f(a)}{(a + h) - a} = \frac{f(a + h) - f(a)}{h}\]

This expression is Newton’s difference quotient. Passing from an approximation to an exact answer is done using a limit. Geometrically, the limit of the secant lines is the tangent line. Therefore, the limit of the difference quotient as \(h\) approaches zero, if it exists, represents the slope of the tangent line to \((a, f(a))\). This limit is defined to be the derivative of the function \(f\) at \(a\):

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

When the limit exists, \(f\) is said to be differentiable at \(a\). Here \(f'(a)\) is one of several common notations for the derivative.

Examples

  • Derivative of a Constant Function: The derivative of a constant function is zero. Building on the geometric concept illustrated in Figure 10.2, an immobile car is represented by a horizontal line (\(x(t) = c\)). In this case, the change in position (\(\Delta x = x(t_2) - x(t_1)\)) is zero, the speed is zero, and the derivative for any time interval.

  • Derivative of a Linear Function: Recall that the equation of a line is \(y = ax + b\). In secondary school, the slope parameter \(a\) is computed as: \[a = \frac{y(x_2) - y(x_1)}{x_2 - x_1}\] This is simply the vertical displacement divided by the horizontal displacement. Because the rate of change is uniform across a straight line, any arbitrary pair of points \(\{x_1, x_2\}\) yields the exact same slope. Consequently, the derivative of a linear function is constant everywhere: \[\frac{d}{dx}(ax + b) = a\]

  • Three Intuitive Interpretations of the Sign of the Derivative: Assuming \(x_2 > x_1\) (a small step to the right so that the denominator \(\Delta x > 0\) is strictly positive):

    • Positive Derivative (\(f'(x) > 0\)): If \(f(x_2) > f(x_1)\), the numerator is positive and the function is increasing (for example, a child’s height increasing over time).
    • Negative Derivative (\(f'(x) < 0\)): If \(f(x_2) < f(x_1)\), the numerator is negative and the function is decreasing (for example, body fat percentage decreasing as exercise intensity increases).
    • Zero Derivative (\(f'(x) = 0\)): When \(f(x_2) = f(x_1)\) over an tiniest interval, the numerator is zero. This critical condition occurs at three key geometric features: a local maximum, a local minimum, or a horizontal inflection point.
  • Below is a graphical representation of the derivative interpreted as the slope of the tangent line at different points along a curve (Figure 10.3).

    Figure 10.3: Correspondance between the property of the function and the sign of the derivative (slope of the tangent)
  • A horizontal inflection point is shown below. However, this is a very special case. In practice, a zero derivative (\(f'(x) = 0\)) almost always indicates a local maximum or a local minimum.

    Figure 10.4: A derivative is zero but no maximum or minimun.

Tips and warnings

  • The derivative evaluated at a specific point \(x = a\), denoted \(f'(a)\), yields a single numerical value representing the instantaneous rate of change at that precise location. In contrast, the general derivative \(f'(x)\) is itself a function of \(x\), providing a rule to calculate the instantaneous rate of change at any arbitrary point \(a\).

  • In standard introductory mathematics, the independent variable is almost always assumed to be \(x\), which is implicitly understood when writing \(f'\). However, applied modeling often involves functions of multiple parameters (e.g., time above) or variables where explicitly specifying the independent variable is essential.

    For example, consider the exponential function \(x(t, \lambda) = e^{-\lambda t}\). Using Leibniz notation (see below), we can explicitly specify the variable with respect to which we are differentiating:

    • \(\dfrac{dx}{dt} = -\lambda e^{-\lambda t}\) represents the derivative with respect to time \(t\).
    • \(\dfrac{dx}{d\lambda} = -t e^{-\lambda t}\) represents the derivative with respect to the parameter \(\lambda\).
  • Correspondence Between Function Behavior and the Sign of the Derivative(Figure 10.5):

    • Increasing Region (Green): On the domain highlighted in green (\(x < 0\)), the derivative is strictly positive (\(f'(x) > 0\), orange curve above zero), causing the original function (blue line) to increase.
    • Decreasing Region (Red): Conversely, on the domain highlighted in red (\(x > 0\)), the derivative is negative (\(f'(x) < 0\), orange curve below zero), and the function decreases.
    • Critical & Inflection Points (Orange Highlights):
      • Local Maximum: At \(x = 0\), the derivative vanishes (\(f'(0) = 0\)), corresponding to the peak (local maximum) of the function.
      • Steepest Growth & Decay: The maximum of the derivative curve (highest orange point at \(x = -1\)) marks the point of steepest ascent (inflection point) for the function. The minimum of the derivative curve (lowest orange point at \(x = 1\)) marks the point of steepest descent.
Figure 10.5: Correspondence between the monotonicity of a function \(f(x)\) (blue) and the sign of its derivative \(f'(x)\) (orange).
  • The concept of a derivative is strictly defined for continuous functions whose domain spans a continuous interval, typically within the real numbers \(\mathbb{R}\) (see Chapter 3). For functions defined over discrete sets, the instantaneous derivative is undefined; however, one can still evaluate discrete rates of change (slopes) between points, though these do not represent tiniest displacements.

  • Symbolic computation engines and free online platforms (such as WolframAlpha) can automatically calculate the exact derivative of virtually any explicit mathematical function.

Notation/Semantic/Terminology

  • Notational Conventions for Derivatives: Common notations for the first derivative include \(\frac{df}{dt}\), \(f'\), and \(\dot{f}\):
    • Newton’s Notation (\(\dot{f}\)): Uses a dot over the function symbol and is primarily used in physics and dynamics to denote differentiation with respect to time \(t\).
    • Lagrange’s Notation (\(f'\)): Uses a prime mark to denote the derivative. While concise, it leaves the independent variable implicit.
    • Leibniz’s Notation (\(\frac{df}{dt}\)):Though requiring more characters, Leibniz notation is the most explicit. It visually preserves the derivative’s origin as a ratio of differential displacements (\(d\)), while clearly identifying both the dependent variable in the numerator and the independent variable of differentiation in the denominator.
  • Higher-Order Derivatives: The second derivative is denoted by \(\frac{d^2 f}{dt^2}\) (Leibniz), \(f''\) (Lagrange), or \(\ddot{f}\) (Newton). Generalizing to the \(n\)-th derivative, the standard notations are \(\frac{d^n f}{dt^n}\) (Leibniz) and \(f^{(n)}\) (Lagrange, where parenthesized superscripts distinguish differentiation from exponents).

  1. Notice here that \(x\) can also be the response variable, it is just a notation↩︎

  2. Simplified from: Wikipedia — Derivative (Definition: As a limit)↩︎