 Let's take a look at another optimization problem, the problem of finding the point on a curve closest to a given point. So let's say we want to find the point on the graph of y squared equals x cubed minus 8x minus 15 closest to the origin. To do that, we'll need to know how to find the distance between a point and the origin. So suppose I have a point, the distance to the origin is the length of a line segment connecting that point to the origin. So remember that our coordinates tell us how to get to the point by going over a distance x, then up a distance y. But now we have three sides of a right triangle. So we know what the length of the third side is by the Pythagorean theorem. So we'll find the third side. And that gives us the distance between any point and the origin. Now we'll introduce a little simplification. While we could work with this function, since we know we're going to differentiate and the derivative of a square root is complicated and messy, we can instead minimize the square of the distance. Since y squared equals x squared minus 8x plus 15, we can replace the y squared with this expression. Then the square of the distance between a point on the curve and the origin is going to be, and so we'll use this as our function. To minimize our function, we find the critical points. So first, we'll take the derivative. Since f prime of x is a polynomial, it will always be defined. So the only critical points are going to occur when the derivative is equal to 0. So using the quadratic formula to solve this equation gives us a critical value of minus 2 or 4 thirds. Now in this one particular case, the second derivative is relatively easy to find. So we might use the second derivative test. At x equals negative 2, the second derivative is negative. So the graph is concave down. And x equals minus 2 corresponds to a local maximum. But we don't want the greatest value, we want the least value. So we'll check out the other critical point. At x equals 4 thirds, our second derivative is greater than 0. So the graph is concave up. And so x equals 4 thirds corresponds to a local minimum. Now this shows one last step before we actually answer the question. We actually want to find the point on the graph. Well, since I know the x value, I can find the y value by substituting that into the equation and solving. And so this actually gives us two points, both of which are closest to the origin.