Newton System
1. **Problem statement:** Solve the system of nonlinear equations:
$$y \cos(2xy) + 1 = 0$$
$$\sin(xy) + x - y = 0$$
starting from initial guess $(x_0, y_0) = (1, 2)$ and find solution correct to 3 decimal places using Newton-Raphson method.
2. **Define functions:**
$$f_1(x,y) = y \cos(2xy) + 1$$
$$f_2(x,y) = \sin(xy) + x - y$$
3. **Jacobian matrix:**
Partial derivatives are:
$$\frac{\partial f_1}{\partial x} = -2y^2 \sin(2xy)$$
$$\frac{\partial f_1}{\partial y} = \cos(2xy) - 2xy \sin(2xy)$$
$$\frac{\partial f_2}{\partial x} = y \cos(xy) + 1$$
$$\frac{\partial f_2}{\partial y} = x \cos(xy) - 1$$
Thus,
$$J = \begin{pmatrix} -2y^2 \sin(2xy) & \cos(2xy) - 2xy \sin(2xy) \\ y \cos(xy) + 1 & x \cos(xy) - 1 \end{pmatrix}$$
4. **Newton-Raphson iterative formula:**
$$\begin{pmatrix}x_{n+1} \\ y_{n+1} \end{pmatrix} = \begin{pmatrix} x_n \\ y_n \end{pmatrix} - J^{-1}(x_n,y_n) \begin{pmatrix} f_1(x_n,y_n) \\ f_2(x_n,y_n) \end{pmatrix}$$
5. **Iteration 0:** with $(x_0,y_0)=(1,2)$
Calculate
$$f_1(1,2) = 2 \cos(4) + 1 \approx 2 \times (-0.6536) + 1 = -0.3072$$
$$f_2(1,2) = \sin(2) + 1 - 2 \approx 0.9093 - 1 = -0.0907$$
Calculate Jacobian at $(1,2)$:
$$J = \begin{pmatrix}
-2 \times 4 \times \sin(4) & \cos(4) - 4 \times \sin(4) \\
2 \times \cos(2) + 1 & 1 \times \cos(2) - 1
\end{pmatrix}
= \begin{pmatrix}-8 \times (-0.7568) & -0.6536 - 4 \times (-0.7568) \\
2 \times (-0.4161)+1 & 0.4161 - 1\end{pmatrix}
= \begin{pmatrix}6.0544 & 2.3736 \\
0.1678 & -0.5839\end{pmatrix}$$
6. Find determinant and inverse of $J$:
$$D = 6.0544 \times (-0.5839) - 2.3736 \times 0.1678 = -3.534 - 0.398 = -3.932$$
Inverse:
$$J^{-1} = \frac{1}{D} \begin{pmatrix} -0.5839 & -2.3736 \\ -0.1678 & 6.0544 \end{pmatrix} = \begin{pmatrix}0.1485 & 0.6039 \\ 0.0427 & -1.5395\end{pmatrix}$$
7. Compute next approximation:
$$ \begin{pmatrix} \Delta x \\ \Delta y \end{pmatrix} = J^{-1} \begin{pmatrix} -0.3072 \\ -0.0907 \end{pmatrix} = \begin{pmatrix}0.1485 \times (-0.3072) + 0.6039 \times (-0.0907) \\ 0.0427 \times (-0.3072) -1.5395 \times (-0.0907) \end{pmatrix} = \begin{pmatrix} -0.0456 - 0.0548 \\ -0.0131 + 0.1396 \end{pmatrix} = \begin{pmatrix} -0.1004 \\ 0.1265 \end{pmatrix}$$
So,
$$x_1 = 1 - (-0.1004) = 1.1004\quad y_1 = 2 - 0.1265 = 1.8735$$
8. **Iteration 1:** Repeat with $(x_1,y_1) = (1.1004,1.8735)$
Calculate:
$$f_1(1.1004,1.8735) \approx 1.8735 \cos(2 \times 1.1004 \times 1.8735) + 1 = 1.8735 \cos(4.123) + 1 \approx 1.8735 \times (-0.5692) +1 = -1.066 + 1 = -0.066$$
$$f_2(1.1004,1.8735) = \sin(1.1004 \times 1.8735) + 1.1004 - 1.8735 = \sin(2.061) + 1.1004 - 1.8735 \approx 0.881 + 1.1004 -1.8735 = 0.1079$$
Calculate Jacobian:
$$J = \begin{pmatrix} -2 \times (1.8735)^2 \sin(4.123) & \cos(4.123) - 2 \times 1.1004 \times 1.8735 \sin(4.123) \\ 1.8735 \cos(2.061) + 1 & 1.1004 \cos(2.061) - 1 \end{pmatrix}$$
Calculate values:
$$-2 \times (1.8735)^2 \times \sin(4.123) = -2 \times 3.51 \times (-0.8339) = 5.85$$
$$\cos(4.123) - 2 \times 1.1004 \times 1.8735 \times \sin(4.123) = -0.5692 - 2 \times 1.1004 \times 1.8735 \times (-0.8339) = -0.5692 + 3.44 = 2.87$$
$$1.8735 \cos(2.061) + 1 = 1.8735 \times (-0.471) + 1 = -0.882 + 1 = 0.118$$
$$1.1004 \cos(2.061) - 1 = 1.1004 \times (-0.471) - 1 = -0.518 - 1 = -1.518$$
Jacobian matrix:
$$J = \begin{pmatrix} 5.85 & 2.87 \\ 0.118 & -1.518 \end{pmatrix}$$
Determinant:
$$D = 5.85 \times (-1.518) - 2.87 \times 0.118 = -8.88 - 0.339 = -9.22$$
Inverse:
$$J^{-1} = \frac{1}{-9.22} \begin{pmatrix} -1.518 & -2.87 \\ -0.118 & 5.85 \end{pmatrix} = \begin{pmatrix} 0.165 & 0.311 \\ 0.013 & -0.634 \end{pmatrix}$$
Compute update:
$$\begin{pmatrix} \Delta x \\ \Delta y \end{pmatrix} = J^{-1} \begin{pmatrix} -0.066 \\ 0.1079 \end{pmatrix} = \begin{pmatrix} 0.165 \times (-0.066) + 0.311 \times 0.1079 \\ 0.013 \times (-0.066) - 0.634 \times 0.1079 \end{pmatrix} = \begin{pmatrix} -0.011 + 0.034\ -0.0009 - 0.068 \\ \end{pmatrix} = \begin{pmatrix} 0.023 \\ -0.069 \\ \end{pmatrix}$$
Update values:
$$x_2 = 1.1004 - 0.023 = 1.077$$
$$y_2 = 1.8735 + 0.069 = 1.9445$$
9. **Iteration 2:** Repeat to check convergence
Calculate functions at $(1.077, 1.9445)$:
$$xy = 1.077 \times 1.9445 = 2.095$$
$$f_1 = 1.9445 \cos(2 \times 1.077 \times 1.9445) + 1 = 1.9445 \cos(4.19) + 1 \approx 1.9445 \times (-0.5) + 1 = 0.02$$
$$f_2 = \sin(2.095) + 1.077 - 1.9445 = 0.866 + 1.077 - 1.9445 = -0.004$$
Errors are very small, so we can accept solution:
$$\boxed{(x,y) \approx (1.077, 1.945)}$$
correct to 3 decimal places.