2

I am trying to figure out the differences between Optimize.fsolve and SymPys solve function? **Is there a difference in computation or are the constraints as to which method to use?**Is Scipy fsolve more accurate than Numpy solve function?

The obvious difference I found is that Scipy.Optimize.Fsolve can solve non linear equations given a guess value, whereas SymPys solve function can be used to solve equations and expressions that contion symbolic math variables.

Any reference literature or website which you can share will be much appreciated.

hpaulj
  • 221,503
  • 14
  • 230
  • 353
Mat
  • 45
  • 7
  • 1
    `scipy` is a strictly numeric package, based on `numpy`, and in the case of `fsolve`, "fsolve is a wrapper around MINPACK’s hybrd and hybrj algorithms." I'm sure there's web resources on MINPACK. `sympy` is a symbolic math package - quite distinct from `numpy` (apparently MATLAB's symbolic code is more integrated with its numeric stuff). Its `solve` is an algebraic solver (listing the range of equation types that it can handle). It also has a `nsolve`, which does numeric root finding, delegating the task to `mpmath`. – hpaulj Oct 13 '20 at 16:13
  • 1
    Recommendation questions are often closed as off topic for SO, especially if asking for outside resources. My comment was based entirely on the official documentation of those packages, something which you can read just as well. If you don't understand the difference between numeric and algebraic solutions, then you may need to refresh your school or college math memory. Wiki (and other college class notes) may be good starting point. – hpaulj Oct 13 '20 at 16:19

0 Answers0