Last modified: September 19, 2022
This article is written in: 🇺🇸
Root-Finding in Numerical Methods
Root-finding algorithms aim to solve equations of the form
for a scalar (or vector) variable . Although linear problems admit the straightforward solution , many practical applications involve nonlinear equations—polynomial or transcendental—where closed-form solutions may be unavailable or difficult to find. Consequently, numerical methods are indispensable for approximating roots.
Relevance and Applications
- Root-finding is used in engineering to determine operating points and equilibrium solutions in mechanical, electrical, or chemical systems.
- In physics, root-finding helps solve boundary value problems, locate energy eigenstates, or find intersection points in scattering problems.
- In computer science and machine learning, root-finding is involved in optimizing objective functions, which can reduce to solving (\nabla f(x) = 0).
- Financial applications include calculating implied volatilities or internal rates of return, often involving transcendental equations that require root-finding.
- Solving nonlinear systems in higher dimensions, such as (\mathbf{f}(\mathbf{x}) = \mathbf{0}), extends 1D root-finding methods (e.g., Newton’s method generalizes to Newton–Raphson for multiple dimensions).
Basic Concepts
Root
A root of a function is a solution to
Depending on :
- Polynomial functions may have multiple real or complex roots.
- Transcendental functions (e.g., , , ) may have infinitely many roots or require special methods.
- Generalized exponents or radicals () introduce domain constraints or branch cuts.
Brackets and the Intermediate Value Theorem
A bracket is an interval such that
Provided is continuous on , the Intermediate Value Theorem (IVT) guarantees there is at least one root in . This property underpins bracketing methods, ensuring that each iteration can reduce the interval size while preserving a sign change that encloses a root.
Note: If is not continuous, sign changes do not necessarily imply roots in that interval.
Convergence
An iterative method generates a sequence of approximations . If as (for some root ), we say the method converges to . The rate of convergence is an important property:
- Linear convergence: for some .
- Quadratic convergence: .
For example, Bisection typically has linear convergence, while Newton’s Method can exhibit quadratic convergence (under favorable conditions).
Tolerance
A tolerance is chosen so that when
we consider the root sufficiently approximated and stop. The choice of and depends on the application’s precision needs.
Common Root-Finding Methods
Root-finding methods can be broadly classified into bracketing (guaranteed convergence under certain assumptions) and open methods (faster convergence but risk of divergence). Some methods combine both aspects.
Bracketing Methods
Bisection Method
- Start with an interval where to ensure the presence of a root.
- Calculate the midpoint of the current interval.
- If , update the interval to .
- If , update the interval to .
- The method halves the interval length in each iteration, leading to linear convergence with a ratio of 0.5.
- After steps, the bracket size reduces to .
False Position (Regula Falsi)
- Select an interval such that , ensuring the presence of a root in the interval.
- Compute the interpolated point using linear interpolation between and .
- Evaluate to check which subinterval contains the root.
- If , update the interval to .
- If , update the interval to .
- Repeat the computation of and interval updates until the stopping condition is met.
- Stop when or is smaller than the predefined tolerance.
- The final result is the root approximation with accuracy determined by the chosen tolerance.
Open Methods
Open methods rely on derivative information or estimates, and do not require an initial bracket. However, they can fail to converge if poorly chosen initial guesses or pathological function behavior occurs.
Newton’s Method
- Start with an initial guess for the root of .
- Compute the next approximation using the formula .
- At each step, approximate by the tangent line at and solve for the root of this tangent.
- The method exhibits quadratic convergence near simple roots when , as the error reduces quadratically with each iteration.
- The convergence rate satisfies .
- The method requires the derivative , which must be computed or approximated if unavailable.
- If , the method can diverge or produce large, inaccurate jumps.
- Without a guaranteed bracket, the method may fail if the initial guess is too far from the actual root.
Secant Method
- The idea is to approximate using a finite difference, resulting in the formula .
- The iterative formula is derived as , replacing the derivative in Newton's method.
- The method typically exhibits superlinear convergence with a rate close to , which is the golden ratio.
- This approach is useful because it avoids the need for an explicit derivative function, relying instead on previous function evaluations.
Combination Methods
- Start with a bracket such that , ensuring a root exists within the interval.
- Evaluate and , and initialize as the last valid root approximation.
- At each iteration, compute an interpolation candidate using either secant or inverse quadratic interpolation based on the most recent points.
- Check if falls within the bracket and provides sufficient progress toward the root.
- If is valid and improves the approximation, update the bracket to or based on the sign of .
- If fails or is outside the bracket, perform a bisection step by setting the midpoint of the bracket as the next approximation.
- Update to the most recent approximation, ensuring always represents the last reliable approximation of the root.
- Repeat the process until the stopping condition is met, typically when the interval size or is below a predefined tolerance.
- The final result is the approximation , which satisfies the convergence criteria.
Choosing a Root-Finding Method
- Continuity ensures that a bracketing method can reliably locate a root, as the existence of a sign change guarantees a solution within the interval.
- Differentiability allows for use of methods like Newton's, which rely on first derivatives to predict the root. If the derivative is unavailable, alternative methods such as secant or bisection are better options.
- Multiplicity of roots poses challenges for Newton’s method; when a root is not simple (e.g., but ), the method can converge very slowly or fail entirely.
- Bracketing methods like bisection are robust because they systematically narrow the interval containing the root, but their linear convergence makes them slower for high-precision needs.
- Open methods such as Newton's or secant can converge much faster, often at a superlinear or quadratic rate, but they require good initial guesses to avoid divergence or incorrect results.
- Computational cost can escalate when functions or their derivatives are complex to evaluate, making derivative-free methods like secant attractive as they avoid calculating derivatives directly. However, they may require more iterations to achieve the same accuracy.
- Hybrid approaches combine reliability and speed by starting with a bracketing method like bisection to secure the root interval, then transitioning to faster methods like Newton's or secant once near the solution.
- Combination methods like Brent’s dynamically adapt between bracketing and open techniques, providing both robustness of convergence and faster refinement when conditions are favorable.
Example Flow of Decision
- Determine if has an easily detectable sign change.
- If a sign change is present, use bracketing methods like bisection or false position to isolate the root.
- If no sign change is found, scan the domain or apply domain knowledge to guess a valid interval.
- Assess if is analytically or numerically cheap to compute.
- If derivatives are easy to compute, use Newton’s method for faster local convergence.
- If derivatives are not available or are expensive, use derivative-free methods like secant.
- Decide if reliability is a key priority for the solution.
- If reliability is critical, select robust methods like Brent’s, which combine bracketing and open steps.