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

Click For Summary
The discussion centers on finding the points on a curve that are nearest to the origin, specifically addressing a problem involving a tilted ellipse described by the equation 5x² - 6xy + 5y² = 4. Participants explore methods to minimize the distance from the origin, emphasizing the use of calculus and the first derivative to find maxima and minima. They clarify that the curve is not a circle but an ellipse, and suggest using polar coordinates or transformations to simplify the problem. Ultimately, they identify that the closest points to the origin are (1,1) and (-1,-1), confirming their validity by checking against the original equation. The conversation highlights the importance of visualizing the problem and considering different approaches to arrive at a solution efficiently.
  • #61
Ray Vickson said:
(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.
$$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}=\frac{3x\pm 2\sqrt{5-4x^2}}{5}$$
I choose to start with the positive root:
$$s=x^2+y^2~\rightarrow~s_{+y}=x^2+\left[ \frac{3x+2\sqrt{5-4x^2}}{5} \right]^2=x^2+\frac{1}{25}[12x\sqrt{5-4x^2}+20-7x^2]$$
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-300x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
$$s'=0~\rightarrow~60-96x^2-300x\sqrt{5-4x^2}=0$$
I can't solve
 
Physics news on Phys.org
  • #62
Sorry I have already explained how your equation of line 1 is drastically simplified for s’ = 0.
But maybe you want to show that without that you can arrive at the results all the same. However you have taken no account of my observation that there seems to be an error in line 2 - you repeat what you wrote before. So please deal with this, if it is the case tell me I’m wrong.

I think that at the end you will get an equation of the same general kind as your final one you say you can’t solve. But an equation of that kind can be solved algebraically – say the equation is your expression = 0, you just take last term of the left hand to the right hand side of the equation then square both sides and you get an equation which is a quadratic in the variable x2.
 
Last edited:
  • #63
Karol said:
$$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}=\frac{3x\pm 2\sqrt{5-4x^2}}{5}$$
I choose to start with the positive root:
$$s=x^2+y^2~\rightarrow~s_{+y}=x^2+\left[ \frac{3x+2\sqrt{5-4x^2}}{5} \right]^2=x^2+\frac{1}{25}[12x\sqrt{5-4x^2}+20-7x^2]$$
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-300x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
$$s'=0~\rightarrow~60-96x^2-300x\sqrt{5-4x^2}=0$$
I can't solve

Write it as ##300x \sqrt{5-4x^2} = 60 - 96 x^2##. Now square both sides and you will get an equation that is quadratic in the variable ##w = x^2##.
 
  • #64
