Distance from the origin to the curve

  • Context: Undergrad 
  • Thread starter Thread starter physicsCU
  • Start date Start date
  • Tags Tags
    Curve Origin
Click For Summary

Discussion Overview

The discussion revolves around finding the minimum distance from the origin to a curve defined by parametric equations in a programming context, specifically using MATLAB. Participants explore methods for deriving the distance formula and the necessary steps to implement this in code.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant seeks a formula to determine the minimum distance from the origin to a curve, noting the need to identify points on the curve for minimization.
  • Another participant suggests using the distance formula and differentiating it to find the shortest distance.
  • A participant points out that since one point is the origin, the distance formula can be simplified to D = √((y₁)² + (x₁)²).
  • Some participants discuss the implications of treating x and y as functions of time, leading to the formulation of D² = (x(t))² + (y(t))² and the need to differentiate this with respect to t.
  • There is a mention of finding the input value corresponding to the minimum distance, emphasizing the programming aspect rather than purely calculus.
  • Clarification is sought regarding the expression for minimum distance, with a participant questioning the transition from differentiation to the final distance formula.
  • One participant reiterates the need to differentiate with respect to time to find the minimum distance.

Areas of Agreement / Disagreement

Participants express various approaches to the problem, with some agreeing on the use of the distance formula and differentiation, while others raise questions about the treatment of time and the programming implications. The discussion remains unresolved regarding the best method to implement the solution in code.

Contextual Notes

There are limitations regarding the assumptions made about the curve and the dependence on the definitions of x and y as functions of time. The mathematical steps involved in differentiation and the implications for programming are not fully resolved.

physicsCU
Messages
198
Reaction score
1
Anyone know the formula to find the minimum distance from the origin to the curve, and find that point on the curve that is the minimum distance from the origin.

This is for a programming problem in MATLAB, so thanks for any help!

EDIT: By the way, I don't know the points on the curve, so i need to minimize the distance using points that i need to determine.
 
Last edited:
Physics news on Phys.org
Use the distance formula: [tex]D = \sqrt{(y_2-y_1)^2 + (x_2-x_1)^2}[/tex].

Differentiate and solve for the shortest distance.
 
Jameson said:
Use the distance formula: [tex]D = \sqrt{(y_2-y_1)^2 + (x_2-x_1)^2}[/tex].

OK, I got the D, but both x and y are described as functions of time, so how do I get t?
 
X and Y are the coordinates of the curve. Actually, since one point is the origin you can rewrite the equation as:

[tex]D = \sqrt{(y_1)^2 + (x_1)^2}[/tex]

This is because the point (0,0) has no effect on the answer if you put it in.

------
You said you wanted to know how to find the shortest possible distance from the point to the curve, why are you talking about time? i don't understand the question.
 
It is easier to work with the squared distance, rather than the distance.
 
So, putting together the ideas of Jameson and arildno, Let x = x(t), y = y(t), then

[tex]F = D^{2} = (x(t))^{2} + (y(t))^{2}[/tex]

Take the derivative of F with respect to t and set it to zero.

The time at which the minimum distance is attained will be one of the values of t that satisfy the resulting equation, call it [tex]t_{m}[/tex]. The point at which the minimum distance is attained will be [tex](x(t_{m}), y(t_{m}))[/tex] and the minimum distance will be:

[tex]\sqrt{(x(t_{m}))^{2} + (y(t_{m}))^{2}}[/tex]
 
Last edited:
I found the output D, but I need to find the input.

However, this is a programming problem, not a calculus problem, so I have to figure out the code.
 
jimmysnyder said:
So, putting together the ideas of Jameson and arildno, Let x = x(t), y = y(t), then

[tex]F = D^{2} = (x(t))^{2} + (y(t))^{2}[/tex]

Take the derivative of F with respect to t and set it to zero.

The time at which the minimum distance is attained will be one of the values of t that satisfy the resulting equation, call it [tex]t_{m}[/tex]. The point at which the minimum distance is attained will be [tex](x(t_{m}), y(t_{m}))[/tex] and the minimum distance will be:

[tex]\sqrt{(x(t_{m}))^{2} + (y(t_{m}))^{2}}[/tex]

You explained it correctly, you need to take the derivative and set it equal to zero. So why did you say the minimum distance was [tex]\sqrt{(x(t_{m}))^{2} + (y(t_{m}))^{2}}[/tex]? I just don't understand and would like clarification if possible.

You differentiate [tex]x^2 + y^2[/tex] and set it equal to zero, getting
[tex]2x + \frac{dy}{dx} * 2y = 0[/tex]
 
Differentiate with respect to t.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K