-- test_simeq_newton4.adb solve nonlinear system of equations -- method: newton iteration using Jacobian -- -- Given problem A X = Y where X may have terms x1, x2, x3, x4, ... -- and higher order such as: x1*x2, x1*x1*x3, x4*x4*x4, ... -- A sparse matrix may be used, coefficients given -- Y is vector of real, given -- independent unknowns are x1, x2, x3, x4, ... -- -- Solve by initial guess at values of x1, x2, x3, x4 computing products -- X_next = X_initial - J_initial^-1 * (A * X_initial - Y) -- -- solved when abs sum each row A * X_next -Y < epsilon -- -- There may be no solution -- it may stall, stop if abs(X_next-X_prev)