Definition
The derivative tells us the instantaneous rate at which a function’s output is changing at any given point. The instantaneous rate of change can be seen as the gradient of the tangent at every point of the function. The process of finding a derivative is called differentiation.
The derivative is a core tool of calculus which allows us to measure how much a function’s output changes as it’s input changes.
To gain some physical intuition, we will examine - position as a function of time, and it’s derivatives.
Let’s first look at a few examples of functions describing constant motion (as per Newton’s first law of motion). Let’s say we have a system describing the motion (along 1 dimension) of different particles .
\begin{document}
\begin{tikzpicture}[domain=0:5]
\draw[->] (-1,0) -- (10,0) node[right] {$t$};
\draw[->] (0,-1) -- (0,6) node[left, yshift=-10] {$x(t)$};
\draw[very thin, dashed] (0,0) grid (10, 6);
% Draw the graph
\begin{scope}
\clip (0,0) rectangle (10, 5);
\draw[color=green!40, thick, smooth, domain=0:6] plot (\x, {2.5*\x});
\draw[color=blue!40, thick, smooth, domain=0:6] plot (\x, {0.5*\x + 2});
\draw[color=red!40, thick, smooth, domain=0:10] plot (\x, {0.5*\x});
\draw[color=black!40, thick, smooth, domain=0:6] plot (\x, {\x});
\end{scope}
\draw[color=green!40] (0, 0) -- (2, 5) node[at end, sloped, yshift=-10] {$x(t)_{p_1} = 2.5x$};
\draw[color=blue!40] (0, 2) -- (6, 5) node[midway, sloped, yshift=10] {$x(t)_{p_2} = 0.5x + 2$};
\draw[color=red!40] (0, 0) -- (10, 5) node[midway, sloped, yshift=-10] {$x(t)_{p_3} = 0.5x$};
\draw[color=black!40] (0, 0) -- (5, 5) node[midway, sloped, yshift=-10] {$x(t)_{p_4} = x$};
\end{tikzpicture}
\end{document}We can see that each particle arrives at at a different point in time, dependent on it’s slope/gradient and initial position. If we take the distance travelled, and divide it by the time taken to get there, we will get the particle’s (average) velocity (which in this case is also equal to the instantaneous velocity as we show later).
By examining the graph we can also see that a particle whose motion function has a steeper/large gradient arrives quicker, a.k.a it’s velocity is larger.
Let’s use the velocity equation to calculate each particle’s speed:
Here in the case of constant motion, we can see that the average velocity is the same as the instantaneous velocity for any time as it is constant along the motion of the particle’s trajectory. The velocity is just the slope of the function i.e. the term in .
Notice that the derivative of a variable with respect to itself will always equal 1 (as shown by the example with particle 4). This is since the slope of the line is 1 - if we change a variable by a certain amount, the variable itself changes by the same amount.
Another way of expressing this case (and a non-rigorous proof): \begin{align} &y = f(x) = x \\ & \frac{dy}{dx} = \frac{dx}{dx} = 1 \end{align}
Remark
We see that the gradient (or slope or rise over run) gives us the rate of change of our function w.r.t. it’s independent variable(s). Therefore the tangent line at each point of a function has gradient equal to the instantaneous rate of change of the function at that point.
So what about cases where we do not have a simple linear function? What if our position function includes higher order polynomial terms, or trigonometric, or logarithmic functions?
Let’s take another position function, .
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}[domain=0:10]
\begin{axis}[
axis x line=bottom,
axis y line=left,
]
% Draw the graph
\addplot[thick] plot (\x, {0.2*\x^3 });
\addplot[green!50] coordinates {(2, 1.6) (6, 43.2)};
\addplot[red!40] coordinates {(2, 1.6) (6, 1.6)};
\addplot[blue!40] coordinates {(6, 1.6) (6, 43.2)};
\end{axis}
\end{tikzpicture}
\end{document}We can find the average velocity by again taking (which in this case is ). However we can see this is not the same as the instantaneous velocity at or .
Examining the graph we can see that the gradient increases as increases. In fact the gradient varies/increases across the whole domain we are examining for (thus we can infer velocity is constantly changing/increasing).
Graphical
We can see that as we make the base of our triangle smaller, we get a closer and closer approximation to the tangent line at point where we are approaching as our gets smaller. In fact as the limit of approaches zero, we obtain the instantaneous rate of change.
\usepackage{tikz,pgfplots} \begin{document} \foreach \a in {2,2.95} { % calculate y value for the left endpoint \pgfmathsetmacro{\ya}{0.2*(\a*\a*\a)} \begin{tikzpicture}[domain=0:10] \begin{axis}[ width=8cm, height=6cm, axis x line=bottom, axis y line=left, xmin=0, xmax=8, ymin=0, ymax=50, xlabel={}, ylabel={} ] \addplot[black,thick] {0.2x^3}; \addplot[green!50,thick] coordinates {(\a, \ya) (6,43.2)}; % horizontal leg (red) from (\a, 0.2a^3) to (6, 0.2a^3) \addplot[red!40,thick] coordinates {(\a, \ya) (6, \ya)}; % vertical leg (blue) from (6, 0.2a^3) to (6,43.2) \addplot[blue!40,thick] coordinates {(6, \ya) (6,43.2)}; % optional: label the left point \node at (axis cs:\a,\ya) [below left] {}; \end{axis} \end{tikzpicture} \vspace{1cm} % add some space between figures } \end{document}
```tikz
\usepackage{tikz,pgfplots} \begin{document} \foreach \a in {3.9,4.85} { % calculate y value for the left endpoint \pgfmathsetmacro{\ya}{0.2*(\a*\a*\a)} \begin{tikzpicture}[domain=0:10] \begin{axis}[ width=8cm, height=6cm, axis x line=bottom, axis y line=left, xmin=0, xmax=8, ymin=0, ymax=50, xlabel={}, ylabel={} ] % plot the function y = 0.2x^3 \addplot[black,thick] {0.2x^3}; % secant line (green) from (\a, 0.2a^3) to (6,43.2) \addplot[green!50,thick] coordinates {(\a, \ya) (6,43.2)}; % horizontal leg (red) from (\a, 0.2a^3) to (6, 0.2a^3) \addplot[red!40,thick] coordinates {(\a, \ya) (6, \ya)}; % vertical leg (blue) from (6, 0.2a^3) to (6,43.2) \addplot[blue!40,thick] coordinates {(6, \ya) (6,43.2)}; % optional: label the left point \node at (axis cs:\a,\ya) [below left] {}; \end{axis} \end{tikzpicture} \vspace{1cm} % add some space between figures } \end{document}
```tikz
\usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture}[domain=0:10] \begin{axis}[ width=8cm, height=6cm, axis x line=bottom, axis y line=left, xmin=4, xmax=8, ymin=30, ymax=50, xlabel={}, ylabel={} ] % plot the function y = 0.2x^3 \addplot[black,thick] {0.2x^3}; % secant line (green) from (\a, 0.2a^3) to (6,43.2) \addplot[green!50,thick] coordinates {(5.4, 31.5) (6,43.2)}; % horizontal leg (red) from (\a, 0.2a^3) to (6, 0.2a^3) \addplot[red!40,thick] coordinates {(5.4, 31.5) (6, 31.5)}; % vertical leg (blue) from (6, 0.2a^3) to (6,43.2) \addplot[blue!40,thick] coordinates {(6, 31.5) (6,43.2)}; % optional: label the left point %\node at (axis cs:\a,\ya) [below left] {}; \end{axis} \end{tikzpicture} \begin{tikzpicture}[domain=0:10] \begin{axis}[ width=8cm, height=6cm, axis x line=bottom, axis y line=left, xmin=4, xmax=8, ymin=38, ymax=45, xlabel={}, ylabel={} ] % plot the function y = 0.2x^3 \addplot[black,thick] {0.2x^3}; % secant line (green) from (\a, 0.2a^3) to (6,43.2) \addplot[green!50,thick] coordinates {(5.8, 39) (6,43.2)}; % horizontal leg (red) from (\a, 0.2a^3) to (6, 0.2a^3) \addplot[red!40,thick] coordinates {(5.8, 39) (6, 39)}; % vertical leg (blue) from (6, 0.2a^3) to (6,43.2) \addplot[blue!40,thick] coordinates {(6, 39) (6,43.2)}; % optional: label the left point %\node at (axis cs:\a,\ya) [below left] {}; \end{axis} \end{tikzpicture} \end{document}
The derivative is usually written as:
Derivative of f(x)
\frac{dy}{dx} = \frac{d}{dx}f(x)= f^\prime(x) = \lim_{ \Delta h \to 0 } \frac{f(x + \Delta h) - f(x)}{\Delta h}
where we take the rise over run of the triangle made by $\frac{f(x + \Delta h) - f(x)}{\Delta h}$ as $\lim_{ \Delta h \to 0 }$. We can see that in this definition we are approaching our point of interest from the right (the opposite side from our graphical example above, but the end result is the same).
As shown above, a derivative can be notated in several different manners as it was developed independently by Newton and Leibniz with their own notations, plus the later Euler/Lagrange notation.
Leibniz's notation
In this notation, the derivative of (or ) w.r.t is denoted with differentials: This notation emphasizes the rate of change aspect of derivatives as it presents it as a quotient of differentials. This notation is particularly useful when dealing with differential equations and when expressing partial derivatives w.r.t different independent variables.
Higher order derivatives can be notated using superscript (this does not represent exponentiation) as follows:
- order:
- order:
- order:
Newton's notation
In this notation, the derivative of a function w.r.t is simply denoted with a dot(s) above:
\newcommand\Dot[1]{\dot{#1\phantom{\rule{4pt}{9pt}}}} \Dot{f}
This notation was originally developed by Isaac Newton while developing his formulation of calculus based on what he termed 'fluxions' which described his form of a time derivative. This notation is usually used when describing derivatives w.r.t time, especially in physics contexts. Higher order derivatives can be notated using multiple dots or a numeral above the dot as follows: * $2^{nd}$ order: $\ddot{f\phantom{\rule{4pt}{8pt}}}$ * $3^{rd}$ order: $\dddot{f\phantom{\rule{4pt}{8pt}}}$ * $4^{th}$ order: $\overset{4}{\dot{f\phantom{\rule{4pt}{8pt}}}}$ * $n^{th}$ order: $\overset{n}{\dot{f\phantom{\rule{4pt}{8pt}}}}$
Lagrange's notation
In this notation, the derivative of a function x$ is denoted with a prime mark(s):
f^\prime(x)
This notation was invented by Euler but popularised by Lagrange. Higher order derivatives can be notated by simply adding prime marks or a superscript numeral in brackets as follows: * $2^{nd}$ order: $f^{\prime\prime}(x)$ * $3^{rd}$ order: $f^{\prime\prime\prime}(x)$ * $n^{th}$ order: $f^{(n)}(x)$
Conceptual bridge
The derivative is a local linear approximation: near a point ,
This is the first term of Taylor series thinking. In physics language, if is position, then is Velocity and is acceleration. In more advanced mathematics, the same idea becomes a linear map between tangent spaces on Manifolds.
Common mistake: a derivative is not just “the slope of a curve” in a vague sense; it is the limit of slopes of secant lines. If that limit does not exist, the function is not differentiable at that point. See Limits and continuity.