Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@Amir I know the exact position of knot points, so that wont be a problem. But if d above is chosen very small, precision error happens ( dividing two near zero quantities).
@AmirSagiv I meant that I dont have analytic expression for df/dx , only numerical approximation like (f(x+d) -f(x-d))/2d . I understand that Newtons method works, but is it better or worse or equal to (say) secant method when derivative is calculated numerically like this ?