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.
  • #91
Karol said:
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?

The tangent to the ellipse is not that. The slope of the tangent to this ellipse is given in #47, 50. (To be precise, you sometimes say ‘tangent’ when you mean slope of the tangent but we knew what you meant.)

I think the name of the subject is ‘implicit differentiation’, or ‘differentiation of implicit functions’. But I think you do already know how to do implicit differentiation – you did it to obtain the slope of the tangent to the circle! Ray Vickson did it for the not much more complicated case of this ellipse in #47, 50 which I guess you understood.

So it looks to me more like a question of getting clarity about what has been done, from a few key posts on this thread which I already mentioned, and eventually there are many textbooks with calculus and geometry together, treating conic sections In particular with examples.
 
Last edited:
Physics news on Phys.org
  • #92
Karol said:
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?
Remember the original problem.
capture-jpg.jpg


This equation defines an ellipse. At the same time, it defines two y(x) function, you derived in Post #61,
<br /> y=\frac{3x\pm 2\sqrt{5-4x^2}}{5} (*)
The the graphs of these functions constitutes the ellipse.
* is the explicit definition of y(x). 5xˇ2-6xy+5y2=4 is the implicit definition of y(x). (**)
You have to find a point on the curve which is closest to the origin. That means x2+y2=s is minimum for that point. s has its minimum value if its derivative with respect x is zero.at that point. Remember that point is a point of the curve.
s has its extrems where if dy/dx = -x/y.
You know how x and y are related. Substitute y(x) and dy/dx from formula (*) and its derivative into dy/dx = -x/y. You get an equation for x, that you need to solve.
But you do not need the explicit form of y(x). With implicit differentiation, you get y' = dy/dx from the original formula (*).
When you differentiate 5x2-6xy+5y2=4 you get 10(x+ xy' ) - (6y+x y') = 0 .
Now you have three equation for the x, y coordinates of the point of the curve nearest to the origin:
5x2-6xy+5y2=4
y' = -x/y and
10(x+ y y' ) - 6(y+x y') = 0 .
Solve.

Note I did not speak about a circle.
 

Attachments

  • capture-jpg.jpg
    capture-jpg.jpg
    5.4 KB · Views: 306
  • #93
Tangent to the ellipse:
$$y' = \frac{5x-3y}{3x-5y}$$
Equals the tangent to the circle:
$$\frac{5x-3y}{3x-5y}=-\frac{x}{y}~\rightarrow~y^2=x^2$$
For ##y=\pm x~\rightarrow~x_{1,2}=\pm 1~## and it's wrong
ehild said:
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 θ
$$x=r\cdot \cos\theta,~y=r\cdot \sin\theta$$
$$x^2+y^2-\frac{6}{5}xy=\frac{4}{5}~\rightarrow~r^2(\sin^2\theta+\cos^2\theta)-\frac{6}{5}r^2\cdot\sin\theta\cdot\cos\theta=\frac{4}{5}$$
$$r^2=\frac{4}{5-6\cdot\sin\theta\cdot\cos\theta}$$
$$[r^2]'=4\frac{6(\cos^2\theta-\sin^2\theta)}{(5-6\cdot\sin\theta\cdot\cos\theta)^2}$$
$$[r^2]'=0~\rightarrow~\sin^2\theta=\cos^2\theta~\rightarrow~\theta=\pm 45^0$$
For ##\displaystyle ~\theta=-45^0~\rightarrow~r=\frac{1}{\sqrt{2}}##
Correct
 
Last edited:
  • #94
Karol said:
Tangent to the ellipse:
$$y' = \frac{5x-3y}{3x-5y}$$
Equals the tangent to the circle:
$$\frac{5x-3y}{3x-5y}=-\frac{x}{y}~\rightarrow~y^2=x^2$$
For ##y=\pm x~\rightarrow~x_{1,2}=\pm 1~## and it's wrong
x=±1 if y=x
What is x if y = -x ?
 
  • #95
Karol said:
Tangent to the ellipse:
$$y' = \frac{5x-3y}{3x-5y}$$
Equals the tangent to the circle:
$$\frac{5x-3y}{3x-5y}=-\frac{x}{y}~\rightarrow~y^2=x^2$$
For ##y=\pm x~\rightarrow~x_{1,2}=\pm 1~## and it's wrong

Wrong only in a manner of speaking. Does satisfy the mathematical conditions imposed. However those conditions will give you the maximum as well the minimum distance from centre.

See last line of #50.
 
Last edited:
  • #96
My mistake, again:
$$\frac{5x-3y}{3x-5y}=-\frac{x}{y}~\rightarrow~y^2=x^2$$
For ##~y=x:~x_{1,2}=\pm 1~##.
For ##~y=-x:~x_{1,2}=\pm \frac{1}{2}~##.
The second is the minimum
 
  • #97
