Mathematics Source Library
C & ASM


Roots of Nonlinear Functions

Roots of Nonlinear Functions

A root of a real-valued function of a real-variable, f(x), is a real number a such that
f(a) = 0.

The solution of the problem of finding a root of an function can be used to solve other problems such as:
  • Find a value of x such that f(x) = a .
    Consider the function g(x) = f(x) - a and apply the procedure to the function g(x).

  • Find the intersection of two curves f(x) and g(x).
    Consider the function h(x) = f(x) - g(x) and apply the procedure to the function h(x).

  • Optimization problems where one wants a local maximum or minimum of a differentiable function f(x).
    Consider the function f'(x) = d/dx (f(x)) and apply the procedure to the function f'(x).


Table of Methods for Finding Roots of a Function

Caveats

All of the numerical methods listed above require that the function be continuous and some methods require that the function be differentiable. Also all of the numerical methods listed above are iterative methods that require at least one initial estimate of the root and some require two initial estimates which not only bracket a root but also must satisfy the condition that if the function evaluated at one estimate is positive then the function evaluated at the other estimate is negative. Note that those methods that need two estimates which bracket a root cannot be applied to functions which are nonnegative everywhere or nonpositive everywhere, e.g. y = x ². Those methods which require only one initial estimate may behave poorly in a neighborhood of a local minimum or local maximum and may behave poorly if the order of the root exceeds 1. The order of a root a of a function f(x) is a number n such that f(x) = ( x - a ) n g(x) , where g(x) is defined at a and g(a) is non-zero. The order of a root is also called the multiplicity of the root.

Root Solution Check List.
  • Is the function f(x) nonnegative or nonpositive?
    Consider the secant method or Newton_Raphson's method or consider the function g(x) = f(x) / f'(x), in order for a nonnegative differentiable function to have a root, the root must have order greater than 1, but beware g(x) may behave badly in a neighborhood of a root of f'(x) unless it is also a root of f(x).

  • Is the root of f(x) a multiple root?
    If it is, consider the function g(x) = f(x) / f'(x), but see beware above.

  • Is there a local minimum or maximum near the root.
    Try to use a bracketing method if possible. If a bracketing method is not available, create a hybrid method.