Professional Documents
Culture Documents
NON-LINEAR EQUATIONS
Methods for Solving Simultaneous
Non-Linear Equations
• Gauss-Jacobi
• Gauss-Seidel
• Newton-Raphson
Gauss-Jacobi Method
The method/algorithm is the same as solving
systems of linear equations wherein we
to get
where
Gauss-Jacobi Method
• For the second iteration k=2, use the values
obtained from the first iteration:
• At k=1:
Gauss-Seidel Method
• At k=2:
• Final answer:
x1 = 1.30962
x2 = 0.269923
Newton or Newton-Raphson Method
𝑘+1 𝑘 𝑘 −1
𝑥 =𝑥 − 𝐽 𝑓(𝑥 𝑘 )
𝑘 −1
where 𝐽 is the inverse of the Jacobian matrix.
Newton-Raphson Method
But if we don’t want to compute for the inverse of
Jacobian matrix, we can also write
𝑓(𝑥 𝑘)
𝑥 𝑘+1 = 𝑥 𝑘 − 𝑘
𝐽
𝑓 𝑥𝑘
as 𝑥 𝑘+1 − 𝑥𝑘 =−
𝐽𝑘
⟹ 𝐽𝑘 𝑥 𝑘+1 − 𝑥 𝑘 = −𝑓 𝑥 𝑘
⟹ 𝐽𝑘 Δ𝑥 𝑘+1 = 𝐹 𝑥 𝑘
𝑘+1 𝑘 𝑘 −1
2) Iterate: 𝑥𝑗 = 𝑥𝑗 − 𝐽 𝑓 𝑥𝑗𝑘
or solve for 𝑥 𝑘+1 in 𝐽𝑘 𝑥 𝑘+1
− 𝑥 𝑘 = −𝑓 𝑥 𝑘
which is the same as 𝐽𝑘 Δ𝑥 𝑘+1 = 𝐹 𝑥 𝑘
3) Stop: (termination test)
Newton-Raphson Method
Example: Solve for x1 and x2 in the following system
of non-linear equations. Assume a tolerable error of
0.001, and initial values x10 = 1.2 and x20 = 0.2.
1
1 −𝑒 𝑥2 Δx1 −𝑥1 + 𝑒 𝑥2
We have = −𝑥1
𝑒 −𝑥1 1 Δx12 𝑒 − 𝑥2
1
1 −1.2214 Δx1 0.021403
=
0.301194 1 Δx12 0.101194
Newton-Raphson Method
By performing matrix multiplication on the left side
of the equation, then solving the resulting system for
Δx11 and Δx12 , we will get Δx11 = 0.106005
Δx12 = 0.069266
Hence, since Δx11 = x11 - x10
then, x11 = x10 + Δx11
Similarly, x21 = x20 + Δx12
Therefore,
At k =1:
x11 = 1.2 + 0.106005 = 1.306005
x21 = 0.2 + 0.069266 = 0.269266
Newton-Raphson Method
Solve for the new Δx12 and Δx22 using
𝐽𝑘 Δ𝑥 𝑘+1 = 𝐹 𝑥 𝑘
Use x11 = 1.306005 and x21 = 0.269266.
x1 = 1.3098
Final answer: x2 = 0.269874
Newton-Raphson Method
1 −𝑒 𝑥2
Using the other iterative formula, J =
𝑒 −𝑥1 1
At the initial values x10 = 1.2 and x20 = 0.2 ,
1 −1.2214
𝐽0 =
0.301194 1
0.7311 0.8929
And 𝐽0 −1 =
−0.22 0.7311
−1
Using the formula 𝑥𝑗𝑘+1 = 𝑥𝑗𝑘 − 𝐽𝑘 𝑓 𝑥𝑗𝑘
−1
Use again the formula 𝑥𝑗𝑘+1 = 𝑥𝑗𝑘 − 𝐽 𝑘 𝑓 𝑥𝑗𝑘
to get x12 and x22 .