Here’s a quick sketch of the situation.

So, we’re looking for the shortest length of the dashed line. Notice as well that if the shortest distance isn’t at\(x = 0\) there will be two points on the graph, as we’ve shown above, that will give the shortest distance. This is because the parabola is symmetric to the \(y\)-axis and the point in question is on the \(y\)-axis. This won’t always be the case of course so don’t always expect two points in these kinds of problems.

In this case we need to minimize the distance between the point \(\left( {0,2} \right)\) and any point that is one the graph \(\left( {x,y} \right)\). Or,

\[d = \sqrt {{{\left( {x - 0} \right)}^2} + {{\left( {y - 2} \right)}^2}} = \sqrt {{x^2} + {{\left( {y - 2} \right)}^2}} \]

If you think about the situation here it makes sense that the point that minimizes the distance will also minimize the square of the distance and so since it will be easier to work with we will use the square of the distance and minimize that. If you aren’t convinced of this we’ll take a closer look at this after this problem. So, the function that we’re going to minimize is,

\[D = {d^2} = {x^2} + {\left( {y - 2} \right)^2}\]

The constraint in this case is the function itself since the point must lie on the graph of the function.

At this point there are two methods for proceeding. One of which will require significantly more work than the other. Let’s take a look at both of them.

*Solution 1*

In this case we will use the constraint in probably the most obvious way. We already have the constraint solved for \(y\) so let’s plug that into the square of the distance and get the derivatives.

\[\begin{align*}D\left( x \right) & = {x^2} + {\left( {{x^2} + 1 - 2} \right)^2} = {x^4} - {x^2} + 1\\ D'\left( x \right) & = 4{x^3} - 2x = 2x\left( {2{x^2} - 1} \right)\\ D''\left( x \right) & = 12{x^2} - 2\end{align*}\]

So, it looks like there are three critical points for the square of the distance and notice that this time, unlike pretty much every previous example we’ve worked, we can’t exclude zero or negative numbers. They are perfectly valid possible optimal values this time.

\[x = 0,\hspace{0.25in}x = \pm \frac{1}{{\sqrt 2 }}\]

Before going any farther, let’s check these in the second derivative to see if they are all relative minimums.

\[D''\left( 0 \right) = - 2 < 0\hspace{0.25in}D''\left( {\frac{1}{{\sqrt 2 }}} \right) = 4\hspace{0.5in}D''\left( { - \frac{1}{{\sqrt 2 }}} \right) = 4\]

So, \(x = 0\) is a relative maximum and so can’t possibly be the minimum distance. That means that we’ve got two critical points. The question is how we verify that these give the minimum distance and yes we did mean to say that both will give the minimum distance. Recall from our sketch above that if \(x\) gives the minimum distance then so will –\(x\) and so if gives the minimum distance then the other should as well.

None of the methods we discussed in the previous section will really work here. We don’t have an interval of possible solutions with finite endpoints and both the first and second derivative change sign. In this case however, we can still verify that they are the points that give the minimum distance.

First, let’s see what we have if we are working on the interval \(\left[ { - \frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}} \right]\). On this interval we can try to use the first method of finding absolute extrema discussed in the previous section. That says to evaluate the function at the endpoints and the critical points and in this case, even though we’ve excluded it we’ll need to include \(x = 0\) since it is a critical point in the region. Doing this gives,

\[D\left( { - \frac{1}{\sqrt{2}}} \right) = {\frac{3}{4}}\hspace{0.5in}D\left( 0 \right) = 1\hspace{0.5in}D\left( \frac{1}{\sqrt{2}} \right) = {\frac{3}{4}}\]

So, we can see that the absolute minimum in the interval must occur at \(x = \pm \frac{1}{\sqrt{2}}\).

Next, we can see that if \(x < - \frac{1}{\sqrt{2}}\) then \(D'\left( x \right) < 0\). Or in other words, if \(x < - \frac{1}{\sqrt{2}}\) the function is decreasing until it hits \(x = - \frac{1}{\sqrt{2}}\) and so must always be larger than the function at \(x = - \frac{1}{\sqrt{2}}\).

Similarly, \(x > \frac{1}{\sqrt{2}}\) then \(D'\left( x \right) > 0\) and so the function is always increasing to the right of \(x = - \frac{1}{\sqrt{2}}\) and so must be larger than the function at \(x = - \frac{1}{\sqrt{2}}\).

So, putting all of this together tells us that we do in fact have an absolute minimum at \(x = \pm \frac{1}{\sqrt{2}}\).

All that we need to do is to find the value of \(y\) for these points.

\[\begin{array}{ll}x = \displaystyle \frac{1}{{\sqrt 2 }} & :\hspace{0.25in}y = \displaystyle \frac{3}{2}\\ x = - \displaystyle \frac{1}{{\sqrt 2 }} & :\hspace{0.25in}y = \displaystyle \frac{3}{2}\end{array}\]

So, the points on the graph that are closest to \(\left( {0,2} \right)\) are,

\[\left( {\frac{1}{{\sqrt 2 }},\frac{3}{2}} \right)\hspace{0.25in}\left( { - \frac{1}{{\sqrt 2 }},\frac{3}{2}} \right)\]

This solution method shows how tricky it can be to know that we have absolute extrema when there are multiple critical points and none of the methods discussed in the last section will work. Luckily for us, there is another, easier, method we could have done instead.

*Solution 2*

The first solution that we worked was actually the long solution. There is a much shorter, and easier, solution to this problem. Instead of plugging \(y\) into the square of the distance let’s plug in \(x\). From the constraint we get,

\[{x^2} = y - 1\]

and notice that the only place \(x\) show up in the square of the distance it shows up as \({x^2}\) and let’s just plug this into the square of the distance. Doing this gives,

\[\begin{align*}D\left( y \right) & = y - 1 + {\left( {y - 2} \right)^2} = {y^2} - 3y + 3\\ D'\left( y \right) & = 2y - 3\\ D''\left( y \right) & = 2\end{align*}\]

There is now a single critical point, \(y = {\frac{3}{2}}\), and since the second derivative is always positive we know that this point must give the absolute minimum. So, all that we need to do at this point is find the value(s) of \(x\) that go with this value of \(y\).

\[{x^2} = \frac{3}{2} - 1 = \frac{1}{2}\hspace{0.5in} \Rightarrow \hspace{0.5in}x = \pm \frac{1}{{\sqrt 2 }}\]

The points are then,

\[\left( {\frac{1}{{\sqrt 2 }},\frac{3}{2}} \right)\hspace{0.25in}\left( { - \frac{1}{{\sqrt 2 }},\frac{3}{2}} \right)\]

So, for significantly less work we got exactly the same answer.