ehild said:
You have to find a point on the curve which is closest to the origin. That means x2+y2=s is minimum for that point. s has its minimum value if its derivative with respect x is zero.at that point. Remember that point is a point of the curve.
s has its extrems where if dy/dx = -x/y.
Is dy/dx=-x/y the tangent at the extremum point only or is it a tangent to all point on the distance formula ##~x^2+y^2=s~##?
Because in the explicit form y=f(x) i derive: y'=f'(x) and then equal to zero f'(x)=0 in order to find the extremum.
With the implicit form i don't equal to zero, although i know that when deriving both sides of ##~x^2+y^2=s~## indeed the right side is 0. is this the cause?
 
  • #98
Karol said:
Is dy/dx=-x/y the tangent at the extremum point only or is it a tangent to all point on the distance formula ##~x^2+y^2=s~##?
Because in the explicit form y=f(x) i derive: y'=f'(x) and then equal to zero f'(x)=0 in order to find the extremum.
With the implicit form i don't equal to zero, although i know that when deriving both sides of ##~x^2+y^2=s~## indeed the right side is 0. is this the cause?
dy/dx is not tangent to anything. A straight line can be the tangent of a curve. dy/dx is the slope of the tangent line.
The distance of a point from the origin is sqrt(x2+y2) For a given F(x,y)=0, the distance is extremum if ds/dx =0, that is, dy/dx = -x/y.
Around a circle, the tangent lines have the slope dy/dx=-x/y
In the explicit form of the curve, y(x), the derivative y' is not zero.
 
  • #99
With the equation of a circle ##~x^2+y^2=s^2~## ,in the explicit form,i get a slightly different derivative:
$$x^2+y^2=s^2\rightarrow y=\pm\sqrt{s^2-x^2}=\pm(s^2-x^2)^{1/2}$$
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2)=\pm\frac{x}{\sqrt{s^2-x^2}}$$
I insert ##~x^2=s^2-y^2~## and get: ##~y'=\pm\frac{x}{y}~##.
 
  • #100
Karol said:
With the equation of a circle ##~x^2+y^2=s^2~## ,in the explicit form,i get a slightly different derivative:
$$x^2+y^2=s^2\rightarrow y=\pm\sqrt{s^2-x^2}=\pm(s^2-x^2)^{1/2}$$
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2)=\pm\frac{x}{\sqrt{s^2-x^2}}$$
In the middle expression above, you have omitted a factor of x in the numerator.
It should be ##\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2x)##
Karol said:
I insert ##~x^2=s^2-y^2~## and get: ##~y'=\pm\frac{x}{y}~##.
 
  • #101
Karol said:
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2)=\pm\frac{x}{\sqrt{s^2-x^2}}$$
I insert ##~x^2=s^2-y^2~## and get: ##~y'=\pm\frac{x}{y}~##.
You are wrong again.
##\sqrt {y^2}= |y|## instead of y.
 
  • #102
I'm amazed that this thread has gone on for over 100 posts over a month and a half...
 
  • #103
Mark44 said:
I'm amazed that this thread has gone on for over 100 posts over a month and a half...
It is like some sport, finding the errors of Karol. :smile:
 
  • #104
Well maybe we shouldn’t be too harsh about what are just slips or not quite right terminology when we know what he means - would that more students here actually finished a problem and gave an answer instead of just disappearing.

He appears to be on top of the calculus method now – having on the way been misled I guess by superficial resemblances to more familiar things into supposing e.g. dy/dx = 0 or dF/dx = 0 would give solutions to this problem as many students would.

I think it would be useful and instructive and would invite him, before ending to try to get the maximum distance of the curve from the centre (which he almost already has by calculus) by the approach of #45 which is a very short calculation.
 
  • #105
epenguin said:
Well maybe we shouldn’t be too harsh about what are just slips or not quite right terminology when we know what he means - would that more students here actually finished a problem and gave an answer instead of just disappearing.
I have to admire his determination -- that's definitely a plus.
 
  • #106
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2x)=\pm\frac{x}{\sqrt{s^2-x^2}}$$
ehild said:
You are wrong again.
##\sqrt {y^2}= |y|## instead of y.
I insert ##~x^2=s^2-y^2~## and get ##~y'=\pm\frac{x}{\vert y \vert}##
Doesn't it equal ##~\pm\frac{x}{y}~##?
 
  • #107
Karol said:
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2x)=\pm\frac{x}{\sqrt{s^2-x^2}}$$

