Chapter 2

Derivatives

Limits answer the question "what does this approach?" Derivatives answer a different question: "how fast is this changing — right now, at this exact instant?" That question turns out to have a clean mathematical answer, and it is one of the most powerful ideas in all of science.

The Derivative as a Limit

Imagine glancing at a car's speedometer: it reads 60 mph. That's the instantaneous speed — the rate of change of position at that exact moment. But how is it actually computed? The speedometer estimates it by measuring how far the car travels in a tiny slice of time and dividing. The smaller the slice, the more "instantaneous" the result.

This is precisely the idea behind the derivative. The average rate of change of $f$ over the interval $[x,\, x+h]$ is:

$$\frac{f(x + h) - f(x)}{h}$$

Geometrically this is the slope of the secant line through the two points $(x,\, f(x))$ and $(x+h,\, f(x+h))$. As we shrink $h$ toward zero, those two points slide together, and the secant line rotates toward a unique limiting position: the tangent line. Its slope is the derivative:

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

This limit is the formal definition of the derivative. If it exists at $x = a$, we say $f$ is differentiable at $a$. Notice that $f'$ is itself a function — it assigns to each $x$ the slope of $f$ at that point.

Let's compute one from scratch. Take $f(x) = x^2$:

$$f'(x) = \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} = \lim_{h \to 0} \frac{2xh + h^2}{h} = \lim_{h \to 0}(2x + h) = 2x$$

So the derivative of $x^2$ is $2x$. At $x = 3$, the parabola has slope $6$. At $x = 0$, it has slope $0$ — the tangent is horizontal at the vertex.

You'll encounter several notations, all meaning the same thing: $f'(x)$, $\;\dfrac{df}{dx}$, $\;\dfrac{d}{dx}[f]$, and $\dot{f}$ (the dot notation is common in physics).

Common Derivative Rules

Computing the limit from scratch every time would be exhausting. These rules — each provable from the definition — cover nearly everything:

  • Power rule: $\dfrac{d}{dx}[x^n] = nx^{n-1}$
  • Sum rule: $\dfrac{d}{dx}[f + g] = f' + g'$
  • Product rule: $\dfrac{d}{dx}[fg] = f'g + fg'$
  • Chain rule: $\dfrac{d}{dx}[f(g(x))] = f'(g(x))\cdot g'(x)$
  • Key values: $\dfrac{d}{dx}[\sin x] = \cos x$,  $\dfrac{d}{dx}[e^x] = e^x$,  $\dfrac{d}{dx}[\ln x] = \dfrac{1}{x}$

Derivative Graphs

Once you understand that the derivative is slope, you can extract a remarkable amount of information about $f$ just by looking at its derivative graph — no algebra required.

The sign of $f'(x)$ tells you whether $f$ is rising or falling. Where $f'(x) > 0$, the tangent tilts upward — $f$ is increasing. Where $f'(x) < 0$, it tilts downward — $f$ is decreasing. Where $f'(x) = 0$, the tangent is horizontal — $f$ momentarily flattens out. The magnitude $|f'(x)|$ tells you how steep: a large $|f'|$ means the function is racing up or down; a value near zero means it's barely moving.

The second derivative $f''(x)$ is the derivative of $f'(x)$ — the rate at which the slope itself is changing. This encodes concavity:

  • $f''(x) > 0$ — the slope is increasing, so $f$ curves upward (concave up, like a bowl). The graph lies above its tangent lines.
  • $f''(x) < 0$ — the slope is decreasing, so $f$ curves downward (concave down, like a hill). The graph lies below its tangent lines.
  • $f''(x) = 0$ and changes sign — an inflection point, where the bend direction reverses.
Reading the Derivative Graph

Think of $f'$ as the "mood" of $f$. When $f'$ is large and positive, $f$ is climbing steeply. When $f'$ crosses zero from above, $f$ just peaked. When $f'$ is negative, $f$ is falling. When $f'$ bottoms out, $f$ has an inflection point. The entire story of $f$'s shape is encoded in the graph of $f'$.

Optimization & Critical Points

One of the most powerful applications of derivatives is finding where a function achieves its maximum or minimum value — a process called optimization. Engineers minimize drag. Economists maximize profit. Physicists find paths of least time. The mathematical principle behind all of these is the same: at a peak or a valley, the tangent line is horizontal, so the slope is zero.

A critical point is any $x = c$ where $f'(c) = 0$ or $f'(c)$ does not exist. Every local maximum and minimum must be a critical point — but not every critical point is a maximum or minimum. You need a test to decide.

The First Derivative Test: examine the sign of $f'$ on both sides of $c$.

  • $f'$ goes $+ \to -$ at $c$: local maximum — the function rises, then falls
  • $f'$ goes $- \to +$ at $c$: local minimum — the function falls, then rises
  • $f'$ doesn't change sign: neither — it's an inflection point with horizontal tangent (e.g., $f(x) = x^3$ at $x = 0$)

The Second Derivative Test gives a quicker answer when $f'(c) = 0$:

$$f'(c) = 0 \implies \begin{cases} f''(c) > 0 & \text{local minimum (concave up — bowl)} \\ f''(c) < 0 & \text{local maximum (concave down — hill)} \\ f''(c) = 0 & \text{inconclusive — use the first derivative test} \end{cases}$$

The intuition is clean: if the function is concave up at a flat point, you're at the bottom of a bowl — a minimum. If concave down, you're at the top of a hill — a maximum.

Inflection Points

Don't confuse critical points with inflection points. A critical point is where $f' = 0$ or is undefined — a candidate for a max or min. An inflection point is where $f''$ changes sign — where the curvature of the graph reverses direction. These can coincide (as with $x^3$ at the origin), but they are conceptually distinct. One is about slope; the other is about bending.