3x1-cos(x2x3)-1/2=0
x12-81(x2+0.1)2+sin(x3)+1.06=0
e-x1x2+20x3+(10 -3)/3=0
输入:方程组的阶数n,初始近似x=[x1,…..xn]T ,误差容限TOL,最大迭代次数m
输出:近似解x=[x1,…..xn]T或方法失败信息
Step1
A f,(x);
V f(x)
Step2
H A -1
Step3
K 1;
S HV;
x x+s.
step4
当k m时,做step5 14
Step5 v
v f(x)
y v
step6
z Hy;
step7
p sTZ
step8
若p=0,则输出(‘Method failed’);停机
Step9
C pI+(s+z)sT
Step10
H (1/P)CH
Step11
s Hv
step12
x x+s
step13
若 <TOL,则输出(x);停机
Step14
K k+1