I have a system of non-linear equations, where can be choosed any n, so length of vector x = (x1,...,xn) can be different. For example, system can be like that:
f1(x1,...,xn) = sum( xi + xi^2 ) = 0, i={1,n}
f2(x1,...,xn) = sum( e^xi + xi + sin(xi*pi) ) = 0, i={1,n}
According to this example, I use fsolve() of scipy library for solving such a NLE, but it returns only one solution for every single initial approximation of *x = x0. But as n can be large (for example, n = 100), and there can be a lot of solutions, so it's not very usefull to make initial conditions x = x0 for finding every solution.
So, please, could You give me an example, how to find All the solutions by fsolve() in such a situation? Or by any other simple method?
Additional For example, I have folloving simple system:
def equations(p):
x, y = p
return (x**2-1, x**3-1)
With different initial condiotions I have different solutions: x, y = fsolve(equations, (0, 0)) (0.0, 0.0)
x, y = fsolve(equations, (1, 1))
(1.0, 1.0)
x, y = fsolve(equations, (-1, 1))
(-0.47029706057873205, 0.41417128904566508)
Is it possible to use any Scipy-function, like fsolve(), to find All the solutions (roots), for example: x, y = some_scipy_solver(equations, (x0, y0)) 1. (1.0, 1.0) 2. (0.0, 0.0) 3. (-0.47029706057873205, 0.41417128904566508) ...
where (x0, y0) = any initial approximation:(0, 0),(1, 1),(-1, 1),(0.1, 10.0), etc, and where I determine just the constraints for x0, y0, like that: -1.0 <= x0 < 1.0, 0.0 <= x0 < 11.0.