In past chapters, we have dealt with old knowledge from Pascal or Archimedes. Now we jump to more recent times and zoom in on how devices that no engineer can do without work: calculators. I am not talking about any analogue calculators or abacuses, but ordinary electrical calculators such as the Casio fx CG50, although even those are similar in some ways. They store so-called bits (yes/no or 0/1 information) in their memory, which they move differently just like counters to express numbers that way. I'm not going to go into the details here, but one can imagine that by moving bits like this, you can pretty effectively express addition or subtraction of numbers. So we can easily express multiplication. From this, it is no longer far from being a power to integers (squared, third...), which the calculator can also easily manage. But what if we want to calculate, for example, square roots or logarithms, how can a calculator give an answer so quickly?
A quick answer from the calculator to, say, how much $\sqrt{2}$ is might not surprise you as much, because the calculator doesn't actually give the whole answer. The number queried has infinite decimal development, so the calculator can't even display it in full. That's why they don't even try to calculate a number, they make an estimate. This phenomenon was illustrated, for example, in the second episode of the tenth series of the TV series The Simpsons, where Homer subtly points out that according to the $3\,987^{12}+4\,365^{12}=4\,472^{12}$, this contradicts the famous big Fermat sentence. Indeed, just enter $(3\,987^{12}+4\,365^{12})^{1/12}$ into the calculator and you get $4\,472,000\dots$ Appearances are deceiving, however, because if the calculator showed more digits, there would no longer be all zeros. So let's focus on how the calculator can make an estimate. But we're going to look at the square root later, let's imagine first that the calculator can't power and needs to estimate, for example, what $3,001^2 is. This is a simpler example, but we're going to show an important principle on it, through which we work our way to the square root.
Right from the start, we can make our first estimate that $3,001^2\approx $9, for $3,001\approx $3. It seems smart to chip away at that estimate and add a little something to it to refine it. So we can write $3,001^2 \approx 9 + \delta$ (the Greek letter delta). But how do you estimate any reasonable $\delta$? We'll help plot.
On this sketch, the function $x^2$ is approximated around the point $[3;9]$. At first glance, it seems to be an ordinary linear function, but if you look closer (which is not possible in this picture), you'll see that it's a bit obscured as a quadratic function tends to be. This similarity yields the following idea: how about estimating our $\delta$ using a linear function when it's so similar to it? To put it more plainly: how about drawing a line from the $[3;9]$ point that best replicates the $x^2$ function around that point? Then just look at the line at the $3+\delta$ point and we get our estimate. But how do you figure out which line best estimates the function $x^2$ at point $[3;9]$?
One approximate way is to construct a tangent to the function $x^2$ at point $x=3$. Why the tangent? It's the tangent point that follows the function very closely around the point. Sure, it's probably not easy to construct a tangent to some wild function like $x^2$ (school school makes you used to construct a tangent only to the circle), but hopefully we'll figure something out. In the meantime, let's take a look at the tangent line image around the function.
The images look different because I've increased the $x$ axis twice (and the y-axis has changed four times) for clarity on the right.
In the left-hand image, I showed the already somewhat larger area around the $[3;9]$ point, with the functions $f(x)$ and $f(3)+g(x)$. You can see they're very similar. In the right-hand image we have the same functions again, but from $x=0$ to around $x=3.5$, here the functions are already noticeably diverging — the approximation stops working far from the approximated point.
So tangent seems to be a pretty good approximation, at least graphically. Unfortunately, we don't yet know the way to parameter the tangent with a pattern. Never mind, let's look at another method.
In the pictures, I always drew two close points for guidance. Any line is always defined by two points (just put a ruler on two points and draw a line), so what if we used the nearby points lying on the $f(x)=x^2$ curve to define the line? If they're both on a curve, then maybe the line that they're going to form is going to be attached to the curve that it came from. Creating a line from such two points seems feasible. Let's make the number $3, or the $x$ value we start from, as $x_0$ (so $x_0=3$).
Consider the subtle difference between a particular $x_0$ and a $x$ variable.
Here we encountered a slight marking conflict. On one side, $\Delta x$ is a variable; on the other side, it is a specific length shown in the image.
So let's choose two closer points than the ones we've voted for so far. The first point is the classic $[3;9]$ we start from, the second point we pick a little closer. For convenience, let's call that second point $B$. Now we want to calculate the coefficient of $k$, using the same formula as last time: $$k = \frac{\Delta y}{\Delta x} \,.$$
A little clarification on the $k$ meaning. This number says that if we move $\Delta x$ to the right, the line will rise by $\Delta y = k\cdot \Delta x$ to the top. Twice as big a shift to the right, twice as big a climb, etc. It's this climb that's linear and that's where the $k$ calculation comes from.
To continue, let's say the close point of $B$ is located on the $x_0+\delta$ function curve of $f(x)=x^2$. Then we get: $$k = \frac{\Delta y}{\Delta x} = \frac{f(x_0+\delta)-f(x_0)}{x_0+\delta - x_0} = \frac{f(x_0+\delta)-f(x_0)}{\delta}\,.$$
Indeed, the numerator of this fraction describes how much we have moved from $[x_0;f(x_0)]$ upwards, and the denominator indicates how much we have moved to the right. Now we take advantage of the fact that $f(x)=x^2$: $$k=\frac{x_0^2+2\delta \cdot x_0 + \delta ^2- x_0^2}{\delta}= \frac{2\delta \cdot x_0 + \delta ^2}{\delta}=2x_0 + \delta = 6+\delta \,.$$
Mathematically, we would write $k_\delta\cdot \Delta x \to k\cdot \Delta x$. Next, when I say smaller, I mean the absolute value is smaller.
We can express $k_\delta \cdot \Delta x = 6 + \delta$ for any $\delta$. The smaller the delta, the more accurate our approximation line will be. How do we make it as accurate as possible? We simply choose $\delta$ so small that we can neglect it. We get $k\cdot \Delta x =6\cdot \Delta x$. We call such a $\delta$ removal a so-called limit transition because we de facto said that $\delta$ was infinitely small, and that's why we neglected it, which is a little different from the simple declaration $\delta = 0$. I will explain the limited transitions further in the next chapter.
Let's now estimate what $3,001^2$ is using the knowledge charged in the previous paragraphs. We wrote: $$3,001^2=f(x_0+\delta)\approx f(x_0)+k\cdot \Delta x = f(3) + k\cdot 0,001= 9+6\cdot 0,001=9,006\,.$$
The calculator tells us (accurately this time) that $9.006001 would be correct. So we weren't that far off the mark.
You may have noticed, the approximation function $k\cdot \Delta x$ is similar to the result from the chapter on quadratic functions. At the same time, you might also think that approaching two points infinitely close together, which was done in the limit method, might add something like a tangent. The real point is that approximating the limit method gives us a tangent. I'll summarize for a better understanding.
On top of that, I now say two things. First, the $k=6 we found gives the most accurate linear estimate. Second, the $k$ determines the tangent to the function we approximated.
We can't prove my two comments about tangent and accuracy, but perhaps they can be trusted. We can imagine that we've come to a tangent when we draw a few near-tangents made of the two close points. You can't tell them from the tangent. It's trickier about precision, but what line other than the tangent line should approximate the function?
So we were able to estimate what $3,001^2 was. How about $25,006^2? We need to recalculate the $k$ factor for the $25 point (for $25^2=625$). So for two points $x=x_0=25$ and $x=x_0+\delta$: $$k_\delta=\frac{x_0^2+2\delta \cdot x_0 + \delta ^2- x_0^2}{\delta}= \frac{2\delta \cdot x_0 + \delta ^2}{\delta}=2x_0 + \delta = 50+\delta \,.$$
Next, we do a limit transition of $\delta \to 0$ and find that $k=50$. So $25,006^2\approx 625 + 50\cdot0,006=625.3$. Indeed, the calculator says $625,000\,36.
What if we wanted to estimate $1,008^2$, $6,053^2$ or maybe $2,0009^2$? We would always calculate the coefficients of $k$ and there would always be a result of $2\cdot x_0$. We actually created a $k(x)$ function because for every $x=x_0$, you can calculate $k$. We will no longer call this function $k$, but the derivative of the function $f$ and we will denote it $f$.
Unfortunately, the general rule that I am introducing here does not apply to all functions. For example, there are functions that don't have a derivative (and logically the formula can't be used): for example, the discontinuous function $\mathrm{sgn} (x)$ doesn't have a derivative at ground zero. Or the $|x|$ function doesn't have a derivative in zero, it's too pointed. But for the vast majority of functions, it's okay to use the formula.
$$f(x+\Delta x) \doteq f(x) + \Delta x \cdot f'(x)$$
What's the story with the calculator, when in this chapter we've calculated an incomplete estimate of such a simple function as $x^2$? The answer is obvious: we have not sufficiently pro-Brexit. We were only using a linear function. To get better results (and calculators use this process), we would have to find a tangent parabola ($x^2$) or a tangent cubic function of $(x^3)$ and so on up to $x^n$ for a large $n$. Such an approximate polynomial is called Taylor's $n$ grade polynomial, however, it's too advanced a mathematical concept, so we won't go into it in the next one.
Instead, we're going to stick with the concept of derivative, and in the next chapter we're going to figure out the promised derivative of the square root. We'll talk about a few other properties of this function and hopefully see some of its broad applications in the realm of mathematics and physics.