Distance

Derivate of distance (whose zero we need to find)

Second Derivative of distance (which we need for Newton-Rhapson)