In physical sciences and engineering, we frequently encounter equations that do not adhere to the simple \(Ax = b\) form of linear systems. Nonlinearities arise naturally in systems with interacting components, relativistic corrections, orbital mechanics, and fluid dynamics. Unlike linear systems, which typically have a single unique solution, nonlinear systems can have multiple isolated roots, making their numerical resolution both fascinating and challenging.
This module explores the numerical techniques used to find roots of nonlinear equations, extending from single-variable functions to systems of multiple nonlinear equations. We will revisit the Bisection method, formally study Fixed-Point Iterations, and generalize Newton’s Method to multi-dimensional spaces using the Jacobian matrix.
Theory
1. What Makes Nonlinear Equations Different?
A linear system obeys the principle of superposition and can be represented via a constant matrix. A nonlinear system, however, takes the form: \[ \mathbf{F}(\mathbf{x}) = \mathbf{0} \] where \(\mathbf{x} = [x_1, x_2, \dots, x_n]^T\) and \(\mathbf{F}(\mathbf{x}) = [f_1(\mathbf{x}), f_2(\mathbf{x}), \dots, f_n(\mathbf{x})]^T\). Small changes in inputs can lead to disproportionate changes in outputs. There is no direct analytical way (like Gaussian elimination) to solve a general nonlinear system; thus, iterative methods are strictly necessary.
2. Bisection Method (Single Variable Recap)
For a single equation \(f(x) = 0\), if \(f(x)\) is continuous on an interval \([a, b]\) and \(f(a)f(b) < 0\), the Intermediate Value Theorem guarantees at least one root in \((a, b)\). The Bisection method systematically halves the interval: \[ c = \frac{a + b}{2} \] Replacing either \(a\) or \(b\) with \(c\) based on the sign of \(f(c)\). It is slow (linear convergence) but unconditionally stable and guaranteed to converge.
3. Fixed-Point Iteration Method
Any equation \(f(x) = 0\) can be rewritten in the form \(x = g(x)\). A solution \(x^*\) to this is called a fixed point. The iterative scheme is simply: \[ x_{n+1} = g(x_n) \]
Convergence and Lipschitz Condition
According to the Fixed-Point Theorem, if \(g(x)\) is continuous on \([a, b]\), \(g(x) \in [a,b]\) for all \(x \in [a,b]\), and it satisfies the Lipschitz condition with constant \(L < 1\) (i.e., \(|g'(x)| \le L < 1\)), the iteration will converge to a unique fixed point. The convergence rate depends heavily on \(g'(x^*)\).
4. Newton’s Method for Systems of Nonlinear Equations
For a single variable, Newton-Raphson iteration is \(x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}\). To extend this to a system \(\mathbf{F}(\mathbf{x}) = \mathbf{0}\), we use the multi-dimensional Taylor series expansion. The derivative \(f'(x)\) is replaced by the Jacobian Matrix, \(J(\mathbf{x})\), whose elements are: \[ J_{ij} = \frac{\partial f_i}{\partial x_j} \] The iterative update becomes: \[ \mathbf{x}^{(k+1)} = \mathbf{x}^{(k)} - J(\mathbf{x}^{(k)})^{-1} \mathbf{F}(\mathbf{x}^{(k)}) \] In practice, we do not invert the Jacobian directly. Instead, we solve the linear system: \[ J(\mathbf{x}^{(k)}) \Delta \mathbf{x}^{(k)} = -\mathbf{F}(\mathbf{x}^{(k)}) \] and then update: \[ \mathbf{x}^{(k+1)} = \mathbf{x}^{(k)} + \Delta \mathbf{x}^{(k)} \]
5. Comparison of Convergence Rates
Bisection: Linear convergence. Error at step \(k+1\) is exactly \(E_{k+1} = 0.5 E_k\).
Fixed-Point: Linear convergence (usually), \(E_{k+1} \approx |g'(x^*)| E_k\).
Newton’s Method: Quadratic convergence near the root, \(E_{k+1} \approx C E_k^2\). The number of correct digits approximately doubles with each step, provided the initial guess is close enough.
Geometric / Visual Explanation
Let’s visualize the geometry of these methods using Python.
Figure 1: Visualizing Nonlinear Systems and Convergence Paths
Python Implementation
Below is a robust Python implementation of the numerical methods discussed.
import numpy as npdef bisection(f, a, b, tol=1e-6, max_iter=100):if f(a) * f(b) >=0:raiseValueError("f(a) and f(b) must have opposite signs.")for i inrange(max_iter): c = (a + b) /2.0ifabs(f(c)) < tol or (b - a) /2.0< tol:return c, i +1if f(c) * f(a) <0: b = celse: a = creturn (a + b) /2.0, max_iterdef fixed_point_iteration(g, x0, tol=1e-6, max_iter=100): x = x0for i inrange(max_iter): x_new = g(x)ifabs(x_new - x) < tol:return x_new, i +1 x = x_newraiseException("Fixed-point iteration did not converge.")def newton_system(F, J, x0, tol=1e-6, max_iter=100): x = np.array(x0, dtype=float)for i inrange(max_iter): Fx = F(x) Jx = J(x)if np.linalg.norm(Fx) < tol:return x, i delta = np.linalg.solve(Jx, -Fx) x = x + deltaif np.linalg.norm(delta) < tol:return x, i +1raiseException("Newton's method did not converge.")
Solved Examples
🟢 Easy: Fixed-Point Iteration
Problem: Solve \(x^3 - x - 1 = 0\) using fixed-point iteration.
Bisection Method: Robust but slow linear convergence.
Fixed-Point Iteration: \(x=g(x)\). Converges linearly if \(|g'(x)| < 1\).
Newton’s Method for Systems: Generalizes using the Jacobian Matrix. Achieves quadratic convergence but requires a good initial guess and solving a linear system at each step.