Applying Newton's Method for Solving Systems of Two Nonlinear Equations

# Applying Newton's Method for Solving Systems of Two Nonlinear Equations

Recall from the Newton's Method for Solving Systems of Two Nonlinear Equations page that if we have a system of two nonlinear equations $\left\{\begin{matrix} f(x, y) = 0 \\ g(x, y) = 0 \end{matrix}\right.$ with a solution $(\alpha, \beta)$ and if $(x_0, y_0)$ is an initial approximation that is sufficiently close to $(\alpha, \beta)$ then we have that:

(1)
\begin{align} \quad f(x_0, y_0) + (x - x_0)\frac{\partial}{\partial x} f(x_0, y_0) + (y - y_0) \frac{\partial}{\partial y} f(x_0, y_0) = 0 \\ \quad g(x_0, y_0) + (x - x_0)\frac{\partial}{\partial x} g(x_0, y_0) + (y - y_0) \frac{\partial}{\partial y} g(x_0, y_0) = 0 \end{align}

The equations above are the tangent planes to the surfaces $f$ and $g$ generated in $\mathbb{R}^3$. For $\delta_x = x - x_0$ and $\delta_y = y - y_0$, this system can be compressed in matrix form as:

(2)
\begin{align} \quad \begin{bmatrix} \frac{\partial}{\partial x}f(x_0, y_0) & \frac{\partial}{\partial y} f(x_0, y_0)\\ \frac{\partial}{\partial x}g(x_0, y_0) & \frac{\partial}{\partial x}g(x_0, y_0) \end{bmatrix} \begin{bmatrix} \delta_x \\ \delta_y \end{bmatrix} = - \begin{bmatrix} f(x_0, y_0)\\ g(x_0, y_0) \end{bmatrix} \end{align}

We then define $x_1 = x_0 + \delta_x$ and $y_1 = y_0 + \delta_y$. In general, we have that:

(3)
\begin{align} \quad x_{n+1} = x_n + \delta_{x, n} \\ \quad y_{n+1} = y_n + \delta_{y, n} \end{align}

Under certain conditions, the sequence of $x$'s and $y$'s will converge to the solution $(\alpha, \beta)$.

Now let's look at an example of applying Newton's method for solving systems of two nonlinear equations.

## Example 1

Consider the following non-linear system of equations $\left\{\begin{matrix} x^3 + y = 1 \\ y^3 - x = -1 \end{matrix}\right.$. There exists a solution $(\alpha, \beta)$ such that $\alpha, \beta > 0$. Let $(0.9, 0.9)$ be an initial approximation to this system. Use Newton's method with three iterations to approximate this solution.

It's not hard to see that the solution of interest is $(\alpha, \beta) = (1, 1)$ which can be obtained by substituting one of the equations into the other. Regardless, we will still use Newton's method to demonstrate the algorithm.

We first rewrite our system of equations as:

(4)
\begin{align} \quad \left\{\begin{matrix} f(x, y) = x^3 + y - 1 = 0 \\ g(x, y) = y^3 - x + 1 = 0 \end{matrix}\right. \end{align}

We now compute the partial derivatives of $f$ and $g$. We have that:

(5)
\begin{bmatrix} \frac{\partial f}{\partial x} & \frac{\partial f}{\partial y}\\ \frac{\partial g}{\partial x} & \frac{\partial g}{\partial y} \end{bmatrix} = \begin{bmatrix} 3x^2 & 1\\ -1 & 3y^2 \end{bmatrix}

We will use the matrix above for each iteration. For the first iteration, we need to solve the following system of equations:

(6)
\begin{align} \quad \begin{bmatrix} 3(0.9)^2 & 1\\ -1 & 3(0.9)^2 \end{bmatrix} \begin{bmatrix} \delta_{x, 0} \\ \delta_{y, 0} \\ \end{bmatrix} = \begin{bmatrix} f(0.9, 0.9) \\ g(0.9, 0.9) \end{bmatrix} \\ \begin{bmatrix} 2.43 & 1\\ -1 & 2.43 \end{bmatrix} \begin{bmatrix} \delta_{x, 0} \\ \delta_{y, 0} \\ \end{bmatrix} = \begin{bmatrix} 0.629 \\ 0.829 \end{bmatrix} \end{align}

In solving this system, we get that $\delta_{x, 1} = 0.101$ and that $\delta_{y, 1} = 0.383$. Therefore we have that:

(7)
\begin{align} \quad x_1 = x_0 + \delta_{x, 0} = 0.9 + 0.101 = 1.001 \quad y_1 = y_0 + \delta_{y, 0} = 0.9 + 0.383 = 1.283 \end{align}

For the second iteration, we want to solve the following system of equations:

(8)
\begin{align} \quad \begin{bmatrix} 3(1.001)^2 & 1\\ -1 & 3(1.283)^2 \end{bmatrix} \begin{bmatrix} \delta_{x, 1} \\ \delta_{y, 1} \\ \end{bmatrix} = \begin{bmatrix} f(1.001, 1.283) \\ g(1.001, 1.283) \end{bmatrix} \\ \begin{bmatrix} 3.006003 & 1\\ -1 & 4.938267 \end{bmatrix} \begin{bmatrix} \delta_{x, 1} \\ \delta_{y, 1} \\ \end{bmatrix} = \begin{bmatrix} 1.286003 \\ 2.110932 \end{bmatrix} \end{align}

When we solve this system, we get that $\delta_{x, 2} = 0.201143$ and $\delta_{y, 2} = 0.400208$. Therefore we have that: