equation2_nl.f90 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.3625 | 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.500000000000000 X(1)= 1.0000000 X(2)= 1.0000000 X(3)= 1.0000000 X(4)= 1.0000000 X(5)= 1.0000000 iteration 1 , total error= 755.040619156282 X(1)= 3.0500000 X(2)= 5.1599996 X(3)= 6.8228331 X(4)= 1.2916667 X(5)= 1.1388889 iteration 2 , total error= 3507.25868665551 X(1)= 3.9724999 X(2)= 4.7681857 X(3)= 5.9152068 X(4)= 1.5600912 X(5)= 1.2474173 iteration 3 , total error= 2125.33052914698 X(1)= 4.4291374 X(2)= 4.5517809 X(3)= 5.2553090 X(4)= 1.7812101 X(5)= 1.3253253 iteration 4 , total error= 1354.79381897772 X(1)= 4.6736668 X(2)= 4.4285116 X(3)= 4.7748852 X(4)= 1.9486059 X(5)= 1.3783046 iteration 5 , total error= 903.622178592472 X(1)= 4.8135253 X(2)= 4.3554824 X(3)= 4.4251109 X(4)= 2.0688348 X(5)= 1.4134998 iteration 6 , total error= 627.818752133312 X(1)= 4.9169011 X(2)= 4.3003772 X(3)= 4.1135886 X(4)= 2.1718478 X(5)= 1.4420657 iteration 7 , total error= 416.429765139841 X(1)= 4.9895804 X(2)= 4.2609983 X(3)= 3.8503040 X(4)= 2.2538015 X(5)= 1.4637470 iteration 8 , total error= 261.212259320741 X(1)= 5.0377934 X(2)= 4.2345549 X(3)= 3.6427283 X(4)= 2.3137482 X(5)= 1.4790071 iteration 9 , total error= 153.038597684910 X(1)= 5.0676711 X(2)= 4.2180259 X(3)= 3.4931185 X(4)= 2.3536860 X(5)= 1.4888793 iteration 10 , total error= 82.4357101172373 X(1)= 5.0847513 X(2)= 4.2085226 X(3)= 3.3966254 X(4)= 2.3776828 X(5)= 1.4946895 iteration 11 , total error= 40.0447709029529 X(1)= 5.0936132 X(2)= 4.2035745 X(3)= 3.3420528 X(4)= 2.3905321 X(5)= 1.4977594 iteration 12 , total error= 17.1351033726114 X(1)= 5.0976961 X(2)= 4.2012903 X(3)= 3.3155063 X(4)= 2.3965609 X(5)= 1.4991885 iteration 13 , total error= 6.26571445666994 X(1)= 5.0993161 X(2)= 4.2003829 X(3)= 3.3046531 X(4)= 2.3989759 X(5)= 1.4997587 iteration 14 , total error= 1.87369976255769 X(1)= 5.0998450 X(2)= 4.2000866 X(3)= 3.3010588 X(4)= 2.3997678 X(5)= 1.4999453 iteration 15 , total error= 0.425884867872824 X(1)= 5.0999768 X(2)= 4.2000128 X(3)= 3.3001581 X(4)= 2.3999654 X(5)= 1.4999918 iteration 16 , total error= 6.360562137597014E-002 X(1)= 5.0999984 X(2)= 4.2000006 X(3)= 3.3000101 X(4)= 2.3999979 X(5)= 1.4999995 iteration 17 , total error= 4.075589801459500E-003 X(1)= 5.0999999 X(2)= 4.1999998 X(3)= 3.3000000 X(4)= 2.4000001 X(5)= 1.5000000 iteration 18 , total error= 1.222352352669986E-008 X(1)= 5.0999999 X(2)= 4.1999998 X(3)= 3.3000000 X(4)= 2.4000001 X(5)= 1.5000000 iteration 19 , total error= 5.684341886080801E-014 X(1)= 5.0999999 X(2)= 4.1999998 X(3)= 3.3000000 X(4)= 2.4000001 X(5)= 1.5000000 iteration 20 , total error= 0.00000000000000 final results should be X(1)= 5.0999999 5.0999999 X(2)= 4.1999998 4.1999998 X(3)= 3.3000000 3.3000000 X(4)= 2.4000001 2.4000001 X(5)= 1.5000000 1.5000000 increased error reduced Fctr 4 times Fctr increased due to reduced error 15 times final fctr= 1.00000000000000 final total error= 0.00000000000000 equation2_nl.f90 finished