need to improve accuracy in fsolve to find multiples roots
<p>I'm using this code to get the zeros of a nonlinear function.
Most certainly, the function should have 1 or 3 zeros</p>

<pre><code>import numpy as np
import matplotlib.pylab as plt
from scipy.optimize import fsolve

[a, b, c] = [5, 10, 0]

def func(x):
    return -(x+a) + b / (1 + np.exp(-(x + c)))

x = np.linspace(-10, 10, 1000)

print(fsolve(func, [-10, 0,  10]))
plt.plot(x, func(x))
plt.show()
</code></pre>

<p>In this case the code give the 3 expected roots without any problem.
But, with c = -1.5 the code miss a root, and with c = -3 it find a non existing root.</p>

<p>I want to calculate the roots for many different parameter combinations, so changing the seeds manually is not a practical solution.</p>

<p>I appreciate any solution, trick or advice.</p>