Graduate

GraduateNumerical AnalysisNumerical Solutions of Equations


Root Finding


The problem of finding roots is a common challenge in numerical analysis, where the goal is to determine the values for which a given function becomes zero. Finding the roots of a function mathematically represented as ( f(x) = 0 ) is a fundamental task that has many applications in scientific computing, engineering, physics, and mathematics. In this comprehensive discussion, we will explore various numerical techniques and algorithms used to find roots, along with visual examples and detailed explanations.

Introduction to finding the root

In mathematical analysis, a root or zero of a function is a number ( x ) for which ( f(x) = 0 ). Finding the roots is sometimes straightforward when dealing with polynomials of small degree, since formulas exist for solving linear, quadratic, cubic, and quartic equations directly. However, for higher-degree polynomials or non-polynomial functions, analytical solutions often do not exist, and numerical methods must be employed.

Story on the importance of finding the root

Root finding plays an important role in various fields. In physics, roots can represent equilibrium points. In engineering, finding roots can mean evaluating how a system behaves under certain conditions. It is prevalent when calculating intersections in computer graphics and in optimization problems where constraints are represented as equations. Therefore, learning various root-finding techniques becomes essential knowledge.

Bracketing methods

Bracketing methods are a popular class of numerical methods used to find roots. These methods rely on the intermediate value theorem, which states that if a continuous function changes sign on an interval, then it has at least one root in that interval. These methods start with two initial guesses (a, b) such that ( f(a) cdot f(b) < 0 ).

Bisection method

The bisection method is one of the simplest and most reliable bracketing methods. It repeatedly reduces an interval that contains an origin, by dividing it into two halves and selecting the sub-interval where a sign change occurs. Let us explore this method with an example and visualization.

Consider the function ( f(x) = x^2 - 4 ). We want to find the roots, and we start with the initial guesses ( a = 0 ) and ( b = 3 ) where ( f(a) = -4 ) and ( f(b) = 5 ).

Initial interval: [0, 3]

Iteration 1:
  Midpoint: c = (0 + 3) / 2 = 1.5
  Evaluate: f(c) = 1.5^2 - 4 = -1.75
  New interval: [1.5, 3] (since f(1.5) < 0)

Iteration 2:
  Midpoint: c = (1.5 + 3) / 2 = 2.25
  Evaluate: f(c) = 2.25^2 - 4 = 1.0625
  New interval: [1.5, 2.25] 

Continue this process until the gap is small enough.
0 1.5 (midpoint) 3

The bisection method is advantageous due to its simplicity and ability to guarantee convergence at the origin, although the convergence is relatively slow and linear.

Open methods

Unlike bracketing methods, open methods do not require initial points to bracket the origin, making them faster in some situations, but they can be less reliable and may not always converge.

Newton–Raphson method

The Newton-Raphson method is an open method that uses the derivative to sequentially approximate the origin of a real-valued function. This method uses tangent lines at iterative points to better approximate the origin.

For a function ( f(x) ) , if ( x_n ) is an estimate to the origin, then the next estimate ( x_{n+1} ) is given by the formula:

x_{n+1} = x_n - frac{f(x_n)}{f'(x_n)}

Example

Let's find the roots of ( f(x) = x^2 - 2 ) starting with an initial guess of ( x_0 = 1 ).

f(x) = x^2 - 2
f'(x) = 2x

Iteration 1:
  x_1 = 1 - frac{1^2 - 2}{2(1)} = 1.5

Iteration 2:
  x_2 = 1.5 - frac{1.5^2 - 2}{2(1.5)} = 1.41666667

Continue until x gets close enough to the real root.

This method converges quadratically near the origin, making it faster than the bisection method as it converges.

Secant method

The secant method can be considered a finite-difference approximation of the Newton–Raphson method that does not require the calculation of the derivative. This method uses two initial guesses and calculates the secant iteratively as follows:

x_{n+1} = x_n - f(x_n) cdot frac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}

Example

Suppose we want to find the roots of ( f(x) = x^2 - 3 ) starting from ( x_0 = 1 ) and ( x_1 = 2 ).

Iteration 1:
  x_2 = 2 - frac{4 - 3}{2 - 1} = 1.5

Iteration 2:
  x_3 = 1.5 - frac{2.25 - 3}{1.5 - 2} = 1.75

This pattern continues and reaches the origin.
x_0 = 1 x_1 = 2

Fixed point iteration

Fixed point iteration uses the rearranged function in the form ( x = g(x) ), and the iteration proceeds with ( x_{n+1} = g(x_n) ). This method involves rewriting the function in such a way that iterating over this function converges to the origin.

Example: Consider finding the roots of ( f(x) = x^3 - x - 2 = 0 ).

Rearrange: x = g(x) = (x + 2)^{1/3}

To repeat:
  x_0 = initial guess, say 1.5
  x_1 = g(x_0) = (1.5 + 2)^{1/3} ≈ 1.650
  x_2 = g(x_1) = (1.650 + 2)^{1/3} ≈ 1.553

Proceed with the iterations until convergence is reached.

Graphical example

g(x) y=x x_0 x_1 x_2

In practice, convergence depends on the choice of ( g(x) ) and the initial guess ( x_0 ).

Conclusion

Root finding is an essential aspect of numerical analysis, involving finding the roots of a function expressed as ( f(x) = 0 ). Depending on the characteristics of the function, domain knowledge, and the precision required, different methods may be better suited for particular problems. The choice between bracketing methods and open methods or even graphical interpretations largely depends on factors such as the availability of derivatives and how close the initial guesses are to the real roots. Understanding and correctly applying these numerical methods is a vital part of solving practical mathematical models in all science and engineering disciplines.

Further study and practice by implementing these methods in computational software or coding environments is recommended to strengthen theoretical understanding with practical skills. Understanding the strengths, limitations, and convergence properties of each of these methods is important for their effective application.


Graduate → 6.1.1


U
username
0%
completed in Graduate


Comments