Introduction
$$\frac{dy}{dx} = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$Let's start by reading the symbols. \(f(x)\) is the value of the function at some point \(x\), and \(h\) is a small distance off to the side from \(x\) — the horizontal gap between two inputs (the change in \(x\)). Then \(f(x+h)\) is the function's value at the point that lies \(h\) away from \(x\), so the numerator \(f(x+h) - f(x)\) is the vertical change between the two points, and the denominator \(h\) is the horizontal change. In other words, this fraction is the slope answering "how much does the value change vertically as we move \(h\) to the right?", and the \(\lim_{h \to 0}\) in front means we shrink that gap \(h\) toward 0 without bound.
When you first see this formula, a doubt arises.
"If \(h \to 0\), then the numerator \(f(x+h) - f(x)\) becomes 0, and the denominator \(h\) also becomes 0. Isn't that dividing 0 by 0? Why does a value come out?"
It's a fair doubt. After all, 0/0 is undefined in mathematics. And yet the derivative clearly gives a value. What is going on?
Here's the one-sentence answer first — we are not substituting \(h = 0\); rather, we simplify the expression while \(h \neq 0\) and then take the limit of the result. The expression is already cleaned up before \(h\) reaches 0, so we never actually end up dividing by zero.
What Is Slope — Starting with a Straight Line
The slope of the line through two points \((x_1, y_1)\) and \((x_2, y_2)\) is:
$$m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}$$This is perfectly safe. As long as \(x_2 \neq x_1\), the denominator is never 0.
By the way, the line itself is usually written in the form \(y = mx + b\). Here \(m\) is the slope we just found (move 1 to the right and the value changes by \(m\)), and \(b\) is the height at which the line crosses the \(y\)-axis (the \(y\)-intercept). Since the single number \(m\) entirely determines how steep the line is, knowing the "instantaneous slope" at a point also means knowing the equation of the line that just touches the curve at that point.
On a curve, too, you can pick two points and find a slope with the same formula. When you do, joining those two points with a straight line gives a line that crosses the curve in two places, and this is called a secant line (from the Latin secare, "to cut" — a line that passes through as if cutting the curve). The slope of a secant line is the average slope between the two points, and as long as the two points are distinct the denominator is nonzero, so it's found without trouble. Later, we'll bring these two points infinitely close together to make the secant line converge to a line that touches the curve at a single point — the tangent line.
The trouble comes when we want not the "average slope between two points" but the instantaneous slope at a single point. With only one point you can't define a line, so how do we find the slope?
The Idea — Fix One Point and Pull the Other Point Closer
Let's find the instantaneous slope at the point \(P = (x_0, x_0^2)\) on \(y = x^2\).
First, let's clarify the notation \(P = (x_0,\ x_0^2)\). Since \(P\) is a point on the curve \(y = x^2\), once we fix the \(x\)-coordinate as \(x_0\), the \(y\)-coordinate follows automatically as the value plugged into the equation, namely \(x_0^2\). We don't need to specify it separately. Here \(x_0\) denotes a fixed value pointing to "the \(x\)-coordinate of the spot where we want to know the slope" (you can think of it as one particular number, such as \(x_0 = 1\)). For the same reason, the \(y\)-coordinate of the point whose \(x\)-coordinate is \(x_0 + h\) is \((x_0 + h)^2\).
- Pick a second point a distance \(h\) away from \(P\): \(Q = (x_0 + h,\ (x_0+h)^2)\)
- Compute the secant slope through the two points.
- Gradually shrink \(h\) toward 0.
- The value that this slope converges to is the instantaneous slope at \(P\).
Let's actually do the computation, starting from step 2.
Deriving It Directly from \(y = x^2\)
$$\text{secant slope} = \frac{(x_0+h)^2 - x_0^2}{h}$$Expand the numerator.
$$(x_0 + h)^2 = x_0^2 + 2x_0 h + h^2$$Therefore:
$$(x_0 + h)^2 - x_0^2 = 2x_0 h + h^2$$Divide this by \(h\).
$$\frac{2x_0 h + h^2}{h} = 2x_0 + h$$This is the crux. In the step where we divide by \(h\), there's no problem at all because \(h \neq 0\). The \(h\) in the numerator cancels with the \(h\) in the denominator, leaving only the clean expression \(2x_0 + h\).
Now take the limit as \(h \to 0\).
$$\lim_{h \to 0}(2x_0 + h) = 2x_0 + 0 = 2x_0$$There's no longer a 0/0 problem, because we took the limit after the expression had already been simplified. Conclusion:
$$\frac{d}{dx} x^2 = 2x$$If \(x_0 = 1\), the instantaneous slope is \(2 \cdot 1 = 2\); if \(x_0 = 3\), it is \(2 \cdot 3 = 6\).
Check: Why Isn't It 0/0
If you substitute \(h = 0\) directly into the original expression \(\dfrac{(x_0+h)^2 - x_0^2}{h}\), you get \(\dfrac{0}{0}\). That's true. But we did not substitute \(h = 0\); we expanded the expression with \(h \neq 0\) to obtain \(2x_0 + h\), and only then took the limit. The order of the two steps matters.
First cancel with \(h \neq 0\) → then take the limit \(h \to 0\).
Seeing It with Your Own Eyes
In the interactive below, drag the h slider to the left. At first, when P and Q are far apart, the secant line (orange) differs from the tangent line (green). As h gets smaller the secant line approaches the tangent line, and when h ≈ 0 they almost overlap.
If you press the presets "x₀=1, h=1" → "x₀=1, h=0.5" → "x₀=1, h=0.01" in order, you'll see the secant slope decrease 3.000 → 2.500 → 2.010, edging ever closer to the tangent slope 2.000 (= 2x₀).
Why This Method Makes Sense — The Intuition of the Limit
"Making the two points into the same point" is not a way to define a line. But "the tendency as the two points are brought infinitely close together" can be defined. This is the concept of a limit.
Put differently, the derivative is the answer to this question.
"As Q is brought infinitely close to P, does the secant slope converge to a particular value? If it does, what is that value?"
For \(y = x^2\) it converges, and the value is \(2x_0\).
Some functions don't converge. For example, \(y = |x|\) at \(x = 0\) has slope −1 when approached from the left and +1 when approached from the right, so the limit does not exist. In this case we say it is not differentiable at \(x = 0\).
What Are \(dy\) and \(dx\)
Writing \(\dfrac{dy}{dx}\) gives the feeling that "it really looks like a fraction, dividing top by bottom." Strictly speaking it is not a fraction but a notation that writes the result of a limit in fractional form. Still, there is a reason for this notation.
In the chain rule \(\dfrac{dy}{dx} = \dfrac{dy}{du} \cdot \dfrac{du}{dx}\), the property that the intermediate variable \(u\) appears to cancel actually holds. Why this "looks-like-canceling" genuinely holds is covered in the next post (the chain rule).
Key Takeaways
| Question | Answer |
|---|---|
| Isn't the derivative 0/0? | The expression cancels before the limit is taken, so the 0/0 disappears |
| What's the order of steps? | Expand and cancel with h≠0 → then take the limit h→0 |
| What is the derivative of \(x^2\)? | \(2x\) (derived directly) |
| When is it not differentiable? | When the slopes of the left-hand and right-hand limits differ |
Studying This with AI
AI handles the derivation of the definition of the derivative well. Questions to ask when you want to dig deeper:
- "Derive \(y = x^3\) directly from the definition of the derivative." (the binomial expansion is added)
- "When you derive \(y = \sin x\) from the definition of the derivative, why does \(\cos x\) come out?" (you need the special limit \(\lim_{h\to0}\frac{\sin h}{h}=1\))
- "Explain why differentiability implies continuity."
Wrapping Up
The reason the derivative looks like 0/0 is that, once two points become the same, you can no longer define a line. The derivative's answer is to capture, with a limit, not "the moment they become equal" but "the tendency right up until they become equal." In that process the \(h\) in the numerator and denominator cancel, so the 0/0 problem never arises in the first place.
Related reading — Why Is Euler's Number e Exactly 2.718…? · Why Do Logarithms Turn Multiplication into Addition? · Why Does Arctangent Appear? · Practice computing derivatives: Desmos · Wolfram Alpha