Checking the method used by NSolve

I have a question related to the hidden method used in NSolve. I have a set of equations, I was able to solve with NSolve. However, I want to know what method Mathematica has chosen to solve it.

Thank you!

See here and here.

The method will vary from one system to another, as well as based on option settings.

I agree, but is there a command that I can write to extract what Nsolve has used to solve my system?

Definite maybe, if it is a system of polynomials. You can do

NSolve[a]

to get the code for NSolve loaded. Then do

SystemNSolveDumpdebugLevel=12;

With this set, you might get a spew of messages when you feed NSolve your system. If you do, it means NSolve at least used the eigensystem decomposition method in some part of the process. If not, then it did “other things” (apologies for such technical jargon).

Note that the variable being set is strictly for internal debugging purposes. You are using it at your own risk. I don’t think it will bite. But bear in mind I’m the owner of this particular pet and it has never interacted with outsiders in my presence, so I can’t really predict the outcome.

Thanks for the answer. Actually, I did not get any messages.

  1. Does this only mean that Mathematica did “other things” in solving the system?
  2. Is there any other way to know the numerical methods used to solve the system?
  3. Also, does this apply to the NDSolve function as well? In other words, we can only use Mathematica as a black box?

Yes, it means some other method or methods were used. For polynomial systems almost certainly it would be the sparse polyhedral homotopy method.

NDSolve has considerable support for method options and suboptions. Also it has step and event monitors that can record information along the way.