Kernel: SageMath 9.3
Find a root of a vector function via SciPY in SageMath
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.root.html
In [3]:
In [4]:
In [5]:
In [6]:
running scipy's root function
make sure to check for "The solution converged." !!!
In [7]:
fjac: array([[ 0.00840245, -0.25803071, 0.96610018, 0. ],
[ 0.11882016, -0.95903187, -0.25717629, 0. ],
[-0.99288024, -0.11695309, -0.02260104, 0. ],
[ 0. , 0. , 0. , 1. ]])
fun: array([ 2.28483898e-12, -2.22044605e-16, 1.65201186e-11, 0.00000000e+00])
message: 'The solution converged.'
nfev: 68
qtf: array([ 1.60864901e-08, -4.00371453e-09, -2.66020064e-09, 0.00000000e+00])
r: array([-3.87550761, -0.44493695, 5.21493561, -1.17178494, 0.11971177,
-2.59724491, 0.43299946, 1.24175494, -0.96537661, 0. ])
status: 1
success: True
x: array([-1.46356043, 8.96996905, -0.53643957, -3.28776741])
In [8]:
In [9]:
2.284838984678572e-12
In [10]:
-2.220446049250313e-16
In [11]:
1.652011860642233e-11
In [ ]:
In [ ]: