I want to solve my quintic equation with methods Newton and Bisection , and compare them. And I want to know, how to call Nsolve or Roots and told them that they use only for example Bisection algorithm.

PM: I dont want to write these algorithms myself

  • $\begingroup$ "I want to know, how to call NSolve ... and tell them that they use only for example Bisection algorithm. I don't want to write these algorithms myself." - none of the built-ins use bisection, so you really will need to write it yourself. (OK, technically, the Brent algorithm used by FindRoot[] can take a bisection step, but it has a lot of other things going on.) OTOH, FindRoot[] can be made to use Newton's method, see this for example. $\endgroup$ – J. M.'s technical difficulties Apr 16 at 14:41
  • 1
    $\begingroup$ Search this site for "bisection method." One almost never has to write things themselves these days, if one is resourceful enough. $\endgroup$ – Michael E2 Apr 16 at 14:48

For Newton

FindRoot[{x^5 - x + 1 == 0}, {x, 1}]

Then check the details with


Check in the documentation the option Method in particular.

For the bisection method, NSolve may use it but it is a such a big machine that you will never know what it has done. NSolve gives all the roots. It knows it is a polynomial equation. It has special methods for this.

NSolve[{x^5 - x + 1 == 0}, x]

If you would like to experiment with bisection, doing it yourself would be easier and more instructive than trying to know what NSolve is doing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.