I insert ##~x^2=s^2-y^2~## and get ##~y'=\pm\frac{x}{\vert y \vert}##
Doesn't it equal ##~\pm\frac{x}{y}~##?
No. ##\frac x y \ne \frac x {|y|}##
(I'm ignoring the ##\pm## for the moment, but it doesn't change things.)
 
  • #108
Karol said:
$$y'=\pm\frac{1}{2}(s^2-x^2)^{-1/2}\cdot(-2x)=\pm\frac{x}{\sqrt{s^2-x^2}}$$
It is wrong, you miss the minus in front of x.
Karol said:
I insert ##~x^2=s^2-y^2~## and get ##~y'=\pm\frac{x}{\vert y \vert}##
Doesn't it equal ##~\pm\frac{x}{y}~##?
No. It should be ##y'=\mp\frac{x}{\vert y \vert}##
Better not to use ± if you do not know what it means. A quantity can not be equal to an other quantity and its negative at the same time, unless it is zero. Think: what is y' if y>0? What is y' it y<0?
 
  • #109
ehild said:
It is wrong, you miss the minus in front of x.

No. It should be ##y'=\mp\frac{x}{\vert y \vert}##
Better not to use ± if you do not know what it means. A quantity can not be equal to an other quantity and its negative at the same time, unless it is zero. Think: what is y' if y>0? What is y' it y<0?
In ##~y'=\frac{x}{\vert y \vert}~## y''s sign depends on x in both cases, when y>0 and y<0.
I wrote ± because of the of the square root of ##~x^2+y^2=s^2\rightarrow y=\pm\sqrt{s^2-x^2}~##, and i mean that either ##~\sqrt{s^2-x^2}~## or ##~-\sqrt{s^2-x^2}~## satisfies y2.
For a circle, for the same x, y' is + and - but for opposite y's. but we didn't talk about a circle but about the distance function.
Indeed y' can't be +y' and -y' at the same time, so i don't know what to say. it came from the root.
 
  • #110
Hopefully we are just into being careful about meanings of terms now.
##\pm## and ## \mp ## come in pairs, meaning that the two things can both be ±, but not independently; ##\pm## means something can be either + or - , but if it is then followed by ## \mp ## something then that other thing can also be ± , but the second thing has to be - when the first is + and vice versa. I would have thought it is fairly obvious when you come across it, which is not often. There is an example in #45. In that case as they apply to a positive number (½) It means that the two points in question are in the top left and bottom right quadrants. If instead it was a number you didn’t know the sign ot it would mean the two points are just in opposite quadrants.

I don’t know that then this convention is rigidly extended. That is, if you see two ± ‘s near each other it won’t always be intended that if the first is + then so necessarily is the second; it might be explained or you might be expected to work it out for yourself,
 
  • #111
Karol said:
For a circle, for the same x, y' is + and - but for opposite y's. but we didn't talk about a circle but about the distance function.
Indeed y' can't be +y' and -y' at the same time, so i don't know what to say. it came from the root.
You do not really know how to use ± correctly.
In Post #99 you wrote ## y=\pm\sqrt{s^2-x^2}##, and then you took the derivative of y. But ## y=\pm\sqrt{s^2-x^2}## is not a function. It is two functions: ##y_1(x)=\sqrt{s^2-x^2}## and ##y_2(x)= - \sqrt{s^2-x^2}## .
The derivative of the first one is $$y'_1(x)=\frac{-x}{\sqrt{s^2-x^2}}= \frac{-x}{y_1}$$.
The derivative of the second one is $$y'_2(x)= - \frac{-x}{\sqrt{s^2-x^2}}=\frac{-x}{-\sqrt{s^2-x^2}}= \frac{-x}{y_2}$$.
You see y'=-x/y either you take the + sign or - sign in front of the square root in ## y=\pm\sqrt{s^2-x^2}##.
 
Last edited:
  • #112
I try to do the same with the help of ##~\sqrt{y^2}=|y|~##:
$$x^2+y^2=s^2\rightarrow y=|\sqrt{s^2-x^2}|=|(s^2-x^2)^{1/2}|$$
$$y'=\frac{1}{2}|\sqrt{s^2-x^2}^{-1/2}\cdot (-2x)|=\vert \frac{x}{\sqrt{s^2-x^2}} \vert=\vert \frac{x}{y} \vert$$
You see, no - sign before the x/y
 
  • #113
Karol said:
I try to do the same with the help of ##~\sqrt{y^2}=|y|~##:
$$x^2+y^2=s^2\rightarrow y=|\sqrt{s^2-x^2}|=|(s^2-x^2)^{1/2}|$$
No, this isn't right.
##x^2 + y^2 = s^2 \Rightarrow y = \pm \sqrt{s^2-x^2}##
This means that there are two values of y -- one positive and one negative.
With what you wrote, you get only one value of y. Also, ##|\sqrt{s^2 - x^2}|## is exactly the same thing as ##\sqrt{s^2 - x^2}##. The square root function returns a value that is nonnegative, so taking the absolute value of the radical does precisely nothing.
Karol said:
$$y'=\frac{1}{2}|\sqrt{s^2-x^2}^{-1/2}\cdot (-2x)|=\vert \frac{x}{\sqrt{s^2-x^2}} \vert=\vert \frac{x}{y} \vert$$
You see, no - sign before the x/y
 
  • #114
