# optimization - distance between points on a graph

• Jan 28th 2010, 10:52 AM
shawli
optimization - distance between points on a graph
Find the points on the graph of $y=9-x^2$ that is closest to the point $(0, 3)$.
• Jan 28th 2010, 11:17 AM
drumist
In general, the distance between two points is

$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$

Use:

$(x_1,y_1)=(x,9-x^2)$ <-- this is a point on the curve
$(x_2,y_2)=(0,3)$

Then we have the distance between a point on the curve and the point $(0,3)$:

$\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$

$=\sqrt{(x-0)^2+(9-x^2-3)^2}$

$=\sqrt{x^2+(6-x^2)^2}$

$=\sqrt{x^2+36-12x^2+x^4}$

$=\sqrt{x^4-11x^2+36}$

Our goal is to find the minimum value of this, so we find the derivative and set it equal to 0 and solve for x.

Can you take it from here?
• Jan 28th 2010, 11:28 AM
shawli
Yes, thank you!

One question though, in the general formula for the distance between two lines, does it matter which function i assign to be $(x_1,y_1)$ and $(x_2,y_2)$?
• Jan 28th 2010, 11:34 AM
drumist
Quote:

Originally Posted by shawli
Yes, thank you!

One question though, in the general formula for the distance between two lines, does it matter which function i assign to be $(x_1,y_1)$ and $(x_2,y_2)$?

No, it works either way. If you need to be convinced, try switching it around and see that you arrive at the same expression.