In Section 2.2 we explored the meaning and use of the derivative. This section starts by revisiting some of those ideas.

Recall that the derivative of a function \(f\) can be used to find the slopes of lines tangent to the graph of \(f\text{.}\) At \(x=c\text{,}\) the tangent line to the graph of \(f\) has equation
\begin{equation*}
y = \fp(c)(x-c)+f(c)\text{.}
\end{equation*}

The tangent line can be used to find good approximations of \(f(x)\) for values of \(x\) near \(c\text{.}\)

For instance, we can approximate \(\sin(1.1)\) using the tangent line to the graph of \(f(x)=\sin(x)\) at \(x=\pi/3 \approx 1.05\text{.}\) Recall that \(\sin(\pi/3) = \sqrt{3}/2 \approx 0.866\text{,}\) and \(\fp(\pi/3)=\cos(\pi/3) = 1/2\text{.}\) Thus the tangent line to \(f(x) = \sin(x)\) at \(x=\pi/3\) is:
\begin{equation*}
\ell(x) = \frac12(x-\pi/3)+0.866\text{.}
\end{equation*}

(a)(b)

Figure4.4.1Graphing \(f(x) = \sin(x)\) and its tangent line at \(x=\pi/3\) in order to estimate \(\sin(1.1)\text{.}\)

In Figure 4.4.1.(a), we see a graph of \(f(x) = \sin(x)\) graphed along with its tangent line at \(x=\pi/3\text{.}\) The small rectangle shows the region that is displayed in Figure 4.4.1.(b). In this figure, we see how we are approximating \(\sin(1.1)\) with the tangent line, evaluated at \(1.1\text{.}\) Together, the two figures show how close these values are.

Using this line to approximate \(\sin(1.1)\text{,}\) we have:
\begin{align*}
\ell(1.1) \amp = \frac{1}{2}(1.1-\pi/3)+0.866\\
\amp = \frac12(0.053)+0.866 = 0.8925.
\end{align*}

(We leave it to the reader to see how good of an approximation this is.)

We now generalize this concept. Given \(f(x)\) and an \(x\)-value \(c\text{,}\) the tangent line is \(\ell(x) = \fp(c)(x-c)+f(c)\text{.}\) Clearly, \(f(c) = \ell(c)\text{.}\) Let \(\dx\) be a small number, representing a small change in the \(x\)-value. We assert that:
\begin{equation*}
f(c+\dx) \approx \ell(c+\dx)\text{,}
\end{equation*}
since the tangent line to a function approximates well the values of that function near \(x=c\text{.}\)

As the \(x\)-value changes from \(c\) to \(c+\dx\text{,}\) the \(y\)-value of \(f\) changes from \(f(c)\) to \(f(c+\dx)\text{.}\) We call this change of \(y\)-value \(\dy\text{.}\) That is:
\begin{equation*}
\dy = f(c+\dx)-f(c).
\end{equation*}

Replacing \(f(c+\dx)\) with its tangent line approximation, we have
\begin{align}
\dy \amp \approx \ell(c+\dx) - f(c)\notag\\
\amp = \fp(c)\big((c+\dx)-c\big)+f(c) - f(c)\notag\\
\amp =\fp(c)\dx\label{eq_differential}\tag{4.4.1}
\end{align}

This final equation is important; we'll come back to it in Key Idea 4.4.3.

We introduce two new variables, \(dx\) and \(dy\) in the context of a formal definition.

Definition4.4.2Differentials of \(x\) and \(y\)

Let \(y=f(x)\) be differentiable. The differential of \(x\), denoted \(dx\text{,}\) is any nonzero real number (usually taken to be a small number). The differential of \(y\), denoted \(dy\text{,}\) is
\begin{equation*}
dy = \fp(x)dx.
\end{equation*}

We can solve for \(\fp(x)\) in the above equation: \(\fp(x) = dy/dx\text{.}\) This states that the derivative of \(f\) with respect to \(x\) is the differential of \(y\) divided by the differential of \(x\text{;}\) this is not the alternate notation for the derivative, \(\lz{y}{x}\text{.}\) This latter notation was chosen because of the fraction-like qualities of the derivative, but again, it is one symbol and not a fraction.

It is helpful to organize our new concepts and notations in one place.

