The derivative of a function describes how fast its value changes as its argument changes. Geometrically it is the slope of the tangent line to the function's graph; in physics, for example, velocity is the derivative of position with respect to time.
Let $f$ be defined in some neighbourhood of a point $x_0$. The derivative of $f$ at $x_0$ is the limit of the difference quotient
$$f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h},$$
provided this limit exists and is finite. We then say that $f$ is differentiable at $x_0$.
The difference quotient is the slope of the secant line through the points $(x_0, f(x_0))$ and $(x_0 + h, f(x_0 + h))$. As $h \to 0$, the secant approaches the tangent line, whose equation is
$$y = f(x_0) + f'(x_0)\,(x - x_0).$$
For differentiable functions $f$, $g$ and a constant $c$:
| Rule | Formula |
|---|---|
| Constant multiple | $(c\,f)' = c\,f'$ |
| Sum | $(f + g)' = f' + g'$ |
| Product | $(f g)' = f' g + f g'$ |
| Quotient | $\left(\dfrac{f}{g}\right)' = \dfrac{f' g - f g'}{g^2}$, provided $g \neq 0$ |
| Chain rule | $(f \circ g)'(x) = f'\big(g(x)\big)\, g'(x)$ |
| $f(x)$ | $f'(x)$ |
|---|---|
| $c$ | $0$ |
| $x^n$ | $n\,x^{n-1}$ |
| $e^x$ | $e^x$ |
| $a^x$ | $a^x \ln a$ |
| $\ln x$ | $\dfrac{1}{x}$ |
| $\sin x$ | $\cos x$ |
| $\cos x$ | $-\sin x$ |
| $\tan x$ | $\dfrac{1}{\cos^2 x}$ |
Let us compute the derivative of $f(x) = x^2 \sin x$. By the product rule, with $u = x^2$ and $v = \sin x$:
$$f'(x) = (x^2)' \sin x + x^2 (\sin x)' = 2x \sin x + x^2 \cos x.$$
Every function that is differentiable at a point is continuous there. The converse does not hold: the function $f(x) = \lvert x \rvert$ is continuous at zero but not differentiable there, because
$$\lim_{h \to 0^+} \frac{\lvert h \rvert}{h} = 1 \neq -1 = \lim_{h \to 0^-} \frac{\lvert h \rvert}{h}.$$