Explaining Newton's Method
I think I want to illustrate a numerical method for solving the system of equations:
{
x^2 + y^2 - 4 = 0
e^x + y - 1 = 0
}
I should present the general formula for iteration: x_{k+1} = x_k - J_F(x_k)^{-1} F(x_k). I plan to show how to compute the Jacobian and solve the linear system at each step. I’ll choose an initial guess and perform about three iterations to find the approximate solution, but I won't include any emojis or unnecessary introductions.Choosing a system for verification
I want to select a system of equations with a straightforward solution for verification. One example is:
{
x^2 + y^2 - 1 = 0
x^2 - y = 0
}
I found the solutions: y = x^2, leading to a substitution that becomes x^4 + x^2 - 1 = 0. When I let u = x^2, I can solve u^2 + u - 1 = 0 to get the positive root as (-1 + √5)/2, which approximately equals 0.618. This leads me to solutions (0.786, 0.618) and (-0.786, 0.618). I plan to use Newton's method starting from (1, 1) to converge to (0.786, 0.618).Defining the Jacobian and method
I need to define the Jacobian for my system of equations:
- ∂F1/∂x = 2x; ∂F1/∂y = 2y
- ∂F2/∂x = 2x; ∂F2/∂y = -1
At each step, I'll solve the equations 2x s1 + 2y s2 = -F1 and 2x s1 - s2 = -F2. Since I want to keep things concise, I might demonstrate just two iterations to show the results clearly. However, I also need to cover the general algorithm, considering how users might expect a structured response about Newton's method, including an example system, the Jacobian, initial guess, and the iterative process to find an approximate root.Clarifying the system request
I’m thinking that it might be a good idea to ask the user for a specific system they want to work with, especially if it’s for a homework problem. Since they’ve asked more generically, I’ll respond with the general method and include an example, then ask if they have a specific system in mind to show respect for their needs.
I’ll prepare precise numeric iterations with four decimal places, using the chosen system:
F1 = x^2 + y^2 - 1 = 0, and F2 = x^2 - y = 0. For the Newton step, I’ll set up to compute:
J = [[2x, 2y], [2x, -1]], and derive the inverse. I need to make sure to compute the determinant properly, which is det = -2x(1 + 2y) to ensure it’s not zero!Outlining Newton's Method Solution
I'm working on the inverse of the Jacobian, which is given by:
J^{-1} = 1/det * [[-1, -2y], [-2x, 2x]].
Next, I’ll use this to find the steps in Newton's method, where I’ll substitute values into a simpler system instead of using complex algebra each time. For teaching clarity, I’ll set up equations like:
2x s1 + 2y s2 = -F1
2x s1 - s2 = -F2,
solving for s2 easily and using it in the first equation.
I plan to start with an initial guess of (1, 1), calculate the function values and the Jacobian, and then proceed with two iterations to find the approximate roots. I aim to present this systematically while keeping the explanation concise. After demonstrating this, I'll encourage the user to provide a specific system if needed. Let's ensure the overall response stays within 500-800 words to keep it digestible! Newton’s method for systems generalizes the 1D Newton iteration to vector-valued functions.
1. General form of Newton’s method for systems
Suppose you want to solve
[
F(\mathbf{x}) = \mathbf{0},
]
where
[
F:\mathbb{R}^n \to \mathbb{R}^n,\quad
F(\mathbf{x}) = \begin{bmatrix} f_1(\mathbf{x}) \ \vdots \ f_n(\mathbf{x}) \end{bmatrix},\quad
\mathbf{x} = \begin{bmatrix} x_1 \ \vdots \ x_n \end{bmatrix}.
]
At each iteration (k):
-
Compute the Jacobian matrix
[
J_F(\mathbf{x}k) =
\begin{bmatrix}
\dfrac{\partial f_1}{\partial x_1} & \cdots & \dfrac{\partial f_1}{\partial x_n} \
\vdots & \ddots & \vdots \
\dfrac{\partial f_n}{\partial x_1} & \cdots & \dfrac{\partial f_n}{\partial x_n}
\end{bmatrix}{\mathbf{x} = \mathbf{x}_k}.
]
-
Solve the linear system for the “correction” vector (\mathbf{s}_k):
[
J_F(\mathbf{x}_k),\mathbf{s}_k = -F(\mathbf{x}_k).
]
-
Update:
[
\mathbf{x}_{k+1} = \mathbf{x}_k + \mathbf{s}_k.
]
Repeat until (|F(\mathbf{x}_k)|) or (|\mathbf{s}_k|) is below your tolerance.
2. Example: Solve a 2×2 nonlinear system
Solve
[
\begin{cases}
x^2 + y^2 - 1 = 0,\[4pt]
x^2 - y = 0.
\end{cases}
]
This system has exact solutions
[
y = x^2,\quad x^2 + x^4 - 1 = 0
\quad\Rightarrow\quad
x^2 = \dfrac{-1 + \sqrt{5}}{2} \approx 0.618,
]
so
[
(x,y) \approx (\pm 0.786,; 0.618).
]
We’ll use Newton’s method starting from ((x_0,y_0) = (1,1)).
Step 0: Set up (F) and (J)
[
F(x,y) =
\begin{bmatrix}
x^2 + y^2 - 1 \
x^2 - y
\end{bmatrix},
\quad
J_F(x,y) =
\begin{bmatrix}
2x & 2y \
2x & -1
\end{bmatrix}.
]
Iteration 1 (start at ((1,1)))
- Evaluate (F) and (J):
[
F(1,1) =
\begin{bmatrix}
1^2 + 1^2 - 1 \
1^2 - 1
\end{bmatrix}
\begin{bmatrix}
1 \ 0
\end{bmatrix},
\quad
J_F(1,1) =
\begin{bmatrix}
2 & 2 \
2 & -1
\end{bmatrix}.
]
- Solve
[
\begin{bmatrix}
2 & 2 \
2 & -1
\end{bmatrix}
\begin{bmatrix}
s_1 \ s_2
\end{bmatrix}
=
\begin{bmatrix}
1 \ 0
\end{bmatrix}
\begin{bmatrix}
-1 \ 0
\end{bmatrix}.
]
System:
[
\begin{cases}
2s_1 + 2s_2 = -1, \
2s_1 - s_2 = 0.
\end{cases}
]
From the second equation: (s_2 = 2s_1). Substitute into the first:
[
2s_1 + 2(2s_1) = -1 \Rightarrow 6s_1 = -1 \Rightarrow s_1 = -\frac{1}{6},
]
[
s_2 = 2s_1 = -\frac{1}{3}.
]
- Update:
[
x_1 = 1 + s_1 = 1 - \frac{1}{6} = \frac{5}{6} \approx 0.8333,
]
[
y_1 = 1 + s_2 = 1 - \frac{1}{3} = \frac{2}{3} \approx 0.6667.
]
Iteration 2 (at ((5/6, 2/3)))
- Evaluate (F) and (J):
[
x_1 = \frac{5}{6},\quad y_1 = \frac{2}{3}.
]
[
F\Bigl(\tfrac{5}{6},\tfrac{2}{3}\Bigr) =
\begin{bmatrix}
(5/6)^2 + (2/3)^2 - 1 \
(5/6)^2 - 2/3
\end{bmatrix}
\begin{bmatrix}
5/36 \[2pt]
1/36
\end{bmatrix}
\approx
\begin{bmatrix}
0.1389 \ 0.0278
\end{bmatrix}.
]
[
J_F\Bigl(\tfrac{5}{6},\tfrac{2}{3}\Bigr) =
\begin{bmatrix}
2(5/6) & 2(2/3) \
2(5/6) & -1
\end{bmatrix}
\begin{bmatrix}
5/3 & 4/3 \
5/3 & -1
\end{bmatrix}.
]
- Solve
[
\begin{bmatrix}
5/3 & 4/3 \
5/3 & -1
\end{bmatrix}
\begin{bmatrix}
s_1 \ s_2
\end{bmatrix}
=
\begin{bmatrix}
5/36 \ 1/36
\end{bmatrix}
\begin{bmatrix}
-5/36 \ -1/36
\end{bmatrix}.
]
Multiply both equations by 36 to clear denominators:
[
\begin{cases}
60s_1 + 48s_2 = -5,\
60s_1 - 36s_2 = -1.
\end{cases}
]
Subtract the second from the first:
[
(60-60)s_1 + (48+36)s_2 = -5+1 \Rightarrow 84s_2 = -4 \Rightarrow s_2 = -\frac{1}{21} \approx -0.0476.
]
Plug into (60s_1 - 36s_2 = -1):
[
60s_1 - 36\left(-\frac{1}{21}\right) = -1
\Rightarrow 60s_1 + \frac{12}{7} = -1
\Rightarrow 60s_1 = -\frac{19}{7}
\Rightarrow s_1 = -\frac{19}{420} \approx -0.0452.
]
- Update:
[
x_2 = \frac{5}{6} - \frac{19}{420} = \frac{331}{420} \approx 0.7881,
]
[
y_2 = \frac{2}{3} - \frac{1}{21} = \frac{13}{21} \approx 0.6190.
]
Already:
[
(x_2,y_2) \approx (0.7881,; 0.6190),
]
which is very close to the true solution ((0.7860,;0.6180)). Further iterations would quickly converge.
Summary of the procedure
- Write your system as (F(\mathbf{x}) = \mathbf{0}).
- Compute the Jacobian (J_F(\mathbf{x})).
- Choose an initial guess (\mathbf{x}_0).
- For (k=0,1,2,\dots):
- Evaluate (F(\mathbf{x}_k)) and (J_F(\mathbf{x}_k)).
- Solve (J_F(\mathbf{x}_k),\mathbf{s}_k = -F(\mathbf{x}_k)).
- Set (\mathbf{x}_{k+1} = \mathbf{x}_k + \mathbf{s}_k).
- Stop when the corrections or residual are small.
If you have a particular nonlinear system in mind, tell me the equations and I can carry out Newton’s method step-by-step for that specific case.