Key Idea4.4.3Differential Notation

Let \(y = f(x)\) be a differentiable function.

\(\dx\) represents a small, nonzero change in \(x\)-value.

\(dx\) represents a small, nonzero change in \(x\)-value (i.e., \(\dx = dx\)).

\(\dy\) is the change in \(y\)-value as \(x\) changes by \(\dx\text{;}\) hence
\begin{equation*}
\dy = f(x+\dx)-f(x).
\end{equation*}

\(dy = \fp(x)dx\) which, by Equation (4.4.1), is an approximation of the change in \(y\)-value as \(x\) changes by \(\dx\text{;}\) \(dy \approx \dy\text{.}\)

What is the value of differentials? Like many mathematical concepts, differentials provide both practical and theoretical benefits. We explore both here.

The \(x\)-value is changing from \(x=3\) to \(x=3.1\text{;}\) therefore, we see that \(dx=0.1\text{.}\) If we know how much the \(y\)-value changes from \(f(3)\) to \(f(3.1)\) (i.e., if we know \(\dy\)), we will know exactly what \(f(3.1)\) is (since we already know \(f(3)\)). We can approximate \(\dy\)with \(dy\text{.}\)
\begin{align*}
\dy \amp \approx dy\\
\amp = \fp(3)dx\\
\amp = 2\cdot 3\cdot 0.1 = 0.6.
\end{align*}

We expect the \(y\)-value to change by about \(0.6\text{,}\) so we approximate \(f(3.1) \approx 9.6\text{.}\)

We leave it to the reader to verify this, but the preceding discussion links the differential to the tangent line of \(f(x)\) at \(x=3\text{.}\) One can verify that the tangent line, evaluated at \(x=3.1\text{,}\) also gives \(y=9.6\text{.}\)

Of course, it is easy to compute the actual answer (by hand or with a calculator): \(3.1^2 = 9.61\text{.}\) (Before we get too cynical and say “Then why bother?”, note our approximation is really good!)

So why bother?

In “most” real life situations, we do not know the function that describes a particular behavior. Instead, we can only take measurements of how things change — measurements of the derivative.

Imagine water flowing down a winding channel. It is easy to measure the speed and direction (i.e., the velocity) of water at any location. It is very hard to create a function that describes the overall flow, hence it is hard to predict where a floating object placed at the beginning of the channel will end up. However, we can approximate the path of an object using differentials. Over small intervals, the path taken by a floating object is essentially linear. Differentials allow us to approximate the true path by piecing together lots of short, linear paths. This technique is called Euler's Method, studied in introductory Differential Equations courses.

PID controllers

Another place differentials are used is in a PID controller, which stands for “Proportional Integral Derivative”. A PID controller uses concepts of both derivative and integral calculus to very accurately control a process (such as maintaining a stable temperature on an espresso machine).

We use differentials once more to approximate the value of a function. Even though calculators are very accessible, it is neat to see how these techniques can sometimes be used to easily compute something that looks rather hard.

Example4.4.5Using differentials to approximate a function value

We expect \(\sqrt{4.5} \approx 2\text{,}\) yet we can do better. Let \(f(x) = \sqrt{x}\text{,}\) and let \(c=4\text{.}\) Thus \(f(4) = 2\text{.}\) We can compute \(\fp(x) = 1/(2\sqrt{x})\text{,}\) so \(\fp(4) = 1/4\text{.}\)

We approximate the difference between \(f(4.5)\) and \(f(4)\) using differentials, with \(dx = 0.5\text{:}\)
\begin{align*}
f(4.5)-f(4) \amp = \dy \approx dy\\
\amp = \fp(4)\cdot dx \\
\amp = 1/4 \cdot 1/2 \\
\amp = 1/8 \\
\amp = 0.125\text{.}
\end{align*}

The approximate change in \(f\) from \(x=4\) to \(x=4.5\) is \(0.125\text{,}\) so we approximate \(\sqrt{4.5} \approx 2.125\text{.}\)

Differentials are important when we discuss integration. When we study that topic, we will use notation such as
\begin{equation*}
\int f(x)\,dx
\end{equation*}
quite often. While we don't discuss here what all of that notation means, note the existence of the differential \(dx\text{.}\) Proper handling of integrals comes with proper handling of differentials.

