# Lecture 4: The Derivative as a Rate of Change

## Calculus I — Differential Calculus

---

## Learning Objectives

By the end of this lecture, students will be able to:

1. Define the derivative as the limit of a difference quotient
2. Interpret the derivative geometrically as the slope of the tangent line
3. Interpret the derivative physically as an instantaneous rate of change
4. Compute derivatives from the definition for simple functions
5. Determine where a function is differentiable and relate differentiability to continuity

---

## Lecture Content

### I. The Tangent Line Problem

Given a curve y = f(x), we want to find the slope of the line tangent to the curve at the point P = (a, f(a)). The strategy is to begin with a **secant line** through P and a nearby point Q = (a + h, f(a + h)). The slope of this secant line is the **difference quotient** [f(a + h) - f(a)] / h. As Q approaches P -- that is, as h approaches 0 -- the secant line rotates toward the tangent line. The slope of the tangent line is therefore m = lim_{h -> 0} [f(a + h) - f(a)] / h, provided this limit exists.

<image>A curve y = f(x) with a point P = (a, f(a)) marked. Three secant lines are drawn from P to points Q_1, Q_2, Q_3 that are progressively closer to P, showing how the secant lines rotate toward the tangent line as Q approaches P. The tangent line at P is drawn in bold red. Labels show the difference quotient formula [f(a+h) - f(a)]/h for the secant slope. Title: "Secant lines approaching the tangent line."</image>

### II. Definition of the Derivative

The **derivative of f at x = a** is defined as f'(a) = lim_{h -> 0} [f(a + h) - f(a)] / h, provided this limit exists. An equivalent formulation replaces a + h with x: f'(a) = lim_{x -> a} [f(x) - f(a)] / (x - a). The **derivative function** f'(x) is obtained by replacing the fixed point a with a variable x, giving f'(x) = lim_{h -> 0} [f(x + h) - f(x)] / h.

Several notations are used for the derivative: f'(x), dy/dx, df/dx, d/dx [f(x)], Df(x), and y'. The Leibniz notation dy/dx is particularly suggestive because it emphasizes the derivative as a ratio of infinitesimal changes.

### III. Computing Derivatives from the Definition

To see the definition in action, consider three examples. For f(x) = x^2, the derivative is f'(x) = lim_{h -> 0} [(x+h)^2 - x^2]/h = lim_{h -> 0} [2xh + h^2]/h = lim_{h -> 0} (2x + h) = 2x.

For f(x) = 1/x, the calculation proceeds as f'(x) = lim_{h -> 0} [1/(x+h) - 1/x]/h = lim_{h -> 0} [x - (x+h)] / [hx(x+h)] = lim_{h -> 0} -1/[x(x+h)] = -1/x^2.

For f(x) = sqrt(x), a rationalization step is needed. Writing f'(x) = lim_{h -> 0} [sqrt(x+h) - sqrt(x)]/h and multiplying numerator and denominator by [sqrt(x+h) + sqrt(x)] yields lim_{h -> 0} h / [h(sqrt(x+h) + sqrt(x))] = 1/(2*sqrt(x)).

### IV. The Derivative as an Instantaneous Rate of Change

If s(t) represents position at time t, then the **average velocity** over the interval [t, t + h] is the difference quotient [s(t + h) - s(t)] / h. The **instantaneous velocity** at time t is the limit of this expression as h approaches 0, which is precisely the derivative s'(t). More generally, the derivative f'(a) is the **instantaneous rate of change** of f with respect to x at x = a.

The units of the derivative are the units of f divided by the units of x. For instance, if s is measured in meters and t in seconds, then s'(t) has units of m/s. At its core, the derivative captures how sensitive the output is to small changes in the input. This idea appears across many fields: velocity in physics, growth rates in biology, marginal cost in economics, and reaction rates in chemistry.

<image>Panel A: A position-time graph s(t) showing a curved path, with a secant line between times t and t + h representing average velocity, and a tangent line at time t representing instantaneous velocity. Panel B: The corresponding velocity-time graph v(t) = s'(t), showing how the slope of the position graph translates to the value of the velocity graph at each time. Key points (where position has maximum slope, where velocity is zero) are aligned vertically between the two panels.</image>

### V. The Equation of the Tangent Line

At the point (a, f(a)), the tangent line has slope m = f'(a), so its equation in point-slope form is y - f(a) = f'(a)(x - a). The tangent line is the **best linear approximation** to f near x = a, a fact that will be explored more fully when we study linear approximation. The **normal line** at (a, f(a)) is perpendicular to the tangent line and has slope -1/f'(a), provided f'(a) is not zero.

### VI. Differentiability

A function f is **differentiable at a** if f'(a) exists, meaning the limit defining the derivative converges to a finite value. It is **differentiable on an open interval (a, b)** if it is differentiable at every point in that interval.

A fundamental theorem connects differentiability and continuity: if f is differentiable at a, then f is continuous at a. The contrapositive is equally useful: if f is not continuous at a, then f is not differentiable there. However, **the converse is false** -- a function can be continuous but not differentiable.

There are three common ways differentiability fails. A **corner or cusp** occurs when the left and right derivatives exist but differ, as with f(x) = |x| at x = 0, where the left derivative is -1 and the right derivative is +1. A **vertical tangent** occurs when the derivative becomes infinite, as with f(x) = x^{1/3} at x = 0. And, of course, any **discontinuity** automatically prevents differentiability.

<image>Three panels showing where differentiability fails. Panel A: f(x) = |x| with a sharp corner at the origin — left derivative = -1, right derivative = +1. Panel B: f(x) = x^{1/3} with a vertical tangent at the origin — the curve becomes infinitely steep. Panel C: A function with a jump discontinuity — the function is not continuous and hence not differentiable. Each panel shows the function graph and an annotation explaining why the derivative does not exist at the marked point.</image>
