✔ 最佳答案
I will do it this way.
Suppose A(x1,x1^2) and B(x2,ln(x2)) are the points on the respective curves that the 2 curves are closest. Then the line joining these two points must be perpendicular to the tangents at those points. In other words, the tangent at A has a slope equal to the slope of the tangent at B.
Let the slope of the tangents be m.
For y=x^2
dy/dx=2x
slope at A is 2x1=m or x1=m/2
So point A becomes (m/2,m^2/4)
For y=ln(x)
dy/dx=1/x
slope at B is 1/x2=m or x2=1/m
So point A becomes (1/m,ln(1/m))
Slope joining A and B is [m^2/4-ln(1/m)]/(m/2-1/m)
which must equals to -1/m (since m1m2=-1 for perpendicular lines)
[m^2/4-ln(1/m)]/(m/2-1/m) = -1/m
m^3/4-mln(1/m)=1/m-m/2
m^3/4-mln(1/m)-1/m+m/2=0
Observing from the graph the approximate slope m for such curves should be around m=1. By using bisection method starting with (0.5,1.5), m is obtained as 1.076.
Minimum distance = sqrt{[m^2/4-ln(1/m)]^2+(m/2-1/m)^2}
=0.534
Please check if I made no mistake in my calculation.
2009-06-16 09:10:45 補充:
Using Lagrange Multiplier method, and use D^2 instead
(x1-x2)^2 + (y1-y2)^2 + L1(y1-x1^2)+L2(y2-ln(x2)) the partial derivatives yield:
2(x1-x2)-2L1x1=0...(1)
2(y1-y2)+L1=0...(2)
-2(x1-x2)-L2/x2=0...(3)
-
2009-06-16 09:10:53 補充:
-2(y1-y2)+L2=0...(4)
y1-x1^2=0...(5)
y2-ln(x2)=0...(6)
(1)&(2) => (y1-y2)/(x1-x2)=-1/2x1 (basically the same meaning as the line joining the 2 points are perpendicular to the tangent)
(3)&(4) => (y1-y2)/(x1-x2)=-x2
Manipulating these will yield exactly the equations done by dndmmokaa...