epenguin said:
However you have taken no account of my observation that there seems to be an error in line 2 - you repeat what you wrote before.So please deal with this, if it is the case tell me I’m wrong.
$$y=\frac{6x\pm\sqrt{36x^2-20(5x^2-4)}}{10}$$
Under the square root (i forgot how it's called):
$$36x^2-20(5x^2-4)=80-64x^2=16(5-4x^2)$$
 
  • #65
Karol said:
$$y=\frac{6x\pm\sqrt{36x^2-20(5x^2-4)}}{10}$$
Under the square root (i forgot how it's called):
$$36x^2-20(5x^2-4)=80-64x^2=16(5-4x^2)$$

Okay and I had been through that several times – I said I was not good at arithmetic.:redface:

So now try and solve that in the way that I and Ray Vickson have indicated .
 
  • #66
Ray Vickson said:
Write it as ##300x \sqrt{5-4x^2} = 60 - 96 x^2##. Now square both sides and you will get an equation that is quadratic in the variable ##w = x^2##.
$$300x \sqrt{5-4x^2} = 60 - 96 x^2~\rightarrow~90000(5-4x^2)=3600-11520x^2+9216x^4$$
$$625x^2(5-4x^2)=25-80x^2+64x^4$$
$$2564x^4-3205x^2+25=0~\rightarrow~2564a^2-3205a+25=0$$
$$\frac{3205\pm\sqrt{10015625}}{5128}$$
The root isn't round, so i didn't calculate till the end. i think it doesn't give any correct x.
 
  • #67
In
Karol said:
$$s'=0~\rightarrow~60-96x^2-300x\sqrt{5-4x^2}=0$$
it is helpful to remove numerical factors of the whole expression which operation do not change the roots.
 
  • #68
epenguin said:
Sorry I have already explained how your equation of a line one is drastically simplified for s’ = 0
Can you please direct me to the post number you explained that, epenguin? there are already many posts and i intend to go through all of them
 
  • Like
Likes Dick
  • #69
epenguin said:
In
it is helpful to remove numerical factors of the whole expression which operation do not change the roots.
$$300x \sqrt{5-4x^2} = 60 - 96 x^2~\rightarrow~25x\sqrt{5-4x^2}=5-8x^2$$
$$625x^2(5-4x^2)=400-1280x^2+1024x^4$$
$$3524x^4-4405x^2+400=0$$
$$\frac{4405\pm\sqrt{13765625}}{7048}$$
No exact root
 
  • #70
Karol said:
$$300x \sqrt{5-4x^2} = 60 - 96 x^2~\rightarrow~25x\sqrt{5-4x^2}=5-8x^2$$
$$625x^2(5-4x^2)=400-1280x^2+1024x^4$$
$$3524x^4-4405x^2+400=0$$
$$\frac{4405\pm\sqrt{13765625}}{7048}$$
No exact root

So, you MUST HAVE made an error somewhere, because you already know the solution. Why do you keep posting incorrect results? Just go back and fix your errors---you don't need us to tell you that.

I quit.
 
  • #71
Karol said:
Can you please direct me to the post number you explained that, epenguin? there are already many posts and i intend to go through all of them

The post where I previously directed you to the post, as well as to a still simpler method, barely more than one line of calculation is #53 :smile:
 
  • #72
Karol said:
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-300x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
It is wrong.
 
  • #73
Has anyone tried to do this problem yet using the method recommended by @ehild in post #12?
 
  • #74
Chestermiller said:
Has anyone tried to do this problem yet using the method recommended by @ehild in post #12?
Yes, I did that in post #38.
 
  • #75
Ray Vickson said:
Yes, I did that in post #38.
Oops. Missed that. Sorry.
 
  • #76
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
I won't continue since i am not sure it's correct. the root isn't precise here either.
Is the mistake in the derivation?
 
  • #77
Karol said:
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
I won't continue since i am not sure it's correct. the root isn't precise here either.
Is the mistake in the derivation?
It is correct so far. And the root is precise.
Ops. @Dick s correct, there is a sign error.
 
  • #78
Karol said:
$$s'=2x+\frac{1}{25}\left[ 12 \left( \sqrt{5-4x^2}-\frac{4x^2}{\sqrt{5-4x^2}} \right)-14x \right]=\frac{60-96x^2-36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
I won't continue since i am not sure it's correct. the root isn't precise here either.
Is the mistake in the derivation?

Not correct. It should be: $$\frac{60-96x^2+36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
Note the change of sign on the '36'.
 
  • #79
Dick said:
Not correct. It should be: $$\frac{60-96x^2+36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}$$
Note the change of sign on the '36'.
Yes, i wrote that the root was not precise but i had in mind this equation, with the ##~+36x\sqrt{5-4x^2}~##
I found the mistake:
$$s'=\frac{60-96x^2+36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}=\frac{12\cdot(5-8x^2+3x\sqrt{5-4x^2})}{25\sqrt{5-4x^2}}$$
$$s'=o~\rightarrow~-100x^4+125x^2-25=0~\rightarrow~-100a^2+125a-25=0$$
$$a_1=1,~a_2=\frac{1}{4}~\rightarrow~x_{1,2}=\pm1,~x_{3,4}=\pm\frac{1}{2}$$
Now i am trying to understand:
epenguin said:
The calculation of ##\frac{d}{dx} (5 x^2 + 5y^2 - 6 xy)## is carried through in full without exploiting the fact that ##\frac{d}{dx} (x^2+y^2) = 0## (at the point of interest) so you only need to find the condition for ##\frac{d}{dx}(xy)=0 ## (which is essentially what I have done in #37). Since #15 I have been trying to prod you to recognise and exploit the fact that the distance function ##(x^2+y^2)## Is also part of the equation of the curve.
Inpost #37:
epenguin said:
Along the curve defined by (1)
$$\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~~~~(4)$$
I know what is ##~y'=dy/dx~## when i am given explicitly ##~y=f(x)~##, for example ##~y=2x^2~##. then y' is the tangent to the curve y=2x2.
But in ##~5x^2-6xy+5y^2=4~## x and y are mixed, so what does ##~dy/dx~## mean? and where is the right side, the =4, in ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~##?
 
  • #80
Well I think this
epenguin said:
This question can be done either by little thought and hard calculations, or hard thought and easy calculations.
has been vindicated and this
penguin said:
? Without any words I think you won’t yourself know what you’ve done or why when you come back to it in six months.
.
in days and hours rather than months, since earlier you were almost at the answer but seemed to forget.
Karol said:
Yes, i wrote that the root was not precise but i had in mind this equation, with the ##~+36x\sqrt{5-4x^2}~##
I found the mistake:
$$s'=\frac{60-96x^2+36x\sqrt{5-4x^2}}{25\sqrt{5-4x^2}}=\frac{12\cdot(5-8x^2+3x\sqrt{5-4x^2})}{25\sqrt{5-4x^2}}$$
$$s'=o~\rightarrow~-100x^4+125x^2-25=0~\rightarrow~-100a^2+125a-25=0$$
$$a_1=1,~a_2=\frac{1}{4}~\rightarrow~x_{1,2}=\pm1,~x_{3,4}=\pm\frac{1}{2}$$
Now i am trying to understand:

Inpost #37:

I know what is ##~y'=dy/dx~## when i am given explicitly ##~y=f(x)~##, for example ##~y=2x^2~##. then y' is the tangent to the curve y=2x2.
But in ##~5x^2-6xy+5y^2=4~## x and y are mixed, so what does ##~dy/dx~## mean? and where is the right side, the =4, in ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~##?
You also seemed to show that you did know what dy/dx is and how to obtain it even when you do not have an explicit formula of form y = f(x) ( in #1 !). The problem presents us with not that form but an ‘implicit’ form generally symbolised f(x, y) = 0, or f(x, y) = C, C a constant. It still describes a two dimensional curve, and dy/dx means the same thing in either form.

You are trying to solve the problem by reorganising the implicit form into an explicit one, which may seem to you safer. It is a perfectly valid mathematical motivation to try and show what can be done in the confines of a given method or approach even when that is not the most convenient. As long as you do recognise that it is not convenient. Also you would soon run into problems where this approach becomes prohibitively complicated, or totally impossible; yours works only because you can solve relevant equations - other examples will give equations you cannot solve, but you would still be able to differentiate the implicit functions.

For the last question you realize it makes no difference if I include a -4 in the bracket or not? It’s a matter of preference and for preference I would normally have put the whole equation ... = 0 and then I might have included it. But the question was originally framed ... = 4.
I could then have derived the quoted equation from d(4)/dx = 0 .
 
Last edited:
  • #81
epenguin said:
For the last question you realize it makes no difference if I include a -4 in the bracket or not? It’s a matter of preference and for preference I would normally have put the whole equation ... = 0 and then I might have included it. But the question was originally framed ... = 4.
I could then have derived the quoted equation from d(4)/dx = 0
I still don't understand, the english is also a bit difficult for me.
I have to maintain correctness and derive both sides of ##~5x^2-6xy+5y^2=4~##
What you did in ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~## is derive one side.
And besides, ##~\dfrac {dy}{dx}~## is suitable for y=f(x), not f(x,y)=C, correct?
And besides, also, when i derived both sides i got the =0, and from that i got ##~y'=\frac{x}{y}~##, but you made ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)=0~## in order to find the extremum.
 
  • #82
Karol said:
I still don't understand, the english is also a bit difficult for me.
I have to maintain correctness and derive both sides of ##~5x^2-6xy+5y^2=4~##
To have the derivative of y, you can differentiate F(x,y) = const with respect to x, applying chain rule.
Karol said:
What you did in ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~## is derive one side.
It was a mistake, @epenguin meant dF(x,y)/dx with ##F(x,y)=x^{2}+y^{2}-\frac {6}{5}xy##
 
  • #83
ehild said:
To have the derivative of y, you can differentiate F(x,y) = const with respect to x, applying chain rule.
I know, that's how i got y'=-x/y
ehild said:
It was a mistake, @epenguin meant dF(x,y)/dx with ##F(x,y)=x^{2}+y^{2}-\frac {6}{5}xy##
Do you mean ##~\frac{dF(x,y)}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~##?
Still it is one side only derivative. how do i get from this to =0 in order to find the extremum?
 
  • #84
Karol said:
I still don't understand, the english is also a bit difficult for me.
I have to maintain correctness and derive both sides of ##~5x^2-6xy+5y^2=4~##
What you did in ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~## is derive one side.
And besides, ##~\dfrac {dy}{dx}~## is suitable for y=f(x), not f(x,y)=C, correct?
And besides, also, when i derived both sides i got the =0, and from that i got ##~y'=\frac{x}{y}~##, but you made ##~\dfrac {dy}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)=0~## in order to find the extremum.

Well no, sorry, I think these points have already been answered in the very previous post #80, which of them hasn’t?
For your last sentence: the given equation has ##(x^2+y^2 -\frac{6}{5}xy)## as constant (##\frac{4}{5}##, but for any other number it would be the same) and therefore its d/dx equals 0 at all points on the curve. So a way of saying what we are trying to do is find a point where the curve slope given by that is equal to that of an origin-centred circle through the same point (your ##~y'=-\frac{x}{y}~##) i.e. cotangency – see #29. In the calculus method when we made these two slopes equal at the point we got the answer.

We are in our fifth page of calculations for a problem which was solved by one line of algebra and then it all fell out (#45) or three or four lines of calculus (#37), and you were there yourself after a calculation just a bit more complicated than necessary but not a huge problem, except for missing a concluding line in #52. I don’t know if this is a problem for you, but the impression you gave me is that you just write out formulae and calculations but not the thread of argument so you sometimes lose sight of it and hence e.g. of distinction between equations that are true always, ones that are true at every point of a given curve, and ones that are true just at particular points.
 
  • #85
Karol said:
I know, that's how i got y'=-x/y

Do you mean ##~\frac{dF(x,y)}{dx}=\dfrac {d}{dx}\left( x^{2\cdot }+y^{2}-\dfrac {6}{5}xy\right)~##?
Still it is one side only derivative. how do i get from this to =0 in order to find the extremum?
As F(x,y)=const, dF(x,y)/dx = 0. From r2 being extremum, you got that y' = -x/y. Combine that with dF/dx=0..
 
  • #86
ehild said:
As F(x,y)=const, dF(x,y)/dx = 0. From r2 being extremum, you got that y' = -x/y. Combine that with dF/dx=0..

This was done in #52. (Even if not in quite the most expeditious way possible see #53, 37.) Not sure why we are still talking about it.
 
Last edited:
  • #87
epenguin said:
the given equation has ##(x^2+y^2 -\frac{6}{5}xy)## as constant (##\frac{4}{5}##, but for any other number it would be the same) and therefore its d/dx equals 0 at all points on the curve. So a way of saying what we are trying to do is find a point where the curve slope given by that is equal to that of an origin-centred circle through the same point (your ##~y'=-\frac{x}{y}~##) i.e. cotangency – see #29. In the calculus method when we made these two slopes equal at the point we got the answer.
How can dF(x,y)/dx be =0 on all the curve? i know that it should be 0 since the right side is constant, but the tangent to an ellipse changes!
Isn't dF(x,y)/dx the tangent to the ellipse?
epenguin said:
Here the radius of the circle is the required shortest distance. What Is the equation of a circle? How does this fit with the equation of the curve? What conditions have to be satisfied to get a situation like diagram?
Equation of a circle whose center is at (h,k) and with radius r:
$$(x-h)^2-(y-k)^2=r^2$$
For origin centered: ##~x^2-y^2=r^2~##. i derive both sides and get ##~y'=\frac{x}{y}~##.
ehild said:
From r2 being extremum, you got that y' = -x/y. Combine that with dF/dx=0
I didn't get y' = -x/y by use of any r. it just came from deriving both sides of ##~x^2+y^{2}-\frac {6}{5}xy=\frac{4}{5}~##
At the extremum point the tangents of the ellipse and circle are equal, i try to equal the circle's tangent ##~y'=\frac{x}{y}~## and that of the ellipse ##~y'=-\frac{x}{y}~## and get nothing:
$$\frac{x}{y}=-\frac{x}{y}~\rightarrow~\frac{x}{y}=0$$
The r doesn't appear and with these two y' equations i can seek only where the tangents equal. later i will find r, so i think
 
  • #88
Karol said:
How can dF(x,y)/dx be =0 on all the curve? i know that it should be 0 since the right side is constant, but the tangent to an ellipse changes!
Isn't dF(x,y)/dx the tangent to the ellipse?
No, it is the tangent of the function F(x, y(x)), a constant function. The tangent of the ellipse is dy/dx.
Karol said:
Equation of a circle whose center is at (h,k) and with radius r:
$$(x-h)^2-(y-k)^2=r^2$$
It is not the equation of a circle.
 
Last edited:
  • #89
Karol said:
How can dF(x,y)/dx be =0 on all the curve? i know that it should be 0 since the right side is constant,RIGHT but the tangent to an ellipse changes!
Isn't dF(x,y)/dx the tangent to the ellipse? NO.

Equation of a circle whose center is at (h,k) and with radius r:
$$(x-h)^2-(y-k)^2=r^2$$
For origin centered: ##~x^2-y^2=r^2~##. I DONT KNOW WHY YOU HAVE STARTED CHANGING EQUATIONS FOR A CIRCLE AND FOR DISTANCE CHANGING A + INTO A -
i derive both sides and get ##~y'=\frac{x}{y}~##. BUT IT HAS MADE YOU GET WRONG WHAT YOU GOT RIGHT IN #1

I didn't get y' = -x/y by use of any r. it just came from deriving both sides of ##~x^2+y^{2}-\frac {6}{5}xy=\frac{4}{5}~##
At the extremum point the tangents of the ellipse and circle are equal, i try to equal the circle's tangent ##~y'=\frac{x}{y}~## and that of the ellipse ##~y'=-\frac{x}{y}~## and get nothing: I THINK YOU ALREADY GOT THE RIGHT EQUATIIONS #52 AND SEEM TO HAVE FORGOTTEN
$$\frac{x}{y}=-\frac{x}{y}~\rightarrow~\frac{x}{y}=0$$
The r doesn't appear and with these two y' equations i can seek only where thhe tangents equal. later i will find r, so i think
 
  • #90
ehild said:
No, it is the tangent of the function F(x, y(x)), a constant function
Where can i learn this subject, what's it's name?
What does it mean a tangent to a function? i visualize the tangent as it's name, tangent to a curve
$$(x-h)^2+(y-k)^2=r^2~\rightarrow~y'=-\frac{x}{y}$$
The tangent to the ellipse function (?) is also ##~y'=-\frac{x}{y}~##, how can it be, they are different graphs?
Ehild said that dF(x,y)/dx is the tangent to the function, not the elipse, so how can i interpret ##~y'=-\frac{x}{y}~## and use it?
 

Similar threads

Replies
7
Views
2K
Replies
22
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 20 ·
Replies
20
Views
2K