Re: shortest distance between a point and a function in 2d




"wanwan" <ericwan78@xxxxxxxxx> wrote in message news:1124989540.660764.175180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I don't think it works in all cases: take P(2, 4) and f(x) = x^2
> logically minimal distance is 0
>
> with your method:
>
> df(x)/dx ( f(x)-Y ) + x - X = 0 => 2x(x^2 - 4) + x - 2 = 0 => 2x^3 -
> 7x -2 = 0
>
> => x=1.12, -0.8, -0.31

How did you find these values?
I find x = 2 or x = -1.7071 or x = -0.2929

When you check on a graph, you'll find that these
are indeed all local minima. The value x=2 obviously
gives a global minimum (0).

Dirk Vdm

>
> verifying f"(x) = 2 > 0
>
> with min(sqrt((x-X)^2 + (y-Y)^2)) from the solution, distance is not 0.
> Did I interpret it wrong?
>


>
> verifying f"(x) = 2 > 0
>
> with min(sqrt((x-X)^2 + (y-Y)^2)) from the solution, distance is not 0.
> Did I interpret it wrong?
>







>
> verifying f"(x) = 2 > 0
>
> with min(sqrt((x-X)^2 + (y-Y)^2)) from the solution, distance is not 0.
> Did I interpret it wrong?
>


.



Relevant Pages

  • Re: all paths between 2 nodes
    ... > in the opposite direction is not a path (at least not under ... > There is no way to interpret your response other than ... > opposite an edge's orientation. ... > algorithm do when the graph doesn't look like that? ...
    (comp.theory)
  • Re: Complete graph and Euler paths
    ... According to Wolfram the graph of such a simplex is ... So with the first constraint you can go ... I interpret "each edge may only be traveled once" to mean ...
    (sci.math)