Every Algebra student knows the distance formula; that is, how to calculate the distance between two points on the Cartesian coordinate plane: \(\boldsymbol{d = \sqrt{\left(x_{2} – x_{1}\right)^{2} + \left(y_{2} – y_{1}\right)^{2}}}\). This week’s blogpost is about finding the distance between a specific point and the closest point(s) in a function.
Every Calculus textbook that I’ve seen contains several problems of this type: which point(s) on the graph of \(\boldsymbol{y = -x^{2} + 3}\) are closest to the point: \(\boldsymbol{\left( 0 , 1 \right)}\)?
Let’s look at a graph of the function and an approximation of where it appears to be closest to the \(\boldsymbol{\left(0 , 1 \right)}\) point:
But an approximation is not good enough. The task is to find out exactly what the coordinates of the closest point(s) are, and having that information, then compute the exact distance. The trick here is to combine the distance formula we saw earlier with the above equation of a parabola.
\begin{align*}
\text{We know one point, } \left(0 , 1\right) \text{so we’ll use that: } d &= \sqrt{\left(x – 0\right)^{2} + \left(y – 1\right)^{2}} \\
\text{And we also know what } \boldsymbol{y} \text{ is in terms of } \boldsymbol{x} \text{:}\; &= \sqrt{\left(x – 0\right)^{2} + \left(\left(-x^{2} + 3\right) – 1\right)^{2}} \\
\text{Expanding and simplifying everything under the radical:} &= \sqrt{x^{4} – 3x^{2} + 4}
\end{align*}
So, we end up with a streamlined distance formula. This is where differential calculus comes in. We will use it to find out where the smallest values are. And the tool we need is the First Derivate Test. One of the things I’ve learned recently is that in cases like this, you don’t need to bother with radicals!!! Clearly for this purpose the distance formula is easier to handle if we ignore the radical.
\begin{align*}
\text{First, take the derivative: } \frac{d}{dx} \left(x^{4} – 3x^{2} + 4\right) &= 4x^{3} – 6x \\
\text{Then, set it equal to zero: } \qquad \qquad 4x^{3} – 6x &= 0 \\
\text{Factor: } \qquad 2x\left(2x^{2} – 3\right) &= 0 \\
\text{And solve for } \boldsymbol{x} \text{:} \qquad \qquad \qquad x &= 0, \: \pm \frac{\sqrt{6}}{2}
\end{align*}
What we have accomplished this far, is obtained the Critical Numbers; that is, the values where a function is at a maximum or a minimum. We have three Critical Numbers, so we divide the number line into four intervals and check whether the derivative \(\boldsymbol{4x^{3} – 6x}\) is positive (increasing) or negative (decreasing) within each of those intervals. This is called the First Derivative Test.
\begin{align*}
\text{To test the interval } \left(-\infty , -\frac{\sqrt{6}}{2}\right) \text{ we will use } \boldsymbol{-2} \text{:} \qquad 4\left(-2\right)^{3} – 6\left(-2\right) &= -20 \left(< 0\right)\text{, negative slope} \\
\text{To test the interval } \left(-\frac{\sqrt{6}}{2} , 0 \right) \text{ we will use } \boldsymbol{-1} \text{:} \qquad 4\left(-1\right)^{3} – 6\left(-1\right) &= 2 \left(> 0\right)\text{, positive slope} \\
\text{To test the interval } \left(0 , \frac{\sqrt{6}}{2}\right) \text{ we will use } \boldsymbol{1}\text{:} \qquad \quad 4\left(1\right)^{3} – 6\left(1\right) &= -2\left(< 0\right)\text{, negative slope} \\
\text{To test the interval } \left(\frac{\sqrt{6}}{2} , \infty\right) \text{ we will use } \boldsymbol{2}\text{:} \qquad \quad 4\left(2\right)^{3} – 6\left(2\right) &= 20\left(> 0\right)\text{, positive slope}
\end{align*}
From these tests we deduce that the distance function is decreasing to \(\boldsymbol{x = -\frac{\sqrt{6}}{2}}\) and increasing after. Likewise, it is decreasing to \(\boldsymbol{x = \frac{\sqrt{6}}{2}}\) and increasing after. Therefore, \(\boldsymbol{x = \pm\frac{\sqrt{6}}{2}}\) are minimums.
If for some reason you don’t believe that Calculus is getting this right, before we continue, take a look at a graph of the distance formula, where the minimums are marked:
So, \(\boldsymbol{x = \pm\frac{\sqrt{6}}{2}}\) are the points on the original equation (\(\boldsymbol{y = -x^{2} + 3}\)) closest to \(\boldsymbol{\left(0 , 1\right)}\). They correspond to: \(\boldsymbol{y = -\left(\frac{\pm\sqrt{6}}{2}\right)^{2} + 3 = \pm\frac{3}{2}}\).
Now we can use this information to obtain the distance between the closest points:
\[d = \sqrt{\left(\frac{\sqrt{6}}{2} – 0\right)^{2} + \left(\frac{3}{2} – 1\right)^{2}} = \frac{\sqrt{7}}{2} \approx 1.3229\]
A final graph of \(\boldsymbol{y = -x^{2} + 3}\) with the points closest to \(\boldsymbol{\left(0 , 1\right)}\) marked:
If you find any errors in this post, or have some thoughts about it, please, email me at [email protected] .
NOTE: Graphs created with Maple 2023, ©Maplesoft.