# Minimum distance of a point on a line from the origin?

1. May 7, 2012

### hivesaeed4

Consider the graph of $${x^2 + 2 y^2 = 1}$$.

What is the minimum distance of a point on the graph to the origin?

When I calculated the point which has minimum distance from origin it came out to be (1,0) implying the min distance to be 1. The answer is 1/2. Help?

2. May 7, 2012

### JJacquelin

Hi !
Show your calcul in whole details. So, it will be possible to locate the mistake.

3. May 7, 2012

### hivesaeed4

Okay.
We're given x^2+2*y^2=1.
so x^2=1-2y^2

now using distance formula
d^2=x^2+y^2
since x^2=1-2y^2, substituting it in the distance formula we get:
d^2=1-2y^2+y^2=1-y^2;
differentiating and then setting the eq to 0 we get;
0=-4y
or y=0. now x^2=1-2y^2=1
so x=+-1
so point having min distance form origin is (+-1,0)

using the distance formula now
d^2=x^2+y^2
d=sqrt(1+0)=1

4. May 7, 2012

### JJacquelin

Your computation is correct, but there is a snag :
If the derivative of a function is 0, then the function is minimum or maximum.
The function 1-y² is decreassing, so for y=1 we have the maximum of d², not the minimum.
(1-y²) is the smallest for the heighest value of y². Since x²+2y²=1, the highest value is y²=1/2. Finally, the smallest d=sqrt(1/2) is obtained at (x=0, y=sqrt(1/2))

Less confusing, d² = x²+y² = x²+(1-x²)/2 = (1/2)+(x²/2)
The function of x is increassing. The derivative leads to x=0 and the function is minimum at the point (x=0, y=sqrt(1/2)).

5. May 7, 2012

### hivesaeed4

Okay I get the second part but still don't get the first part.

Let's talk about the second part first. You defined x in terms of y and then solved. I defined y in terms of x. Since your answer is smaller then mine so it's logical that your correct. Now does htat mean that everytime I have to do each question twice i.e. first x interms of y and then y interms of x. And if both your and mine methods are correct should'nt both answers be same.

Now could you explain the first part in greater detail. I could'nt understand the following line:

The function 1-y² is decreassing, so for y=1 we have the maximum of d², not the minimum.
If y=1; d^2=1-(1)^2=0
So how is that the max of d^2?

6. May 8, 2012

### JJacquelin

Think of this : no point exists on the curve x²+2y²=1 with y=1.
So you cannot write : d²=1-(1)²=0. The distance between the origin and a non-existing point of the curve is a nonsense.
Just draw the curve and see what is the range of y for really existing points.

Last edited: May 8, 2012
7. May 8, 2012

### hivesaeed4

Ok I get it now. Thanks.

8. May 9, 2012

### mathwonk

that is obviously an ellipse, with top and bottom at (0,±1/sqrt(2)) and right hand endpoint at (±1,0).

Thus there are 4 critical points for the distance function, namely the two points furthest away and the two points nearest the origin.

9. May 9, 2012

### Hawkeye18

Hi hivesaeed4

Your calculations are correct, but you missed one detail.

When looking for max/min of a function on an interval, you need to compare the values at the critical points (i.e. the points where derivative is 0 or does not exist) and at the endpoints.

In your computations you forget to check endpoints $y=\pm 1/\sqrt2$, and each endpoint give you $d^2=1/2<1$. So the minimal distance is $1/\sqrt2$.

10. May 9, 2012

### hivesaeed4

Okay. But I've noticed in mathwonk's post that 4 critical points are taken into account. Does that mean the error I made was checking only two endpoints, instead of all four for the min/max values of the function?

Does it also mean that for a given function whose min and/or max values are to be calculated, we should first find it's possible critical points and then use distance formula for each critical point?

11. May 9, 2012

### mathwonk

heres another point of view. the function x^2 + 2y^2 has gradient (2x, 4y). Look for points of the ellipse where the radius vector is parallel to this gradient.

I.e. look for solutions (x,y) of x^2 + 2y^2, where (x,y) is parallel to (2x,4y). But these are never parallel unless either x or y = 0. there are 4 such points.