-1

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

Mathlover
  • 1
  • 1
  • "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. – J. M.'s missing motivation Apr 16 '20 at 14:41
  • 1
    Search this site for "bisection method." One almost never has to write things themselves these days, if one is resourceful enough. – Michael E2 Apr 16 '20 at 14:48

1 Answers1

1

For Newton

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

Then check the details with

Options@FindRoot

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.