## What is the difference between using fsolve and iteration for solving a set of equations?

Asked by Yavar Hayat

### Yavar Hayat (view profile)

on 12 Apr 2019
Latest activity Answered by Daniel Murphy

### Daniel Murphy (view profile)

on 12 Apr 2019
We can use fsolve to solve a set of equations by initilaising the variables or we can use an iterative method. Which is better? Should there be any preference to one or is it all the same? How to decide which one to use?
I am trying to solve multivariable nonlinear set of equations.

Torsten

### Torsten (view profile)

on 12 Apr 2019
I'd use the most efficient method that works for my special application.
In other words: just test it.
Matt J

### Matt J (view profile)

on 12 Apr 2019
We can use fsolve to solve a set of equations by initilaising the variables or we can use an iterative method.
The algorithms used by fsolve are themselves iterative. It is not clear what the other iterative algorithms are that you wish to compare them to.
Torsten

### Torsten (view profile)

on 12 Apr 2019
Usually fixed-point iteration:
https://en.wikipedia.org/wiki/Fixed-point_iteration

### Daniel Murphy (view profile)

Answer by Daniel Murphy

### Daniel Murphy (view profile)

on 12 Apr 2019

fsolve uses an iterative algorithm, with the initialised variables as the starting point for the iteration. See the help for fsolve (under options) to see what iterative methods you can choose.
As for choosing an algorithm, some are more suited to non-linear situations than others. I think the comment Torsten has left is right - decide what a "better" answer looks like to you (closest to the true value? converges the quickest?), and test that on your application.