5
$\begingroup$

I'm using NSolve to find the roots to a transcendental equation. For this, I need to specify a bounded region where roots are searched. What I want to know is how NSolve mathematically finds these roots, and why I need to specify a bounded region.

When I look up NSolve on Mathematica all it says is that

NSolve[expr, vars]: attempts to find numerical approximations to the solutions of the system expr of equations or inequalities for the variables vars

It doesn't tell me anything about how it does this. If it is using Newton-Raphson's method or any other method?

$\endgroup$
  • $\begingroup$ For reference, the polynomial case is discussed here. It is also in the only case discussed in Some Notes on Internal Implementation $\endgroup$ – Michael E2 Oct 7 '17 at 13:10
  • $\begingroup$ One method NSolve does not seem to use is Chebyshev approximation, which in the link is a univariate method requiring a bounded domain. $\endgroup$ – Michael E2 Oct 7 '17 at 13:13
  • 1
    $\begingroup$ The blog linked by @Szabolcs gives a reason for the second part of your question about the need for a bounded region: "But a key fact is that the roots [of a holomorphic function] are always countable—and, more importantly, there can only be finitely many roots in a given closed and bounded region." $\endgroup$ – Michael E2 Oct 8 '17 at 12:29
  • 1
    $\begingroup$ @Turbotanten, If you have infinitely many roots, then you'll need to bound the domain. (BTW, it sometimes works if there are infinitely many roots, to the extent that it will find finitely many of them: NSolve[Sin[1/x] == 0 && 0 < x < 1] returns 25K roots.) $\endgroup$ – Michael E2 Oct 10 '17 at 13:20
  • 1
    $\begingroup$ @J.M. I think that method is only used is in one dimension, so pretty much the Cauchy Integral Formula for isolation and maybe refinement, followed up by a local method for further refinement (aka "polishing"). $\endgroup$ – Daniel Lichtblau Oct 15 '17 at 17:28

Your Answer

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

Browse other questions tagged or ask your own question.