Understand derivatives as slopes, tangent lines, and instantaneous rates of change.
A derivative measures how fast a function is changing at one input. On a graph, it is the slope of the tangent line. In an application, it is an instantaneous rate: velocity at one time, marginal cost at one production level, or temperature change at one moment.
This lesson builds derivatives from a familiar idea: slope between two points.
Learning objectives
After this lesson you should be able to:
compute and interpret average rate of change;
explain a derivative as a limiting tangent slope;
use derivative notation;
compute a derivative from the limit definition for simple quadratics;
write tangent line equations step by step;
interpret derivative units;
recognize common places where derivatives fail to exist;
use edumath helpers and SymPy to check derivatives and tangent lines.
They all describe a rate of change with respect to the input variable.
Derivative problem-solving roadmap
Identify the function and input. What is \(f(x)\)? At what point, if any, do you need the rate?
Decide the type of rate. Average rate uses two inputs. Instantaneous rate uses a derivative at one input.
Compute the derivative or slope. Use a difference quotient, a derivative rule, or a known derivative.
Evaluate if needed. A tangent slope at \(x=a\) is \(f'(a)\), not just \(f'(x)\).
Use the result. Write a tangent line, interpret units, or determine increasing/decreasing behavior.
Check. Use units, nearby slopes, or SymPy.
Average rate of change
Average rate of change from \(x=a\) to \(x=b\) is
\[
\frac{f(b)-f(a)}{b-a}.
\]
This is the slope of the secant line through two points on the graph.
Walkthrough: average rate
Find the average rate of change of \(f(x)=x^2\) from \(x=1\) to \(x=3\).
Identify endpoints.\(a=1\) and \(b=3\).
Evaluate the function.\[
f(1)=1^2=1, \qquad f(3)=3^2=9.
\]
Compute output change over input change.\[
\frac{f(3)-f(1)}{3-1}=\frac{9-1}{2}=4.
\]
Interpret. On average, the output increases 4 units for each 1-unit increase in \(x\) over this interval.
Guided exercise: average rate with units
A position function is \(s(t)=t^2+2t\) meters. Find the average velocity from \(t=1\) to \(t=4\).
What are the endpoint times?
Compute \(s(1)\) and \(s(4)\).
Divide change in position by change in time.
What are the units?
TipGuided solution
The endpoints are \(t=1\) and \(t=4\).
\(s(1)=1+2=3\) and \(s(4)=16+8=24\).
Average velocity is \((24-3)/(4-1)=21/3=7\).
The units are meters per second if time is measured in seconds.
From secant slope to tangent slope
A secant line uses two points. A tangent line describes the graph’s direction at one point. To get a tangent slope, move the second point closer and closer to the first.
For a point \(x=a\), the difference quotient is
\[
\frac{f(a+h)-f(a)}{h}.
\]
As \(h\) approaches 0, this secant slope may approach a limiting slope. That limit is the derivative at \(a\):
\[
f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a)}{h}.
\]
The derivative definition
Walkthrough: derivative of \(x^2\) at one point
Find \(f'(2)\) for \(f(x)=x^2\) using the definition.
Start with the definition.\[
f'(2)=\lim_{h\to0}\frac{f(2+h)-f(2)}{h}.
\]
Substitute the function.\[
f(2+h)=(2+h)^2, \qquad f(2)=4.
\]
Expand.\[
(2+h)^2=4+4h+h^2.
\]
Simplify the numerator.\[
\frac{(4+4h+h^2)-4}{h}=\frac{4h+h^2}{h}.
\]
Factor and cancel \(h\) for \(h\ne0\).\[
\frac{h(4+h)}{h}=4+h.
\]
Take the limit.\[
\lim_{h\to0}(4+h)=4.
\]
So \(f'(2)=4\). The tangent slope of \(y=x^2\) at \(x=2\) is 4.
Derivative function
The same process can be done at a general input \(x\):
from edumath.calculus import tangent_line_stepssolution = tangent_line_steps("x**2", 3)print(solution.render_markdown())
Hint: A tangent line needs a point and a slope.
Answer: 6*x - 9
Use the derivative for the slope, then use point-slope form.
1. **Find the point.** f(3) = 9.
2. **Differentiate.** f'(x) = 2*x.
3. **Evaluate the slope.** f'(3) = 6.
4. **Use point-slope form.** y - 9 = 6(x - 3).
5. **Simplify.** The tangent line is 6*x - 9.
Check: Substitute the point into the line and compare slopes.
import sympy as spx = sp.symbols("x")sp.diff(x**2+3*x, x)