title: What's the difference in the use and precision of fsolve, brentq and root for a system of equations?
body: <p>I have asked this question <a href="https://stackoverflow.com/questions/55128989/is-fsolve-good-to-any-system-of-equations">Is fsolve good to any system of equations?</a>, from which I got a satisfactory answer. The system I presented there</p>
  <blockquote>
  <p>x = A * exp (x+y)</p>
  <p>y = 4 * exp (x+y)</p>
  </blockquote>
  <p>, is just a toy model which is similar with my real case problem, <code>fsolve</code> did the work with (code in the answer below):</p>
  <pre><code>from scipy.optimize import fsolve
  import matplotlib.pyplot as plt
  import numpy as np
  def f(p,*args):
    x, y = p
    A = args[0] 
   
    return (x -A* np.exp(x+y),y- 4* np.exp(x+y))
  A = np.linspace(0,4,5)
  X = []
  Y =[]
  for a in A:
    x,y =  fsolve(f,(0.0, 0.0) , args=(a))
    X.append(x)
    Y.append(y)
    print(x,y)
  
  plt.plot(A,X)
  plt.plot(A,Y)
  </code></pre>
  <p>However, I read here stackoverflow.com/questions/6519380/… that <code>brenqt</code> is much faster than <code>fsolve</code>. I've tried then to use it but keep getting <code>f(a) and f(b) must have different signs</code>. I understand that <code>f must be continuous. f(a) and f(b) must have opposite signs.</code> So, I believe <code>brenqt</code> is not a good choice for this system. Please correct me if I'm wrong here.</p>
  <p>In my real case I'm encountering exactly what the answer here <a href="https://stackoverflow.com/questions/20827005/how-to-solve-3-nonlinear-equations-in-python">how to solve 3 nonlinear equations in python</a> says, i.e.&quot;fsolve()) is quite sensitive to initial conditions&quot; I want to avoid to &quot;firstly minimize the sum-of-squares&quot; as I have many more parameters than the OP of that question. How to use <code>optimize.root</code> to produce a similar result as the one I got with <code>fsolve</code> in my original question?</p>