Finding the minimum distance between two curves

  • Context: Undergrad 
  • Thread starter Thread starter Charles Link
  • Start date Start date
Charles Link
Science Advisor
Homework Helper
Insights Author
Gold Member
2025 Award
Messages
5,986
Reaction score
3,133
TL;DR
The problem is to compute the minimum distance between the two curves y=4-x^2 and y=(x-3)^2 in two dimensions.
The other day a friend of mine gave me the above problem which I found rather interesting. I was able to get a numerical solution. I'll post how I solved it later in the thread. Others may want to try it and see what they come up with.
 
Physics news on Phys.org
Square of the distance is
$$L^2=(y_1-y_2)^2+(x_1-x_2)^2=(4-x_1^2-(x_2-3)^2)^2+(x_1-x_2)^2$$
The condition of minimum is
$$\frac{\partial L^2}{\partial x_1}=\frac{\partial L^2}{\partial x_2}=0$$
Intersection of these two curves would give an answer.
 
Last edited:
  • Like
Likes   Reactions: Charles Link
@anuttarasammyak That's one part of what I did to solve it. Those two partial derivative expressions are really too clumsy to solve exactly. I used them though by getting an approximate ## x ## for where the two ## x ## values occur by first solving for the ## x ## where the vertical distance is a minimum. That turns out to be at ## x=3/2 ##.

I then let ## x_1=3/2+ \Delta_1 ## and ## x_2=3/2+ \Delta_2 ## and solved for ## \Delta_ 1## and ## \Delta_2 ## to first order using the two partial derivative expressions.

Others may want to try the calculation and/or have alternative ways of solving it, so I'm leaving just a summary of the solution rather than showing all of the details.
 
Last edited:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
Replies
5
Views
2K