In general, if given equation of any two curves, how to find the shortest distance?

According to me, finding common normal won't work as it isn't necessary for both of them to have one like in case of domain bounded functions.

We can take a more general approach i.e. by assuming points on both the curves, forming the expression for distance between the points and then minimizing it using partial derivatives.

Though the latter approach is reliable but too lengthy and many a times it produces equations quite difficult to solve especially in case of conics. Isn't there a better method?

Thank you!

  • $\begingroup$ Have you tried to write the space curves parametrically and then minimize $|\vec r_1(t_1)-\vec r_2(t_2)|$ over all $t_1$ and $t_2$? $\endgroup$ – Mark Viola Feb 2 at 3:56
  • $\begingroup$ I don't think I know how to do it (converting algebraic equations to vector form) . It would be great if you could cite a source for learning that! $\endgroup$ – Username Feb 2 at 4:00
  • $\begingroup$ Could you give an example you consider to be difficult ? I would enjoy working it. Cheers. $\endgroup$ – Claude Leibovici Feb 2 at 14:18

The basic answer is NO.

However, the problem becomes much simpler is you minimize the square of the distance; this will give you the same result.

If the problem is still too difficult, make a grid search (only two parameters in $2D$) and zoom more and more around the minimum. Similar to this, you could make a contour plot of the distance as a function of $x_1$ and $x_2$.

If you have a difficult problem as an example, feel free to post it.

  • $\begingroup$ (+1) Salut Claude, mon amie. $\endgroup$ – Mark Viola Feb 2 at 4:28
  • $\begingroup$ @MarkViola. Hi Mark ! Good to see you. Thanks. :-) $\endgroup$ – Claude Leibovici Feb 2 at 4:31
  • $\begingroup$ Et vous. Je vous an price. $\endgroup$ – Mark Viola Feb 2 at 4:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.