https://technicalsource9.medium.com/which-function-can-i-use-instead-of-fsolve-to-solve-a-system-of-nonlinear-equations-with-a-global-d63d69a65cc5