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:
{"ft_lang_label":"__label__en","ft_lang_prob":0.8582913,"math_prob":1.0000077,"size":2088,"snap":"2022-27-2022-33","text_gpt3_token_len":589,"char_repetition_ratio":0.13579655,"word_repetition_ratio":0.052173913,"special_character_ratio":0.3113027,"punctuation_ratio":0.1298077,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000092,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-29T09:18:00Z\",\"WARC-Record-ID\":\"<urn:uuid:902c1810-ef01-451e-ac4d-cf2f1337b343>\",\"Content-Length\":\"19540\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3aac577a-eb61-4964-90d5-6d9a55500e84>\",\"WARC-Concurrent-To\":\"<urn:uuid:26459930-6730-4f91-bfd2-403837ae9db0>\",\"WARC-IP-Address\":\"107.20.139.176\",\"WARC-Target-URI\":\"http://mathonline.wikidot.com/applying-newton-s-method-for-solving-systems-of-two-nonlinea\",\"WARC-Payload-Digest\":\"sha1:LLIA7GTBBNXE3DIPMZUK6FK2YJVF5UJC\",\"WARC-Block-Digest\":\"sha1:YMAJ3PLJHTPFOHDWA4FHXTAE5HLCWO7L\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103626162.35_warc_CC-MAIN-20220629084939-20220629114939-00621.warc.gz\"}"}