The limit definition
Every differentiation rule you will ever use is a shortcut for one limit:
\[f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}\]
The quotient is the slope of the line through \((x, f(x))\) and \((x + h, f(x + h))\) — a chord. Letting \(h \to 0\) slides the second point onto the first, and the chord settles into the tangent. Two equivalent forms turn up in textbooks:
\[f'(a) = \lim_{x \to a} \frac{f(x) - f(a)}{x - a} \qquad\text{and}\qquad f'(x) = \lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}\]
The first is convenient when you want the derivative at one specific point; the second is the one that gives \(dy/dx\) its shape as notation.
The four-step method
Working from the definition always follows the same four steps:
- Write \(f(x + h)\) out in full, substituting \(x + h\) everywhere \(x\) appears.
- Subtract \(f(x)\) and simplify the numerator. Everything without an \(h\) must cancel — if it does not, check step 1.
- Divide by \(h\). Every surviving term must contain a factor of \(h\) for this to be legal.
- Let \(h \to 0\). Any term still carrying an \(h\) vanishes; what remains is the derivative.
Step 2 is where the work is. If the numerator still has a lone constant after subtracting, the expansion in step 1 was wrong.
Worked example: x²
Take \(f(x) = x^{2}\).
\[\frac{f(x+h) - f(x)}{h} = \frac{(x+h)^{2} - x^{2}}{h}\]
Expand the square: \((x+h)^{2} = x^{2} + 2xh + h^{2}\), so the \(x^{2}\) terms cancel.
\[= \frac{2xh + h^{2}}{h} = \frac{h(2x + h)}{h} = 2x + h\]
Now let \(h \to 0\), and the answer is \(2x\) — exactly what the power rule gives in one line.
Worked example: √x, and the conjugate trick
Take \(f(x) = \sqrt{x}\). The numerator \(\sqrt{x+h} - \sqrt{x}\) has no obvious factor of \(h\), so multiply above and below by the conjugate:
\[\frac{\sqrt{x+h} - \sqrt{x}}{h} \cdot \frac{\sqrt{x+h} + \sqrt{x}}{\sqrt{x+h} + \sqrt{x}} = \frac{(x+h) - x}{h\left(\sqrt{x+h} + \sqrt{x}\right)}\]
The numerator collapses to \(h\), which cancels:
\[= \frac{1}{\sqrt{x+h} + \sqrt{x}} \;\xrightarrow{\;h \to 0\;}\; \frac{1}{2\sqrt{x}}\]
The conjugate trick is the standard move whenever a root appears in the numerator, and it is worth recognising on sight.
Worked example: sin x, and why radians
For \(f(x) = \sin x\), the angle-sum identity gives \(\sin(x+h) = \sin x\cos h + \cos x\sin h\), so the quotient becomes:
\[\sin x\left(\frac{\cos h - 1}{h}\right) + \cos x\left(\frac{\sin h}{h}\right)\]
Two standard limits finish it: \(\frac{\sin h}{h} \to 1\) and \(\frac{\cos h - 1}{h} \to 0\). What survives is \(\cos x\).
This is why the trigonometric derivatives assume radians. In degrees \(\frac{\sin h}{h}\) tends to \(\pi/180\) instead of 1, and every formula would carry that factor.
Check your answer
Work the limit out by hand first, then differentiate here and compare. The rules are named in the order they were applied.
What this calculator does and does not do
The calculator on this page differentiates using the rules, not the limit — it does not evaluate \(\lim_{h \to 0}\) symbolically. Use it the way you would use the back of a textbook: work the definition out by hand, then check that your answer matches.
If the two disagree, the error is almost always in step 2 of the method above: an expansion that dropped a term, or a cancellation that was not legal.
Questions
What is differentiation from first principles?
Computing a derivative directly from the limit definition \(\lim_{h \to 0}\frac{f(x+h)-f(x)}{h}\), rather than applying the power, product, quotient or chain rules.
Why learn it if the rules are faster?
Because the rules are theorems, and this is their proof. Exams ask for it explicitly, and it is the only way to see why the shortcuts work rather than taking them on trust.
Does this calculator evaluate the limit?
No. The engine differentiates symbolically using the rules. It is a way to check the answer you reached by hand, not a limit solver.
Why does everything without an h have to cancel?
Because you are about to divide by \(h\). If a term without an \(h\) survived, the quotient would blow up as \(h \to 0\) rather than settling on a finite slope.
What is the h in the definition?
The width of the interval between the two points on the curve. Some textbooks write \(\Delta x\) instead; it means the same thing.