Learning Objectives
By the end of this section, you will be able to:
- Understand that the derivative is not just a number at one point, but a new function that outputs slopes at every point
- Define the derivative function formally using limit notation
- Use different notations for the derivative (Leibniz, Lagrange, Newton)
- Compute derivative functions from the limit definition
- Analyze where a function is increasing or decreasing using the sign of its derivative
- Sketch the graph of a derivative given the graph of a function
- Connect the derivative function to gradient computations in machine learning
The Big Picture: A Function That Outputs Slopes
"The derivative transforms one function into another, mapping each input to the slope of the original at that point."
In the previous section, we learned how to compute the derivative at a single point . This gave us the instantaneous rate of change — the slope of the tangent line — at that specific location.
But here's the crucial insight: we can compute this slope at every point where the function is differentiable. Instead of asking "What is the slope at ?", we can ask "What is the slope at any point x?"
The answer is a new function — the derivative function .
The Key Conceptual Shift
Before: The derivative at a point is a number (the slope at that point)
Now: The derivative function is a function that outputs slopes for any input
From Number to Function: The Derivative Transformation
Consider the function . In the previous section, we computed:
- (slope at )
- (slope at )
- (slope at )
Notice the pattern: the derivative at seems to always equal . This suggests that the derivative function is:
This is a complete function in its own right! You can evaluate it at any point:
| x | f(x) = x² | f'(x) = 2x | Interpretation |
|---|---|---|---|
| -2 | 4 | -4 | Tangent slopes down (steep) |
| -1 | 1 | -2 | Tangent slopes down |
| 0 | 0 | 0 | Horizontal tangent (minimum!) |
| 1 | 1 | 2 | Tangent slopes up |
| 2 | 4 | 4 | Tangent slopes up (steep) |
What the Derivative Function Tells Us
The derivative function encodes all the slope information about the parabola :
The function is decreasing.
(For x < 0)
Potential maximum or minimum.
(At x = 0)
The function is increasing.
(For x > 0)
Formal Definition: The Derivative Function
We now extend our definition from a single point to all points where the limit exists:
Definition: The Derivative Function
The derivative of is the function whose value at is:
The domain of consists of all values of for which this limit exists.
Understanding the Definition
Note the key difference from the previous section:
| Expression | Type | Meaning |
|---|---|---|
| f'(a) | Number | The slope at the specific point x = a |
| f'(x) | Function | A rule that gives the slope at any point x |
The variable in is a "free variable" — it can take any value in the domain of .
When Does f'(x) Exist?
The derivative function may have a smaller domain than the original function . Points where doesn't exist include:
- Corners and cusps (sharp turns)
- Vertical tangents
- Discontinuities in
We'll explore these in detail in the section on differentiability.
Interactive: The Derivative as a Function
This visualization shows a function and its derivative simultaneously. The key insight: the y-value on the derivative graph equals the slope of the tangent line on the original graph at each point.
Interactive: The Derivative as a Function
The original function (top) and its derivative function (bottom) are displayed simultaneously. Watch how the tangent line slope on the original function equals the y-value on the derivative graph at each point.
The derivative function f'(x) gives the slope of the tangent line to f(x) at every point x. Notice how:
- When f(x) is increasing, f'(x) is positive
- When f(x) is decreasing, f'(x) is negative
- When f(x) has a horizontal tangent, f'(x) = 0
Notation Systems for the Derivative
Different mathematical traditions have developed different notations for the derivative. You'll encounter all of these, so it's important to recognize them as equivalent.
Lagrange Notation (Prime Notation)
The most common notation in calculus courses. Named after Joseph-Louis Lagrange:
First derivative: or
Second derivative: or
nth derivative:
Leibniz Notation
Developed by Gottfried Leibniz. Emphasizes the ratio of infinitesimal changes:
First derivative: or
Second derivative:
Derivative operator:
Leibniz Notation Advantage
Leibniz notation is especially useful for the chain rule and integration by substitution, as the "dx" terms can be manipulated algebraically (with appropriate care).
Newton's Notation (Dot Notation)
Used primarily in physics, especially for time derivatives:
First derivative: (with respect to time)
Second derivative:
Operator Notation
Treats differentiation as an operator acting on functions:
| Notation | Example | Best Used For |
|---|---|---|
| f'(x) | f'(2) = 4 | General calculus, evaluating at points |
| dy/dx | dy/dx = 2x | Chain rule, implicit differentiation |
| ẋ (dot) | ẋ = velocity | Physics (time derivatives) |
| Df | D(x²) = 2x | Abstract/operator theory |
Computing Derivative Functions from the Definition
Let's derive some derivative functions using the limit definition. This builds intuition for the rules we'll learn later.
Example 1: f(x) = x\u00B3
Step 1: Set up the limit definition
Step 2: Expand
Step 3: Simplify
Step 4: Take the limit as
Example 2: f(x) = \u221Ax
Step 1: Set up the limit
Step 2: Rationalize the numerator (multiply by conjugate)
Step 3: Use difference of squares:
Step 4: Cancel and take the limit
Pattern Emerging: The Power Rule
Notice that and . Both follow the pattern:
This is the power rule, which we'll prove in the next section!
Sign Analysis: Connecting Derivatives to Behavior
The sign of the derivative tells us whether the function is increasing or decreasing. This connection is fundamental to understanding function behavior.
Interactive: Derivative Sign Analysis
Explore how the sign of the derivative determines whether the function is increasing or decreasing. Hover over the graph to see the tangent line and derivative value at any point.
The derivative acts like a "slope detector" for the original function:
- f'(x) > 0 means the tangent line slopes upward → f is increasing
- f'(x) < 0 means the tangent line slopes downward → f is decreasing
- f'(x) = 0 means horizontal tangent → potential maximum or minimum
The Increasing/Decreasing Test
Theorem: Increasing/Decreasing Test
Let be differentiable on an interval .
- If for all in , then is increasing on .
- If for all in , then is decreasing on .
- If for all in , then is constant on .
Finding Critical Points
A critical point of is a value in the domain where either:
- (horizontal tangent), or
- does not exist (corner, cusp, vertical tangent)
Critical points are where the function might change from increasing to decreasing (or vice versa) — potential local maxima and minima.
Graphing Derivatives from Original Functions
Given the graph of , we can sketch by analyzing slopes:
| Feature of f(x) | What it tells us about f'(x) |
|---|---|
| f is increasing | f' is positive (above x-axis) |
| f is decreasing | f' is negative (below x-axis) |
| f has a horizontal tangent | f' = 0 (crosses or touches x-axis) |
| f is steep (large slope) | f' has large absolute value |
| f has constant slope | f' is constant (horizontal) |
| f is linear | f' is a constant function |
| f is concave up | f' is increasing |
| f is concave down | f' is decreasing |
Example: Sketching the Derivative
Consider a function that starts increasing slowly, speeds up, then slows down and levels off. What does its derivative look like?
- Starts increasing slowly → f'(x) is small and positive
- Speeds up (steeper) → f'(x) is increasing (getting larger positive)
- Maximum steepness reached → f'(x) reaches its maximum
- Slows down → f'(x) is decreasing (still positive, but smaller)
- Levels off → f'(x) approaches 0
This describes a sigmoid function (like logistic growth), whose derivative is bell-shaped!
Applications: Where Derivative Functions Appear
Physics: Velocity and Acceleration Functions
If is the position function, then:
Economics: Marginal Functions
If is the total cost of producing units:
Similarly, is marginal revenue and is marginal profit.
Machine Learning Connection: The Gradient Function
In machine learning, we work with loss functions that measure prediction error. The derivative (or gradient in higher dimensions) tells us how to adjust parameters to reduce loss.
The Derivative Function Powers AI
Training a neural network means computing for every parameter . The derivative function tells us:
- Which direction increases the loss (we go the opposite way)
- How sensitive the loss is to each parameter
- When we've reached a minimum (gradient = 0)
Modern deep learning libraries (PyTorch, TensorFlow) compute derivative functions automatically using automatic differentiation.
Python Implementation
Numerical Derivative Function
This code demonstrates how the derivative transforms one function into another, and how to analyze function behavior using the derivative:
Symbolic Derivatives with SymPy
For exact symbolic computation:
Common Mistakes to Avoid
Mistake 1: Confusing f(x) and f'(x)
and are different functions. They generally have different values, different domains, and different behaviors.
Exception: where .
Mistake 2: Assuming f' Has the Same Domain as f
The derivative may not exist at some points where the original function is defined. Example: is defined at , but does not exist.
Mistake 3: Thinking f'(x) = 0 Always Means Extremum
A critical point where might be a maximum, minimum, or neither (inflection point).
Example: has , but is not a max or min.
Test Your Understanding
Test Your Understanding
If f(x) = x³, what is f'(x)?
Summary
The derivative is not just a number at one point — it's a function that maps inputs to slopes.
Key Concepts
| Concept | Description |
|---|---|
| Derivative function f'(x) | A new function that outputs slopes of f at each point |
| Definition | f'(x) = lim_{h→0} [f(x+h) - f(x)]/h for all x where this exists |
| Sign of f'(x) | Positive → f increasing; Negative → f decreasing |
| f'(x) = 0 | Horizontal tangent; potential max/min |
| Critical points | Where f'(x) = 0 or f'(x) undefined |
Key Takeaways
- The derivative transforms functions to functions:
- gives the slope of f at any point x
- Multiple equivalent notations exist: , ,
- The sign of f' determines increasing/decreasing behavior
- Critical points are where f'(x) = 0 or undefined
- In ML, the gradient function guides parameter optimization
Coming Next: In the next section, we'll examine the formal definition of the derivative more closely, seeing how the limit of the difference quotient rigorously captures instantaneous rate of change.