Linear Approximations and Differentials

Linear Approximations and Differentials

There are many ways to arrive at the theory of calculus. One road there was through an idea known as differentials. We treat $dx$ or $dy$ as their own independent variables in this methodology. We aren’t going to investigate this very thoroughly presently. Instead, we will use it as a tool to understand a number of ideas ubiquitous in modern experimental design.

1. Theory of Linear Approximations

If we have a function f(x) with a value associated with $f(x_0)$ that is difficult to obtain exactly, we may wish to approximate this. We already have all the tools in hand to do this! Recall that one way to conceptualize the derivative is as the slope of the tangent line passing through a point. If we obtain a tangent line near a point on f that is easy to obtain such as $f(x_1)$ and such that $|x_0 – x_1| < \varepsilon$ is small enough then we can obtain a good approximation of $f(x_0)$ by using the line tangent to $f(x_1)$. Let us consider an example:

Example 1.1: Approximate $\sqrt{8}$. What function should we consider?

$f(x) = \sqrt{x}$ seems like the appropriate choice.

Example 1.2: Approximate $\sqrt{8}$. What value of f(x) should we consider that is nearby and that we can obtain exactly?

$f(9) = \sqrt{9} = 3$ is optimal. It is close by and provides an easy point to calculate a tangent line.

Example 1.3: Find the tangent line at the appropriate point to approximate $\sqrt{8}$. Calculate the approximation and compare it to a calculator result.

$f(x) = \sqrt{x} \rightarrow$
$f'(x) = \frac{1}{2\sqrt{x}}$
$f'(3)= \frac{1}{6}$
$y = \frac{1}{6}x + b$
$3 = \frac{1}{6}9 + b$
$3 = \frac{3}{2} + b$
$b = \frac{3}{2}$
$y(8) = \frac{1}{6}8 + \frac{3}{2} = \frac{17}{6} \approx 2.8333$
$\sqrt{8} \approx 2.8284…$
So the approximation is within 1% of the true value!


There are some nuances to consider here. For instance, if the first derivative is large near a point, then it is likely that the linear approximation is only valid in a very small neighborhood of that point. Secondly, if the function is oscillatory in nature, it is also likely that linear approximation may not be ideal. This example even suggests that we might somehow better approximate functional values by incorporating higher level derivatives. The second derivative tells us how fast the first derivative is changing and we may be able to further correct for this with the right sort of manipulations. We see power series and Taylor’s theorem which do exactly this later!

Example 2: Find a linear approximation for $ln(8)$.

Our function under consideration is $f(x) = ln(x)$. We want a nearby value that we can find exactly. $e^2 \approx 7.4…$ seems best.

Now, we obtain
$f(e^2) = ln(e^2) = 2ln(e) = 2$
$f'(x) = \frac{1}{x}$
$f'(e^2) = \frac{1}{e^2}$
$y = \frac{1}{e^2}x + b$
$2 = \frac{1}{e^2}e^2 + b$
$b = 1$
$y = \frac{1}{e^2}x + 1$
$y(8) = \frac{1}{e^2}8 + 1 = \frac{8 + e^2}{e^2} \approx 2.08$

$ln(8) \approx 2.08$

Example 3: Find a linear approximation of $2.1^3$

Here, we take $f(x) = x^3$. 2 is a nearby x for which we have a nice exact value, $x =2 $.

$f(2) = 2^3 = 8$
$f'(x) = 3x^2$
$f'(2) = 3(2)^2 = 12$
$y = 12x + b$
$8 = 12(2) + b$
$b = -16$
$y = 12x – 16$
$y(2.1) = 12(2.1) – 16 = 25.2 – 16 = 9.2$

$2.1^3 \approx 9.2$

2. Theory of Differentials

We often write $y’ = \frac{dy}{dx} = f'(x)$ and consider them equivalent notations. They are not exactly equivalent and they draw attention to different aspects of the derivative. Recall that we established the derivative as the limit of the secant line approximation. The notation $\frac{dy}{dx}$ captures this idea very succinctly. Consider the following example.

