The Derivative as a limit

Prerequisites:

The derivative of a function ff at xx (denoted f(x)f'(x)) is defined as

f(x)=limh0f(x+h)f(x)hf'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}

There are many ways to think of this, one is to think of the tangent line to ff

An example: The derivative of x2x^2 being 2x2x

limh0(x+h)2x2h=limh0(x2+2xh+h2)x2h=limh02xh+h2h=limh0(2x+h)=2x\begin{aligned} \lim_{h \to 0} \frac{(x+h)^2 - x^2}{h} &= \lim_{h \to 0} \frac{(x^2 + 2xh + h^2) - x^2}{h} \\ &= \lim_{h \to 0} \frac{2xh + h^2}{h} \\ &= \lim_{h \to 0}\left(2x + h\right) \\ &= 2x \end{aligned}