Karol said:
$$y'=\frac{1}{2}|\sqrt{s^2-x^2}^{-1/2}\cdot (-2x)|=\vert \frac{x}{\sqrt{s^2-x^2}} \vert=\vert \frac{x}{y} \vert$$
You see, no - sign before the x/y
Wrong again.
The derivative of the absolute value of a function is not the same as the absolute value of the derivative.
What is the derivative of f(x)=|x|, for example?
 
  • #115
If i can't use it, why did you write:
ehild said:
You are wrong again.
##\sqrt {y^2}= |y|## instead of y.
$$y=|x|=\left\{ \begin{array}{ll}y=x & x>0 \\ y=-x & x<0 \end{array}\right.$$
$$y'=\left\{ \begin{array}{ll}y'=1 & x>0 \\ y'=-1 & x<0\end{array}\right.$$
But if ##~y = \pm \sqrt{s^2-x^2}~## and not ##~| \sqrt{s^2-x^2}|~## then i can't use absolute value at all
 
  • #116
Karol said:
If i can't use it, why did you write:

$$y=|x|=\left\{ \begin{array}{ll}y=x & x>0 \\ y=-x & x<0 \end{array}\right.$$
$$y'=\left\{ \begin{array}{ll}y'=1 & x>0 \\ y'=-1 & x<0\end{array}\right.$$
But if ##~y = \pm \sqrt{s^2-x^2}~## and not ##~| \sqrt{s^2-x^2}|~## then i can't use absolute value at all
You see you can not say that ##y'= |\frac{d\sqrt{s^2-x^2}}{dx}|##
##~y = \pm \sqrt{s^2-x^2}~## means that s2=x2+y2 is satisfied with both a positive and a negative y for a given x value. Read my Post #111.
##~| \sqrt{s^2-x^2}|~## is the same as ##\sqrt{s^2-x^2}##, read Mark's Post #113.
 
  • #117
And also:
$$y^2=s^2-x^2~\rightarrow~\sqrt{y^2}=\sqrt{s^2-x^2}~\rightarrow~|y|=\sqrt{s^2-x^2}$$
$$\rightarrow~\left\{ \begin{array}{ll}y_1=\sqrt{s^2-x^2} \\ y_2=-\sqrt{s^2-x^2}\end{array}\right.$$
 
  • #118
Karol said:
And also:
$$y^2=s^2-x^2~\rightarrow~\sqrt{y^2}=\sqrt{s^2-x^2}~\rightarrow~|y|=\sqrt{s^2-x^2}$$
$$\rightarrow~\left\{ \begin{array}{ll}y_1=\sqrt{s^2-x^2} \\ y_2=-\sqrt{s^2-x^2}\end{array}\right.$$
Yes, this is correct.
 
  • #119
epenguin said:
The last posts here are unnecessarily complicated. 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.
You used twice in #37 ##~\frac{d}{dx} (x^2+y^2) = 0~##, once in obtaining ##~\frac{d}{dx}(xy)=0~## and then at the end when you equaled the two derivatives.
If you used the first time, why didn't i get ##~\dfrac {dy}{dx}=-\dfrac {x}{y}~~~~~~~~~~~~~~~(3)~##? indeed i used it at the point of interest
 
  • #120
Karol said:
If you used the first time, why didn't i get ##~\dfrac {dy}{dx}=-\dfrac {x}{y}~~~~~~~~~~~~~~~(3)~##? indeed i used it at the point of interest
Sorry your meaning is not clear to me, the ‘you’ and ‘I’ not making sense.

This equation is the condition satisfied by a point (on a continuous curve corresponding to some relation between x and y) that is at a minimum or maximum distance from (0, 0) Compared to other points on the given curve I should say (a pedant would probably say compared with neighbouring points).

I was going to say as I have already said more than once that you got this equation yourself in #1 ! But only now I realize there is something wrong in that post, and that is the → !
The → leads to the equation that only makes its first appearance at the end of #47 !
You probably got my eq 3 in the same way I did but got your papers mixed up?
It may be (often is) more efficient rather than trying to see where you went wrong, if hopefully you have now got it moderately clear, write out the argument, which is not that long, starting from zero.
If you can also at some point answer the question of #104 by any method(s) that would be splendid!

 

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