PDA

View Full Version : Fast algorithm to find root of strictly decreasing function


dabd
Oct7-11, 05:53 AM
What is the fastest algorithm to find the closest root (such that the function value at that point is positive to an error but never negative, if not exactly zero) for a strictly decreasing function?

Dickfore
Oct7-11, 05:55 AM
If you can find the derivative of the function, Newton's tangent method, otherwise secant method.

stallionx
Oct7-11, 09:03 PM
What is the fastest algorithm to find the closest root (such that the function value at that point is positive to an error but never negative, if not exactly zero) for a strictly decreasing function?

In the Newton-Raphson Method, you do not need to find the derivative instead


private static double df(double x) {
double del=0.000001;
double x0=f(x+del)-f(x);
x0=x0/del;
return x0;
}