# Graph drawing—Finding the points on a curve that are nearest to the origin

1. Nov 29, 2017

### Karol

1. The problem statement, all variables and given/known data

2. Relevant equations
First derivative=maxima/minima/vertical tangent/rising/falling
When f'(x)>0 ? the function rises

3. The attempt at a solution
Deriving relative to x:
$$10x-6(yy'+x)+10yy'=0~\rightarrow~y'=-\frac{x}{y}$$
What do i do with that?

Last edited by a moderator: Nov 29, 2017
2. Nov 29, 2017

### Dick

You don't do anything with that. The quantity you want to minimize is distance, or $x^2+y^2$. The curve is a 'constraint'. Do you know the Lagrange multiplier method?

Last edited: Nov 29, 2017
3. Nov 29, 2017

### Karol

I don't know the Lagrange method and i am sure it's not to be used, since this chapter is the third in the book, and the book started from "scratch", it taught systematically, and it didn't teach it.
$$s=x^2+y^2~\rightarrow~s'=2x+2yy'$$
I insert $~y'=-\frac{x}{y}~$: s'=0
So the distance is a constant and the equation is a circle.
$$5x^2-6xy+5y^2=4~\rightarrow~x^2+y^2=\frac{4+6xy}{5}$$
I don't know to get the radius and the center, but the circle's center isn't at the origin, so i need to find the line from the center to the origin and then intersect it with the circle to find the point closest.

4. Nov 29, 2017

### Ray Vickson

The curve is not a circle; it is a tilted ellipse.

You can proceed in one of two ways.
(1) Solve the curve equation for y in terms of x; that has two roots, one for the upper part of the curve, and one for the lower part. For each part you can substitute in your formula for y = y(x), to get a squared distance $s = x^2 + y^2$ that is a function of $x$ alone, then use standard calculus methods to find maxima and minima for each of the two parts.
(2) Alternatively, you can figure out how to rotate to a new (orthogonal) coordinate system $(X,Y)$, so that when you substitute in $x = a_1 X + a_2 Y, y=b_1 X + b_2 Y$ you get a new curve $F(X,Y) = 4$ that has no cross-product terms $XY$ in it. For an orthogonal transformation we have $x^2+y^2 = X^2 + Y^2$, so the problem is to maximize/minimize $S = X^2 + Y^2$ on the curve $F(X,Y) = 4$. It is solvable by inspection, needing no calculus at all.

Last edited: Nov 29, 2017
5. Nov 29, 2017

### WWGD

The curve would be a circle only if $(6)xy$ is constant , so that $x^2+y^2$ is itself constant. You don't have any condition guaranteeing this.

6. Nov 29, 2017

### WWGD

Minimize S?

7. Nov 29, 2017

### Ray Vickson

Minimum also solvable by inspection. Original message edited to include this.

8. Nov 29, 2017

### WWGD

I agree, but, aren't we trying to find the minimal distance to the origin?

9. Nov 29, 2017

### Ray Vickson

Minimizing/maximizing $S = x^2 + y^2$ is equivalent to minimizing/maximizing $\sqrt{S} = \sqrt{x^2 + y^2} = \text{distance to origin}.$ However, the squared distance problem tends to be a bit easier, analytically at least.

10. Nov 30, 2017

### Karol

$$5x^2-6xy+5y^2=4~\rightarrow~5y^2-(6x)y+(5x^2-4)=0$$
$$y=\frac{6x\pm\sqrt{36x^2-20(5x^2-4)}}{10}$$
$$s=x^2+y^2~\rightarrow~s_{+y}=x^2+\left[ \frac{3x+2\sqrt{5-4x^2}}{5} \right]=-\frac{366}{25}x^2+12x\sqrt{5-4x^2}+20$$
$$s'_{+y}=-\frac{732}{25}x+12\frac{5-8x^2}{\sqrt{5-4x^2}}$$
$$s'_{+y}=0:~~\frac{x\sqrt{5-4x^2}}{5-8x^2}=\frac{275}{732}$$
I am sure i am wrong

11. Nov 30, 2017

### ehild

The last row is wrong. You miss a square, and made some other mistakes. The denominator 25 divides the whole expression in the numerator.
$$s=x^2+y^2~\rightarrow~s_{+y}=x^2+\left[ \frac{3x+2\sqrt{5-4x^2}}{5} \right]^2$$

12. Nov 30, 2017

### ehild

The solution is very simple if you write the equation of the curve in polar coordinates r, θ. r is the distance from the origin, so you need to find the minimum r (or r^2) in terms of the angle θ.

13. Nov 30, 2017

### StoneTemplePython

One more approach:

Draw the picture.

apply $GM \leq AM$

$xy = (x^2 y^2 )^{\frac{1}{2}} \leq \gamma (x^2 + y^2)$

where $\gamma$ is some positive scalar we don't need to worry about.

Via two different domain restrictions, you get conditions for maximum distance $r^2$ and minimum distance $r^2$. (I.e. there are 4 quadrants in the graph, but you only need to worry about 2 of them, as symmetry then covers the other two.)

14. Nov 30, 2017

### Karol

$$s=x^2+y^2~\rightarrow~s_{+y}=x^2+\left[ \frac{3x+2\sqrt{5-4x^2}}{5} \right]^2$$
$$s_{+y}=\frac{6x+\sqrt{36x^2-100x^2+80}}{10}=x^2+\frac{1}{25}(12x\sqrt{5-4x^2}+20-7x^2)$$
$$s'_{+y}=2x+\frac{1}{25}\left[ 12\left( \sqrt{5-4x^2}-\frac{8x^2}{\sqrt{5-4x^2}} \right)-14x \right]$$
$$s'_{+y}=\frac{36}{25}x+\frac{12}{25}\cdot\frac{5-12x^2}{\sqrt{5-4x^2}}$$
That doesn't give an answer for $~s'_{+y}=0$

15. Nov 30, 2017

### epenguin

Er, #2 tells you the thing you have to minimise. Can you see that thing somewhere in the question?

16. Nov 30, 2017

### Karol

I minimize the distance $~s=x^2+y^2$. in which question do you mean i don't see the distance? in my answer in #15?
The original question sure asks about the distance.
I correct a little mistake:
$$s'_{+y}=\frac{36}{25}x+\frac{12}{25}\cdot\frac{5-8x^2}{\sqrt{5-4x^2}}$$
But still it gives negative under the root, when i try to solve a quadratic equation

17. Dec 1, 2017

### ehild

I got positive under the square root. Show your work.

18. Dec 1, 2017

### epenguin

This question

The equation that appears in the first line of the question #1 I don't seem to be able to reproduce here.

Last edited: Dec 1, 2017
19. Dec 1, 2017

### Karol

$$s'_{+y}=\frac{36}{25}x+\frac{12}{25}\cdot\frac{5-8x^2}{\sqrt{5-4x^2}}$$
$$\frac{36}{25}x=\frac{12}{25}\cdot\frac{5-8x^2}{\sqrt{5-4x^2}}$$
$$3x=\frac{5-8x^2}{\sqrt{5-4x^2}}~\rightarrow~3x\sqrt{5-4x^2}=5-8x^2$$
I make a square of each side:
$$9x^2(5-4x^2)=25-120x^2+64x^4$$
$$45x^2-36x^4=25-120x^2+64x^4$$
$$84x^2=100x^4+25~\rightarrow~100x^4-84x^2+25=0$$
$$x^2=a,~\frac{84+\sqrt{7056-10,000}}{200}$$

20. Dec 1, 2017

### ehild

The second equation is wrong
Wrong. Is 2x5x8=120?