9
$\begingroup$

This question already has an answer here:

When I use Mathematica for analysis and I write a publication, readers often ask me: "What is the algorithm behind your calculation?". I answer that I did it with Mathematica and if they are interested I give them the code.

Is it possible to find out which algorithms are used for implemented Mathematica functions?

That would be very helpful.


Edit: 16th June 2015

From Wolfram Research I got the answer to this question:

"Currently, we do not disclose such information to the public"

$\endgroup$

marked as duplicate by J. M. will be back soon Jun 16 '15 at 14:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    $\begingroup$ When using the setting Method -> Automatic, Mathematica will often perform a number of heuristics and then select an algorithm it thinks is appropriate. If you need to be able to say "I used method so-and-so", you will have to provide an explicit setting. $\endgroup$ – J. M. will be back soon Jun 11 '15 at 10:19
  • 2
    $\begingroup$ (BTW, I'm pretty sure this is a dupe; I just can't find it.) $\endgroup$ – J. M. will be back soon Jun 11 '15 at 11:16
  • 3
    $\begingroup$ Another thing to consider is that some functions use multiple algorithms and switch between them while fining a solution for a single run. So from some part of job a function uses one algorithm then a change in the nature of the problem is detected and a function may switch to another solution method on the fly. $\endgroup$ – user21 Jun 11 '15 at 12:16
  • 2
    $\begingroup$ Re: "Currently, we do not disclose such information to public", in my experience when I asked specific implementation questions, they usually sent useful references to the papers the methods are based on. $\endgroup$ – Szabolcs Jun 16 '15 at 7:53
  • 2
    $\begingroup$ @J.M., blochwave (145) seems like the question you might have missed $\endgroup$ – shrx Jun 16 '15 at 13:41
9
$\begingroup$

Turning my comment into an answer, one option is to read through the Wolfram page titled "Some Notes on Internal Implementation", which gives some detail about the implementation of many functions.

It is definitely worth noting the introduction to that page though (my own emphasis):

General issues about the internal implementation of the Wolfram Language are discussed in "The Internals of the Wolfram System". Given here are brief notes on particular features.

It should be emphasized that these notes give only a rough indication of basic methods and algorithms used. The actual implementation usually involves many substantial additional elements.

Thus, for example, the notes simply say that DSolve solves second-order linear differential equations using the Kovacic algorithm. But the internal code that achieves this is over 60 pages long, includes a number of other algorithms, and involves a great many subtleties.

Indeed, further down the page:

  • Integrate uses about 500 pages of Wolfram Language code and 600 pages of C code.
  • DSolve uses about 300 pages of Wolfram Language code and 200 pages of C code.

So there is a lot going on under the hood, and you might not always be able to answer your readers' questions fully.

$\endgroup$

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