Substitute the curve equation into d=x2+y2. Since square root increases with its input, the same x minimizes d and d2. Squaring often leaves a polynomial that is easier to optimize.
Problem
A point P=(x,y) lies on y=x2−9. Express its distance d from the origin as a function of x. For which positive x is the distance smallest, and what is that distance?
Answer
d(x)=x4−17x2+81; the minimum occurs at x=17/2≈2.92, with d=35/2≈2.96.
Checked by completing the square in d²; there is a matching minimum at negative x.
Step-by-step solution
1. Substitute the curve equation
From the distance formula, d=x2+y2. With y=x2−9,
d(x)=x2+(x2−9)2=x4−17x2+81.
2. Minimize the expression under the root
Complete the square in x2:
d2=(x2−217)2+435.
The square cannot be negative, so the minimum occurs when x2=17/2. For positive x, this gives x=17/2.