I have the following system of equations (simplified version).
y = x*scipy.special.gdtr(a, b, f(x,y))
x = y*scipy.speical.gdtr(c, d, f(x,y))
Here scipy.special.gdtr
refers to the CDF of gamma distribution, and a
, b
are the corresponding two parameters gamma CDF takes.
My question is as follows:
In this scenario, is there a preferred solver?
fsolve
orbrentq
or other? In other words, what is the criteria of picking a solver?I have used
fsolve
so far and I think it has two great disadvantages,
i), it always give me different solutions whenever I input a different initial guess.
ii), it often tells me the iteration is not converging to a single value (there are a couple of cases which work, it seems to depend on specific values ofa
andb
).It seems really hard to obtain a definite solution when nonlinear equations are combined with CDF.
I have looked at various posts here including:
and
How to solve a pair of nonlinear equations using Python?
These posts do not specifically solve my issue. It would be greatly appreciated if anyone who has experience in solving system of nonlinear equations and statistics in python can answer my question.