0

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:

  1. In this scenario, is there a preferred solver? fsolve or brentq or other? In other words, what is the criteria of picking a solver?

  2. 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 of a and b).

  3. It seems really hard to obtain a definite solution when nonlinear equations are combined with CDF.

I have looked at various posts here including:

https://scicomp.stackexchange.com/questions/19982/solve-non-linear-set-of-three-equations-using-scipy?newreg=1e9c1c68bbc249d58fb084293c5e89b3

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.

Community
  • 1
  • 1
P.Tao
  • 1
  • 1
  • A solution to your simplified equations is x=0 and y=0. If x and y are not zero, then your equations imply `1 = gdtr(a, b, f(x, y))*gdtr(c, d, f(x, y))`. Mathematically, that doesn't have a solution unless `f(x,y)` can be infinite. Numerically, however, a solver might find a solution if there are values of x and y such that `f(x, y)` is sufficiently large to make `gdtr(a, b, f(x, y))*gdtr(c, d, f(x, y))` sufficiently close to 1. Are you sure your actual (not simplified) equations really have a nontrivial solution? – Warren Weckesser Apr 05 '16 at 16:48
  • Hi Warren, sorry about late reply. As you pointed out, this indeed is not my original system. And I realized that I simplified them wrong. This is my real system – P.Tao Apr 12 '16 at 00:44

0 Answers0