What is a Derivative?
The derivative of a function measures the instantaneous rate of change of the function with respect to . Geometrically, it equals the slope of the tangent line to the curve at a given point.
This limit is called the first principles definition of a derivative.
Notation
Several notations are used interchangeably:
| Notation | Meaning | |----------|---------| | | Derivative of with respect to | | | Leibniz notation | | | Newton's dot notation (common in physics) | | | Operator notation |
Fundamental Differentiation Rules
Power Rule
For any real number :
Examples:
Sum and Difference Rule
Product Rule
Mnemonic: "First times derivative of second, plus second times derivative of first"
Example: Differentiate
Quotient Rule
Example: Differentiate
Chain Rule
For composite functions :
Example: Differentiate
Let , so :
Derivatives of Standard Functions
Implementing Numerical Differentiation
def numerical_derivative(f, x: float, h: float = 1e-7) -> float:
"""
Approximate f'(x) using the central difference formula.
More accurate than forward difference for small h.
Formula: f'(x) ≈ [f(x+h) - f(x-h)] / (2h)
"""
return (f(x + h) - f(x - h)) / (2 * h)
import math
# Test with f(x) = sin(x), f'(x) = cos(x)
f = math.sin
x = math.pi / 4 # 45°
approx = numerical_derivative(f, x)
exact = math.cos(x)
error = abs(approx - exact)
print(f"Approximate: {approx:.10f}")
print(f"Exact: {exact:.10f}")
print(f"Error: {error:.2e}") # ~2.3e-14 ✓
Higher-Order Derivatives
The second derivative measures the rate of change of the first derivative (concavity):
Concavity test:
- If : curve is concave up (∪)
- If : curve is concave down (∩)
- If : possible inflection point
Applications
Finding Critical Points
At a local maximum or minimum, (or undefined).
Algorithm in TypeScript:
interface CriticalPoint {
x: number;
type: 'maximum' | 'minimum' | 'inflection' | 'unknown';
}
function classifyCriticalPoint(
fPrime: (x: number) => number,
fDoublePrime: (x: number) => number,
x: number
): CriticalPoint {
const secondDerivative = fDoublePrime(x);
if (Math.abs(fPrime(x)) > 1e-6) {
return { x, type: 'unknown' }; // Not actually a critical point
}
if (secondDerivative > 0) return { x, type: 'minimum' };
if (secondDerivative < 0) return { x, type: 'maximum' };
return { x, type: 'inflection' };
}
Derivatives Quiz
3 questions · Select one answer per question
What is the derivative of f(x) = 5x⁴ - 3x² + 7?
Using the chain rule, what is d/dx[sin(x²)]?
If f''(x) > 0 at a critical point, the function has a:
Answer all questions to submit