In an experimental set up, we might have a good mathematical model- say the rate of diffusion of some substances varies with the volume of space according to the mathematical model given to the right. Then, we might consider the derivative in order to find the uncertainty in experimental predictions. If I can only measure the radial dimension of my volume x with precision .1 and I measure it to be 3.0 then I find that my model has uncertainty given by 27 cubic units. Note that there are two ways of seeing this. The first one is a calculation using differentials and the second is a calculation using substitutions of nearby x values.

Keep in mind all experimental measurements have inherent error. Often, we can control a particular variable in a well designed experiment, but we may only be measuring an instrumental output with a nonlinear response. If our model has a nonlinear response than our uncertainty is also nonlinear.

$f(x) = 10x^3$
$\frac{dy}{dx} = 30x^2$
$dy = 30x^2dx$
$dy = 30(3.0^2)(.1) = 27$

$f(2.9) \approx 244$
$f(3.0) = 270$
$f(3.1) \approx 298$

What do I mean by a nonlinear response? If our response were linear then uncertainties of .1 in the independent parameter would always result in the same uncertainties in the dependent parameter. However, if we consider the above example near 10.0, then we find that $dy = 30(10.0)^2(.1) = 300$. Here the same movement in the independent parameter creates vastly different uncertainties in the dependent parameters depending upon what value the independent parameter has. In the linear response case, this is not what happens- only the uncertainty in the independent parameter is necessary to determine the uncertainty in the dependent parameter. Often, this results in scientists operating in what is sometimes called the linear regime of a detector.

Spectroscopy is a very common example here. Absorbance is fundamentally a logarithmic phenomenon. However, between the y-values (absorbance) of .2 and .8 the logarithm is well approximated by a linear function. We use the approximate linearity to fudge this data a bit and we denote this as the Beer-Lambert law. Here, we generally measure absorbance and use this to calculate concentration. This law could be more precisely written as $A = \mathcal{elc}$ where e depends on several fixed experimental parameters, l is the path length, and c is the concentration in molarity. Let us do some examples where we consider a 0.001 uncertainty in measuring absorbance between 0 and 1. For our experiment, we’ll assume $mathcal{el} = 10 as measured (molar absorptivity multiplied by the path length). The issue with low absorbance or high absorbance is that the detector is actually logarithmically sensitive (often doubly so because of the effect of the use of photomultipliers) to the concentration of the solute being measured.

Example 4: Given $A = 10\mathcal{c}$ with an uncertainty in a of .001, suppose we measure a = .01. What is the concentration and what uncertainty do we expect in that measurement? Can we use this measurement?

$A = 10\mathcal{c}$
$.01 = 10\mathcal{c} \rightarrow \mathcal{c} = .001 M$
$\frac{dA}{d\mathcal{c}} = 10$
$d\mathcal{c} = \frac{dA}{10}$
$d\mathcal{c} = \frac{.001}{10} = .0001 M$

Though this seems fine, what is buried in the details above is that this measurement is already faulty. At low concentrations stray photons have an impact on our measurement and, moreover, the shape of the underlying law is more like $A = \mathcal{el}ln(k\mathcal(c))$

Example 5: Given $A = 10\mathcal{c}$ with an uncertainty in a of .001, suppose we measure a = .40 . What is the concentration and what uncertainty do we expect in that measurement? Can we use this measurement?

$A = 10\mathcal{c}$
$.40 = 10\mathcal{c} \rightarrow \mathcal{c} = .04 M$
$\frac{dA}{d\mathcal{c}} = 10$
$d\mathcal{c} = \frac{dA}{10}$
$d\mathcal{c} = \frac{.001}{10} = .0001 M$

This is likely a reasonable error bound.

Another interesting point that you may already be aware of is that we can repeat an experiment and obtain a standard deviation. How does this relate to the above calculations and why might we use one or the other? Sometimes an experiments is extremely difficult or costly to do and tracking the instrument precision is more reasonable than repeating the experiment. Sometimes an experiment is not repeatable! You may be familiar with observational experiments where repetition is impossible because the event is rare or inflicting the repeated experiment is unethical (think diseases!).

Hopefully, you are equally aware that one of the principal delimiters of science is that with every measurement you get an inherent uncertainty. A principal sign of junk science is a measurement with no reported uncertainty. An additional point is that our calculated uncertainty is usually more precise than an actual uncertainty generated by repeated measurements. Standard deviations are always better than calculated uncertainties, however, sometimes the best you can do is calculated uncertainties.