equation2_nl.java running solve system of nonlinear equations | 5.0000 4.0000 3.0000 2.0000 1.0000 | | x1 | | 205.1488 | | 4.0000 5.0000 3.0000 2.0000 1.0000 | | x2^2 | | 217.6888 | | 3.0000 3.0000 3.0000 2.0000 1.0000 | | x3^3 | | 177.3088 | | 1.0000 2.0000 2.0000 2.0000 1.0000 | | 1/x4 | | 113.5318 | | 2.0000 3.0000 1.0000 1.0000 2.0000 | |1/x5^2| | 100.3626 | A * Xt = Y guess initial X(1,5) compute Xt = | x1 x2^2 x3^3 1/x4 1/x5^2 | compute derivative D = | 1 2*x2 3*x3^2 -1/x4^2 -2/x5^3 | compute the Jacobian Ja = A * D and invert into JI iterate X_next = X - fctr*(A*Xt-Y)*Ja^-1 inverse transpose no guarantee of solution or unique solution sum absolute value A*Xt-Y should go to zero initial fctr, for stability =0.5 initial guess X[0]= 1.00000 X[1]= 1.00000 X[2]= 1.00000 X[3]= 1.00000 X[4]= 1.00000 iteration 0, total error=755.0406666666667 X[0]= 2.84500 X[1]= 4.74400 X[2]= 6.24055 X[3]= 1.26250 X[4]= 1.12500 iteration 1, total error=2539.5164193809555 X[0]= 3.85975 X[1]= 4.51324 X[2]= 5.44288 X[3]= 1.53177 X[4]= 1.23574 iteration 2, total error=1534.8825048774647 X[0]= 4.47367 X[1]= 4.36356 X[2]= 4.74496 X[3]= 1.80607 X[4]= 1.33401 iteration 3, total error=867.0870282093365 X[0]= 4.81471 X[1]= 4.27617 X[2]= 4.17346 X[3]= 2.04943 X[4]= 1.40994 iteration 4, total error=448.7512144127352 X[0]= 4.98558 X[1]= 4.23096 X[2]= 3.75215 X[3]= 2.22873 X[4]= 1.45912 iteration 5, total error=205.81844802857927 X[0]= 5.06097 X[1]= 4.21064 X[2]= 3.48871 X[3]= 2.33352 X[4]= 1.48496 iteration 6, total error=79.38930565701402 X[0]= 5.08926 X[1]= 4.20294 X[2]= 3.35921 X[3]= 2.38037 X[4]= 1.49570 iteration 7, total error=23.936635791951446 X[0]= 5.09782 X[1]= 4.20060 X[2]= 3.31283 X[3]= 2.39589 X[4]= 1.49911 iteration 8, total error=5.113477396070721 X[0]= 5.09973 X[1]= 4.20007 X[2]= 3.30162 X[3]= 2.39949 X[4]= 1.49989 iteration 9, total error=0.64434276035702 X[0]= 5.09999 X[1]= 4.20000 X[2]= 3.30006 X[3]= 2.39998 X[4]= 1.50000 iteration 10, total error=0.023091450169502536 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 11, total error=4.0288878722094523E-7 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 12, total error=1.1368683772161603E-13 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 13, total error=5.6843418860808015E-14 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 14, total error=1.7053025658242404E-13 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 15, total error=4.263256414560601E-14 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 16, total error=0.0 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 17, total error=0.0 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 18, total error=0.0 X[0]= 5.10000 X[1]= 4.20000 X[2]= 3.30000 X[3]= 2.40000 X[4]= 1.50000 iteration 19, total error=0.0 final results should be X(0)= 5.10000 5.10000 X(1)= 4.20000 4.20000 X(2)= 3.30000 3.30000 X(3)= 2.40000 2.40000 X(4)= 1.50000 1.50000 increased error reduced fctr 5 times fctr increased due to reduced error 14 times final fctr=0.7290000000000001 final total error=0.0 equation2_nl.java finished