Derivatives describe local change. They measure how strongly a function output reacts to a small input variation.
From Average to Instantaneous Rate of Change
For \(f:I\to\mathbb{R}\) and two points \(x\) and \(x+h\), the average rate of change is
\[ \frac{f(x+h)-f(x)}{h},\qquad h\ne 0. \]
If the limit exists for \(h\to 0\), we define the derivative:
\[ f'(x):=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}. \]
Equivalent point-pair form at \(x_0\):
\[ f'(x_0)=\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}. \]
Notation
Several notations for the same derivative coexist and are used interchangeably throughout this chapter. Lagrange's notation \(f'(x)\) (or \(y'\)) is the most compact. Leibniz's notation
\[ \frac{df}{dx}\quad\text{or}\quad\frac{dy}{dx} \]
writes the derivative as a ratio of infinitesimal changes, which is exactly the limit of \(\Delta f/\Delta x\) above and pairs naturally with the chain rule further below. The operator forms \(\frac{d}{dx}f(x)\) and \(Df(x)\) emphasize differentiation itself as a map from functions to functions. Evaluated at a specific point \(x=a\), these become
\[ f'(a), \qquad \left.\frac{df}{dx}\right|_{x=a}, \qquad Df(a). \]
Geometric and Physical Meaning
- Geometrically, \(f'(x_0)\) is the slope of the tangent line at \((x_0,f(x_0))\).
- Physically, if \(s(t)\) is position over time, then \(s'(t)\) is velocity.
- Large \(|f'(x)|\) means steep change, small \(|f'(x)|\) means flat change.
Tangent Line Formula
At point \(x_0\), the tangent line is
\[ y = f(x_0) + f'(x_0)(x-x_0). \]
This is the first-order local approximation and the basis of linearization.
Differentiability and Continuity
Differentiability is a strictly stronger property than continuity. If \(f\) is differentiable at \(a\), then \(f\) is also continuous at \(a\): for \(x\ne a\) near \(a\),
\[ f(x)-f(a)=\frac{f(x)-f(a)}{x-a}\cdot(x-a), \]
and taking the limit \(x\to a\) on both sides turns the right-hand side into a product of two convergent limits, \(f'(a)\) and \(0\), so \(\lim_{x\to a}f(x)=f(a)\).
The converse fails: continuity does not imply differentiability. The standard counterexample is \(f(x)=|x|\), continuous everywhere but with a corner at \(x=0\). The left-hand and right-hand difference quotients there disagree,
\[ \lim_{h\to0^-}\frac{|h|-0}{h}=-1, \qquad \lim_{h\to0^+}\frac{|h|-0}{h}=1, \]
so \(f'(0)\) does not exist. Jumps, corners, cusps, and vertical tangents are the recurring reasons a continuous function can fail to be differentiable at a point.
Sign of the Derivative and Critical Points
On intervals where \(f'(x)>0\), the function is increasing. Where \(f'(x)<0\), it is decreasing.
A point with \(f'(x_0)=0\) is called a stationary or critical point candidate. It is not automatically a local extremum.
Example: \(f(x)=x^3\) has \(f'(0)=0\), but \(x=0\) is not a local maximum or minimum. The full theory of local and absolute extrema, built directly on this observation, is developed in Extrema and the Mean Value Theorem.
Basic Derivative Rules
For differentiable functions \(f,g\) and constant \(c\):
\[ \frac{d}{dx}(c)=0, \qquad \frac{d}{dx}(x^n)=nx^{n-1}, \]
\[ \frac{d}{dx}(f+g)=f'+g', \qquad \frac{d}{dx}(cf)=cf', \]
\[ \frac{d}{dx}(fg)=f'g+fg', \qquad \frac{d}{dx}\left(\frac{f}{g}\right)=\frac{f'g-fg'}{g^2}\;(g\ne 0), \]
\[ \frac{d}{dx}(f\circ g)(x)=f'(g(x))\cdot g'(x). \]
The product rule extends beyond two factors by applying it repeatedly. For differentiable \(f,g,h\):
\[ \frac{d}{dx}(fgh)=f'gh+fg'h+fgh'. \]
Combining the chain rule with the power rule gives a shortcut used constantly in practice: for a differentiable function \(f\),
\[ \frac{d}{dx}\big[f(x)^n\big]=n\,f(x)^{n-1}f'(x). \]
Derivative of an Inverse Function
If \(f\) is differentiable and invertible near \(x_0\), its inverse function \(f^{-1}\) satisfies \(f\bigl(f^{-1}(x)\bigr)=x\) for every \(x\) in the range of \(f\). Differentiating both sides with the chain rule gives
\[ f'\bigl(f^{-1}(x)\bigr)\cdot\bigl(f^{-1}\bigr)'(x)=1, \]
so, wherever \(f'\bigl(f^{-1}(x)\bigr)\ne 0\),
\[ \boxed{\bigl(f^{-1}\bigr)'(x)=\frac{1}{f'\bigl(f^{-1}(x)\bigr)}}. \]
Writing \(y=f(x)\), so that \(x=f^{-1}(y)\), the same identity reads \(\bigl(f^{-1}\bigr)'(y)=\dfrac{1}{f'(x)}\): the slope of the inverse at \(y\) is the reciprocal of the slope of \(f\) at the corresponding point \(x\), a direct consequence of the inverse function's graph being a reflection of \(f\) across the line \(y=x\). This rule is what makes it possible to differentiate every inverse function in the next section without returning to the limit definition each time.
A Catalogue of Standard Derivatives
The rules above are enough to derive the derivative of every elementary function used in practice. What follows applies them systematically, function family by function family, building each result directly out of the ones already established.
Power Functions
The power rule \(\frac{d}{dx}(x^n)=nx^{n-1}\) holds for every real exponent \(n\), not only positive integers. A few concrete instances used constantly:
| Function | Derivative |
|---|---|
| \(c\) | \(0\) |
| \(cx\) | \(c\) |
| \(x\) | \(1\) |
| \(x^2\) | \(2x\) |
| \(x^3\) | \(3x^2\) |
| \(x^4\) | \(4x^3\) |
| \(\sqrt{x}=x^{1/2}\) | \(\dfrac{1}{2\sqrt{x}}\) |
| \(x^{-1/2}\) | \(-\dfrac{1}{2}x^{-3/2}\) |
| \(x^{3/2}\) | \(\dfrac{3}{2}x^{1/2}=\dfrac{3}{2}\sqrt{x}\) |
| \(x^{-3/2}\) | \(-\dfrac{3}{2}x^{-5/2}\) |
| \(x\sqrt{x}=x^{3/2}\) | \(\dfrac{3}{2}\sqrt{x}\) |
| \(\dfrac{1}{\sqrt{x}}=x^{-1/2}\) | \(-\dfrac{1}{2x\sqrt{x}}\) |
| \(\dfrac{1}{x}\) | \(-\dfrac{1}{x^2}\) |
| \(\dfrac{1}{x^2}\) | \(-\dfrac{2}{x^3}\) |
| \(\dfrac{1}{x^3}\) | \(-\dfrac{3}{x^4}\) |
| \(\dfrac{1}{x^n}\) | \(-\dfrac{n}{x^{n+1}}\) |
Since differentiation is linear, it distributes term by term over a polynomial:
\[ \frac{d}{dx}\sum_{i=0}^n a_i x^i=\sum_{i=1}^n i\,a_i\,x^{i-1}. \]
Trigonometric Functions
Starting from the limit definition and the two standard limits \(\lim_{h\to0}\frac{\sin h}{h}=1\) and \(\lim_{h\to0}\frac{\cos h-1}{h}=0\), the angle-addition formula for sine gives
\[ \frac{d}{dx}\sin x=\lim_{h\to0}\frac{\sin x\cos h+\cos x\sin h-\sin x}{h} =\sin x\cdot 0+\cos x\cdot 1=\cos x. \]
The same argument applied to \(\cos x=\sin\!\left(\frac{\pi}{2}-x\right)\) with the chain rule gives \(\frac{d}{dx}\cos x=-\sin x\). Every other trigonometric derivative follows from these two with the quotient rule:
\[ \frac{d}{dx}\tan x=\frac{d}{dx}\frac{\sin x}{\cos x}=\frac{\cos^2x+\sin^2x}{\cos^2x}=\frac{1}{\cos^2x}=\sec^2x, \]
\[ \frac{d}{dx}\sec x=\frac{d}{dx}\frac{1}{\cos x}=\frac{\sin x}{\cos^2x}=\sec x\tan x, \qquad \frac{d}{dx}\csc x=-\csc x\cot x, \]
\[ \frac{d}{dx}\cot x=\frac{d}{dx}\frac{\cos x}{\sin x}=-\frac{\sin^2x+\cos^2x}{\sin^2x}=-\frac{1}{\sin^2x}=-\csc^2x. \]
With a linear argument, the chain rule adds a factor \(a\):
\[ \frac{d}{dx}\sin(ax)=a\cos(ax), \qquad \frac{d}{dx}\cos(ax)=-a\sin(ax), \]
\[ \frac{d}{dx}\tan(ax)=a\sec^2(ax)=\frac{a}{\cos^2(ax)}=\frac{2a}{\cos(2ax)+1}. \]
Inverse Trigonometric Functions
Each inverse trigonometric derivative follows from the inverse function rule above. For \(y=\arcsin x\), \(\sin y=x\), so \(\cos y\cdot y'=1\); since \(\cos y\ge0\) on the principal branch, \(\cos y=\sqrt{1-\sin^2y}=\sqrt{1-x^2}\), giving
\[ \frac{d}{dx}\arcsin x=\frac{1}{\sqrt{1-x^2}}, \qquad \frac{d}{dx}\arccos x=-\frac{1}{\sqrt{1-x^2}}. \]
For \(y=\arctan x\), \(\tan y=x\), so \(\sec^2y\cdot y'=1\); using \(\sec^2y=1+\tan^2y=1+x^2\),
\[ \frac{d}{dx}\arctan x=\frac{1}{1+x^2}, \qquad \frac{d}{dx}\operatorname{arccot}x=-\frac{1}{1+x^2}. \]
The same substitution for \(\operatorname{arcsec}\) and \(\operatorname{arccsc}\) (via \(x=\sec y\) or \(x=\csc y\)) gives
\[ \frac{d}{dx}\operatorname{arcsec}x=\frac{1}{|x|\sqrt{x^2-1}}, \qquad \frac{d}{dx}\operatorname{arccsc}x=-\frac{1}{|x|\sqrt{x^2-1}}. \]
Exponential and Logarithmic Functions
The derivative of the natural logarithm follows directly from the limit definition and the standard limit \(\lim_{t\to0}(1+t)^{1/t}=e\):
\[ \begin{array}{rl} \dfrac{d}{dx}\ln x &=\displaystyle\lim_{h\to0}\frac{\ln(x+h)-\ln x}{h}\\ &=\displaystyle\lim_{h\to0}\frac{1}{h}\ln\!\left(\frac{x+h}{x}\right)\\ &=\displaystyle\lim_{h\to0}\ln\!\left(1+\frac{h}{x}\right)^{1/h}\\ &=\ln\!\left[\lim_{h\to0}\left(1+\frac{h}{x}\right)^{1/h}\right]\\ &=\ln\!\left(e^{1/x}\right)=\frac{1}{x}. \end{array} \]
With the chain rule, \(\frac{d}{dx}\ln(ax)=\frac{1}{x}\) (the constant \(a\) cancels) and, more generally, \(\frac{d}{dx}\ln f(x)=\frac{f'(x)}{f(x)}\) for \(f(x)>0\). Since \(\log_b x=\frac{\ln x}{\ln b}\),
\[ \frac{d}{dx}\log_bx=\frac{1}{x\ln b}, \qquad \frac{d}{dx}\log_b(ax)=\frac{1}{x\ln b}. \]
Because \(e^x\) is the inverse of \(\ln x\), the inverse function rule gives its derivative immediately: for \(y=e^x\), \(x=\ln y\) and \(\frac{dx}{dy}=\frac{1}{y}\), so
\[ \frac{dy}{dx}=\frac{1}{dx/dy}=y=e^x. \]
The chain rule extends this to \(\frac{d}{dx}e^{kx}=ke^{kx}\) and \(\frac{d}{dx}e^{f(x)}=f'(x)e^{f(x)}\). Writing \(a^x=e^{x\ln a}\) turns any exponential base into this form:
\[ \frac{d}{dx}a^x=e^{x\ln a}\cdot\ln a=a^x\ln a. \]
Finally, a variable base and a variable exponent together are handled by logarithmic differentiation: taking \(\ln\) of \(y=f(x)^{g(x)}\) gives \(\ln y=g(x)\ln f(x)\), and differentiating both sides implicitly gives \(\frac{y'}{y}=g'\ln f+\frac{gf'}{f}\), so
\[ \frac{d}{dx}\Big[f(x)^{g(x)}\Big]=f(x)^{g(x)}\left(g'(x)\ln f(x)+\frac{g(x)f'(x)}{f(x)}\right). \]
Hyperbolic Functions
The hyperbolic sine and cosine are defined directly from the exponential function, \(\sinh x=\frac{e^x-e^{-x}}{2}\) and \(\cosh x=\frac{e^x+e^{-x}}{2}\), so their derivatives follow immediately from \(\frac{d}{dx}e^x=e^x\):
\[ \frac{d}{dx}\sinh x=\frac{e^x+e^{-x}}{2}=\cosh x, \qquad \frac{d}{dx}\cosh x=\frac{e^x-e^{-x}}{2}=\sinh x. \]
The quotient rule and the identity \(\cosh^2x-\sinh^2x=1\) give the rest:
\[ \frac{d}{dx}\tanh x=\frac{\cosh^2x-\sinh^2x}{\cosh^2x}=\frac{1}{\cosh^2x}=\operatorname{sech}^2x, \qquad \frac{d}{dx}\coth x=\frac{\sinh^2x-\cosh^2x}{\sinh^2x}=-\frac{1}{\sinh^2x}=-\operatorname{csch}^2x, \]
\[ \frac{d}{dx}\operatorname{csch}x=-\operatorname{csch}x\coth x, \qquad \frac{d}{dx}\operatorname{sech}x=-\operatorname{sech}x\tanh x. \]
Inverse Hyperbolic Functions
These follow from the inverse function rule exactly as the inverse trigonometric functions did. For \(y=\operatorname{arsinh}x\), \(\sinh y=x\) and \(\cosh y\,y'=1\); since \(\cosh y>0\) always, \(\cosh y=\sqrt{1+\sinh^2y}=\sqrt{1+x^2}\), so
\[ \frac{d}{dx}\operatorname{arsinh}x=\frac{1}{\sqrt{1+x^2}}. \]
For \(y=\operatorname{arcosh}x\) with \(x>1\), \(\cosh y=x\) and \(\sinh y\,y'=1\); on the branch \(y\ge0\), \(\sinh y=\sqrt{\cosh^2y-1}=\sqrt{x^2-1}\), so
\[ \frac{d}{dx}\operatorname{arcosh}x=\frac{1}{\sqrt{x^2-1}}. \]
For \(y=\operatorname{artanh}x\) with \(|x|<1\), \(\tanh y=x\) and \(\operatorname{sech}^2y\,y'=1\); using \(\operatorname{sech}^2y=1-\tanh^2y=1-x^2\),
\[ \frac{d}{dx}\operatorname{artanh}x=\frac{1}{1-x^2}, \qquad \frac{d}{dx}\operatorname{arcoth}x=\frac{1}{1-x^2}\ \ (|x|>1), \]
the same rational function on two disjoint domains. The remaining two follow the same substitution pattern used for \(\operatorname{arcsec}\) and \(\operatorname{arccsc}\) above:
\[ \frac{d}{dx}\operatorname{arcsch}x=-\frac{1}{|x|\sqrt{x^2+1}}, \qquad \frac{d}{dx}\operatorname{arsech}x=-\frac{1}{x\sqrt{1-x^2}}. \]
Implicit Differentiation
Not every relation between \(x\) and \(y\) is already solved for \(y\) as \(y=f(x)\). The unit circle \(x^2+y^2=r^2\), for instance, defines \(y\) only implicitly as a function of \(x\), and generally more than one such function locally (the upper and lower half of the circle). Whenever such an implicit function \(y=y(x)\) is differentiable, it can be differentiated without ever solving for \(y\) explicitly: treat \(y\) as a function of \(x\), differentiate both sides of the defining equation with respect to \(x\), and apply the chain rule to every term containing \(y\), for example \(\frac{d}{dx}y^2=2y\,y'\). Solving the resulting equation for \(y'\) then gives the derivative in terms of both \(x\) and \(y\).
For the circle, differentiating \(x^2+y^2=r^2\) term by term gives \(2x+2y\,y'=0\), so
\[ \boxed{y'=-\frac{x}{y}}. \]
This matches the slope one would get by solving \(y=\pm\sqrt{r^2-x^2}\) explicitly and differentiating, but without ever splitting into the two branches or dealing with the square root.
A relation mixing several of the rules above works exactly the same way. For
\[ e^{2x-9y}+x^3y^2=\sin(y)+11x, \]
the chain rule handles the exponential term, \(\frac{d}{dx}e^{2x-9y}=e^{2x-9y}(2-9y')\); the product rule handles \(x^3y^2\), \(\frac{d}{dx}(x^3y^2)=3x^2y^2+2x^3y\,y'\); and the chain rule again handles the right-hand side, \(\frac{d}{dx}\sin(y)=\cos(y)\,y'\). Differentiating both sides and collecting every term containing \(y'\) on one side gives
\[ \bigl(2x^3y-9e^{2x-9y}-\cos(y)\bigr)y'=11-2e^{2x-9y}-3x^2y^2, \]
so
\[ \boxed{ y'=\frac{11-2e^{2x-9y}-3x^2y^2}{2x^3y-9e^{2x-9y}-\cos(y)} }. \]
Unlike an explicit derivative, this expression depends on \(y\) as well as \(x\): it gives the slope at any point \((x,y)\) that actually satisfies the original equation.
Discrete View: Finite Differences
On sampled data or sequences, derivatives are approximated by differences:
\[ f'(t)\approx \frac{f(t+\Delta t)-f(t)}{\Delta t}. \]
For \(\Delta t=1\), this becomes \(f(t+1)-f(t)\). This discrete slope connects directly to sequences.
Higher Derivatives
The second derivative \(f''(x)\) describes curvature. In mechanics, if \(s(t)\) is position, then
\[ s'(t)=v(t),\qquad s''(t)=a(t). \]
Higher derivatives appear in local polynomial approximations such as Taylor Series.
In general, the \(n\)-th derivative is written \(f^{(n)}(x)=\dfrac{d^n}{dx^n}f(x)\), meaning \(f\) differentiated \(n\) times in a row. A handful of elementary functions have a closed form for every order \(n\) at once, rather than only for the first one or two. Repeatedly applying \(\frac{d}{dx}e^x=e^x\) gives
\[ \frac{d^n}{dx^n}e^x=e^x. \]
Repeatedly differentiating \(\sin x\) cycles through \(\cos x,-\sin x,-\cos x,\sin x,\dots\), which is the same as shifting the argument by \(\frac{\pi}{2}\) at each step; the same holds for \(\cos x\), as proved by induction separately:
\[ \frac{d^n}{dx^n}\sin x=\sin\!\left(x+n\frac{\pi}{2}\right), \qquad \frac{d^n}{dx^n}\cos x=\cos\!\left(x+n\frac{\pi}{2}\right). \]
Repeatedly differentiating \(\ln x\) instead produces a power of \(x\) with alternating sign, since each step applies the power rule to the previous \(1/x^k\) term:
\[ \frac{d^n}{dx^n}\ln x=(-1)^{n-1}(n-1)!\,\frac{1}{x^n},\qquad n\ge1. \]
For a general power function, \(n\) applications of the power rule multiply together \(n\) consecutive factors of the exponent, \(r(r-1)\cdots(r-n+1)\) — the same falling factorial that defines the generalized binomial coefficient \(\binom{r}{n}=\frac{r(r-1)\cdots(r-n+1)}{n!}\) for any real \(r\), not only non-negative integers:
\[ \frac{d^n}{dx^n}\bigl(ax^r\bigr)=a\,r(r-1)\cdots(r-n+1)\,x^{r-n}=a\,n!\binom{r}{n}x^{r-n}. \]
Connections to Optimization and Control
In one-dimensional optimization, critical points are solved from \(f'(x)=0\); the surrounding theory of local and absolute extrema, and the closed-interval method for finding them, is developed in Extrema and the Mean Value Theorem. In higher dimensions, derivatives generalize to gradients, used in gradient descent.
Newton-type methods use derivative information to find roots or optimize faster, as in Newton-Raphson iteration.
In control loops, derivative terms damp fast error changes. This is the D-part in PID control.
Common Pitfalls
- Using derivative formulas outside the function domain.
- Assuming \(f'(x_0)=0\) always means local extremum.
- Confusing finite differences with exact derivatives.
- Applying chain rule in the wrong order.
- In implicit differentiation, forgetting the extra factor \(y'\) that the chain rule attaches to every term containing \(y\).