Re: Distance between a point and y = ax^2 + bx + c



Thanks for you reply :-)

Basically what I have are a lot of points in the plane and I need to find the closest point on an arbitrary curve y= ax^2 + bx from any of those points. According to Maxima there is only one real root to the equation and hence that's the only one I'm investigating. But for some values of x0 and y0 I get only imaginary roots. The pdfs I linked to are just the solution given by Maxima. solution.pdf only has the real root and nothing else. I'm posting the relevant lines from Maxima below. I need to implement this in a software I'm writing, but due to some (real) points giving me imaginary roots only, I'm puzzled at how to proceed from here. I'm not sure if I'm making any sense?... :-/

Oh and you're absolutely right about it being the squared distance (I was just a bit tired when I wrote that).

Lines from Maxima: http://home.student.uu.se/maol9883/files/cubic.jpg
.