In light of that, we practice finding differentials in general.

Example4.4.6Finding differentials

In each of the following, find the differential \(dy\text{.}\)

\(y = \sin(x)\text{:}\) As \(f(x) = \sin(x)\text{,}\) \(\fp(x) = \cos(x)\text{.}\) Thus
\begin{equation*}
dy = \cos(x)dx
\text{.}
\end{equation*}

\(y = e^x\left(x^2+2\right)\text{:}\) Let \(f(x) = e^x\left(x^2+2\right)\text{.}\) We need \(\fp(x)\text{,}\) requiring the Product Rule.

We have \(\fp(x) = e^x\left(x^2+2\right) + 2xe^x\text{,}\) so
\begin{equation*}
dy = \left(e^x\left(x^2+2\right) + 2xe^x\right)dx
\text{.}
\end{equation*}

\(y = \sqrt{x^2+3x-1}\text{:}\) Let \(f(x) = \sqrt{x^2+3x-1}\text{;}\) we need \(\fp(x)\text{,}\) requiring the Chain Rule.

We have \(\fp(x) = \frac{1}{2}\left(x^2+3x-1\right)^{-\frac{1}{2}}(2x+3) = \frac{2x+3}{2\sqrt{x^2+3x-1}}\text{.}\) Thus
\begin{equation*}
dy = \frac{(2x+3)dx}{2\sqrt{x^2+3x-1}}.
\end{equation*}

Finding the differential \(dy\) of \(y=f(x)\) is really no harder than finding the derivative of \(f\text{;}\) we just multiply \(\fp(x)\) by \(dx\text{.}\) It is important to remember that we are not simply adding the symbol “\(dx\)” at the end.

We have seen a practical use of differentials as they offer a good method of making certain approximations. Another use is error propagation. Suppose a length is measured to be \(x\text{,}\) although the actual value is \(x+\dx\) (where we hope \(\dx\)is small). This measurement of \(x\) may be used to compute some other value; we can think of this as \(f(x)\) for some function \(f\text{.}\) As the true length is \(x+\dx\text{,}\) one really should have computed \(f(x+\dx)\text{.}\) The difference between \(f(x)\) and \(f(x+\dx)\) is the propagated error.

How close are \(f(x)\) and \(f(x+\dx)\text{?}\) This is a difference in “y”-values;
\begin{equation*}
f(x+\dx)-f(x) = \dy \approx dy.
\end{equation*}

We can approximate the propagated error using differentials.

Example4.4.7Using differentials to approximate propagated error

A steel ball bearing is to be manufactured with a diameter of 2 cm. The manufacturing process has a tolerance of \(\pm 0.1\) mm in the diameter. Given that the density of steel is about 7.85 ^{cg}⁄_{cm3}, estimate the propagated error in the mass of the ball bearing.

The mass of a ball bearing is found using the equation “\(\text{mass} = \text{volume} \times \text{density}\text{.}\)” In this situation the mass function is a product of the radius of the ball bearing, hence it is \(m = 7.85\frac43\pi r^3\text{.}\) The differential of the mass is
\begin{equation*}
dm = 31.4\pi r^2 dr
\text{.}
\end{equation*}

The radius is to be 1 cm; the manufacturing tolerance in the radius is \(\pm 0.05\) mm, or \(\pm 0.005\) cm. The propagated error is approximately:
\begin{align*}
\Delta m \amp \approx dm\\
\amp = 31.4\pi (1)^2 (\pm 0.005)\\
\amp = \pm 0.493\text{g}
\end{align*}

Is this error significant? It certainly depends on the application, but we can get an idea by computing the relative error. The ratio between amount of error to the total mass is
\begin{align*}
\frac{dm}{m} \amp = \pm \frac{0.493}{7.85\frac43\pi}\\
\amp =\pm \frac{0.493}{32.88}\\
\amp =\pm 0.015\text{,}
\end{align*}
or \(\pm 1.5\%\text{.}\)

We leave it to the reader to confirm this, but if the diameter of the ball was supposed to be 10 cm, the same manufacturing tolerance would give a propagated error in mass of \(\pm12.33\) g, which corresponds to a percent error of \(\pm0.188\%\text{.}\) While the amount of error is much greater (\(12.33 \gt 0.493\)), the percent error is much lower.