I have a collection, the number of which may vary, of non-linear equations with constraints that I'd like to solve using some numerical approach.
I've been able to solve a simple (one equation) case in Excel using Solver, but haven't put anything like this together in Python before so would appreciate suggestions on approach.
Having done a bit of digging, it looks like fsolve is a popular approach for solving systems like these. For a simple, two equation case, my problem takes the following form, broken out into parts for clarity:
And the same form for the second, b, equation.
A is a constant, variable Z, S and x are constants for each entity i, and the only values that are independent are exponent a and b; two equations, two unknowns, so there should be a single unique solution.
As I'd said, I set up the simple one equation case in Excel and successfully solved for using Solver. Any guidance on setting this up in Python is appreciated.
w_i
has onlyS_i
, as j is the bound variable of the denominator? Why can you not combine both intoS_i^{a+b}
? - Lutz Lehmannbrentq
orfixed_point
- Mstaino