For questions regarding the underlying implementation of built-in functions.

learn more… | top users | synonyms

6
votes
1answer
291 views

Algorithms behind implemented Mathematica functions [duplicate]

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 ...
43
votes
3answers
3k views

How to find out which method Mathematica selected?

There are commands like NonlinearModelFit[] or NDSolve[] that have the option Method it ...
4
votes
1answer
1k views

How does Mathematica estimate error on fit parameters?

When performing a fit using NonlinearModelFit (or any of Mathematica fitting functions, but I am particularly interested in nonlinear models), Mathematica makes a ...
10
votes
1answer
928 views

How does Mma compute Confidence Intervals?

I am trying to understand how Mma computes the Confidence Intervals after a NonlinearModelFit. Consider the following example: ...
5
votes
0answers
129 views

Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
4
votes
1answer
141 views

What is the formula Mathematica uses for ZetaZero?

What is the formula/algorithm Mathematica uses for the ZetaZero command?
5
votes
3answers
285 views

How could I implement the equivalent of NextPrime

I would like to know what an implementation of the function NextPrime would look like if it were implemented in Mathematica's core language.
14
votes
1answer
2k views

What method does NDSolve use for solving PDEs?

What is NDSolve's mode of operation? I use it to solve partial differential equations and never gave it too much thought. Recently, I came across this question. ...
5
votes
1answer
116 views

Actual bins used for Pearson Chi Square Test

PearsonChiSquareTest[data, dist] computes bins for data as a step towards calculating the test statistic. For continuous ...
-2
votes
1answer
157 views

Mathematica's steps towards the result of a definite integral

I am interested in this definite integral: $$ \eqalign{\int_0^\infty {x^2 \log(1-e^{-x})}\; dx\cr } $$ That is: ...
1
vote
0answers
147 views

How to write my own interpolation method [duplicate]

I was comparing results of spline interpolation in Mathematica and C++/gsl-library Results of interpolation are different if I use ...
9
votes
1answer
307 views

What algorithm does Plot use to determine abscissas?

(I'm hoping this question is not hopelessly naive...) My understanding is that Plot's strategy is to generate a list of abscissas, evaluate the argument expression ...
8
votes
1answer
244 views

Possible Method for MatrixExp

Well, probably a hard question, but I think it's better to cry out loud :). I noticed that MatrixExp owns Method option when ...
1
vote
2answers
98 views

Does FindFit use symbolic differentiation?

Does FindFit use symbolic differentiation when optimizing by least squares a non-linear function?
2
votes
0answers
110 views

The idea behind Stiffness switching method with NDsolve [closed]

Does the Stiffness switching method with NDsolve switch just between multiple variants of 4th order Runge Kutta method or it uses also other methods?
30
votes
1answer
780 views

What calendar is Mathematica using for dates in the distant past?

It appears that Mathematica treats all dates as proleptic Gregorian dates by default, a hypothesis that can be easily tested by using AbsoluteTime to compute the ...
3
votes
0answers
77 views

How does Mathematica automatically choose which classifier method to use?

I'm interested in what heuristics are used in Classify's choice of method.
5
votes
1answer
226 views

The default ColorFunction of DensityPlot before v10?

The default ColorFunction of Plot, Plot3D before v10 is respectively mentioned here and ...
3
votes
1answer
242 views

What method does `NIntegrate` uses by default?

There is a variety of algorithm for performing numerical integration (See wiki). What method does NIntegrate uses by default? I looked on the documentation page and I saw that the function ...
4
votes
1answer
233 views

Root finding: zeroes of Mathieu function

I am finding the roots of the Mathieu sine function, and find Mathematica and Maple do not agree on the solutions. For example, consider the solutions of ...
2
votes
1answer
131 views

Anyone knows the algorithm used by NullSpace function?

NullSpace function gives a list of vectors that forms a basis for the null space of the input matrix. When the rank of the input argument matrix $M_{m\times n}$ is ...
1
vote
0answers
51 views

Algorithm for converting truth tables to Boolean functions

The function BooleanFunction is able to convert a truth table into a Boolean function. Does anyone know what is the mathematical background and/or algorithm that ...
14
votes
1answer
438 views

What is the real default CellEvaluationFunction?

The default CellEvaluationFunction is Identity but one can quickly see that this is handled specially as an equivalent function, ...
0
votes
0answers
53 views

How to make work Plus function? [duplicate]

I have a little problem. I have k = 1.56343*10^9; r = 9.10492*10^18. And I should receive a (2*r*r-k*k)/2*r*r, it equals to ...
23
votes
1answer
496 views

Why does list assignment with a packed array result in unpacked values?

Bug introduced in 5.2 or earlier and fixed in 10.1.0 This is another question on the design choices in Mathematica. I understand that without direct reply from the developers it may not be ...
41
votes
1answer
973 views

What's inside InterpolatingFunction[{{1., 4.}}, <>]?

I'm curious what's inside the InterpolationFunction object? For example: ...
3
votes
3answers
148 views

Pick bug? level 0 matching

A previous discussion of this issue (Is there a bug in Pick?) accepted that matching at level 0 is not a bug in Pick. Was that correct? I am not yet persuaded. ...
66
votes
6answers
3k views

What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

Note: I put Simon's implementation on GitHub. Contributions welcome! When trying to read the definition of already defined (package or built-in) symbols using ...
-3
votes
1answer
85 views

Miller-Rabin algorithm [closed]

I want to implement the Miller-Rabin algorithm in Mathematica to check if a number is prime with at least 99.99% probability. I used this: ...
3
votes
0answers
123 views

PlotRange->Automatic the exact function used to calculate outliers

I know that PlotRange->Automatic does the following: "the distribution of coordinate values is found, and any points sufficiently far out in the distribution ...
2
votes
2answers
153 views

Derivative of Vectoral NDSolve Interpolated Function / Rule Solutions,/., and Vector NDSolve [duplicate]

I need to find the instantaneous phase and instantaneous frequency for a rotating system. I am having difficulty making the math work with interpolating functions. First, here is a problem without ...
1
vote
0answers
38 views

Apparent issue with derivative of FractionalPart [duplicate]

This issue came to my attention from Math.SE: http://math.stackexchange.com/questions/1015325/is-the-derivative-of-x-on-0-1-always-equal-to-1/1015342#1015342 To summarize, it appears that ...
14
votes
1answer
269 views

Why do big-O terms disappear in definite integrals since Mathematica 9?

In Mathematica 8, when I computed the following input: Integrate[Series[Cos[x], {x, 0, 2}], {x, 0, a}] Mathematica returned an expression that had a O[a^4] in ...
3
votes
0answers
216 views

Distance Time Warp (DTW) function implementation in mathematica

The DTW (Distance time warp) is given here http://en.wikipedia.org/wiki/Dynamic_time_warping There is an implementation of DTW in R as well as MATLAB. However i am unable to find something for DTW in ...
7
votes
2answers
284 views

Get name of hidden inbuilt functions (like Ticks drawing)

how do I get the name and definition of a builtin Mathematica functions? For instance, I would like to see how default Tick plotting function is implemented. However, it is not clear where it is and ...
2
votes
0answers
54 views

Implementation of Series function

I'm trying to evaluate the partial derivatives of some function F[x,y] at some point, i.e. ...
4
votes
1answer
434 views

Use of Strassen's algorithm

Strassen's algorithm is an algorithm for matrix multiplication that is asymptotically faster than the naive one. In practice, the matrices involved have to be quite large before Strassen's algorithm ...
6
votes
9answers
933 views

Find the smallest positive integer that satisfies a certain condition

I know Mathematica is really powerful when it comes to functional operations like applying a list of tasks to a list of variables. Sometimes I feel like it isn't the most powerful tool when it comes ...
7
votes
2answers
290 views

What is the underlying algorithm for GroupElementToWord?

What algorithm is Mathematica 9 using for GroupElementToWord[group, g]?
7
votes
0answers
165 views

Finding hidden treasure (aka finding undocumented functions) [duplicate]

I was searching for a way to determine if a point is within a polygon and stumbled upon rm -rf's answer. (actually, I really wanted to find a point within a ...
4
votes
0answers
139 views

Given two samples, how does LocationTest select its AutomaticTest?

How does LocationTest select its "AutomaticTest" when testing two samples? Background: A previous post poses a similar question ...
22
votes
2answers
502 views

How to implement FittedModel like objects

In the course of making some RLink wrappers I want to have some richer containers like Mathematica does with its FittedModel ...
3
votes
0answers
71 views

Can BreadthFirstScan be modified?

I would like to obtain a "slick" implementation of A*-search algorithm on Graph objects, using the built-in BreadthFirstScan (if that is possible at all). I noticed that BreadthFirstScan is static in ...
6
votes
2answers
137 views

Algorithm in RandomChoice[{w1,w2,…}->{e1,e2,…},n]?

I wonder if someone happens to know the actual algorithm implemented in the particular overload of RandomChoice that handles explicitly presented discrete ...
9
votes
1answer
124 views

Why does $Failed have attribute HoldAll?

Why does $Failed have attribute HoldAll? Are there typical situations where $Failed is ...
2
votes
1answer
561 views

Method used by FindFit

Using FindFit, Mathematica selects an optimal algorithm when Automatic is selected. I'd like to know the name of the method ...
21
votes
2answers
829 views

Blend code for built-in ColorData schemes

Hi I want to get a blend similar to "SunsetColors". To make those slight modifications, I would like to know the precise blend of that color scheme. My try: ...
1
vote
0answers
38 views

Internals of Prime function [duplicate]

Does anyone knows how exactly Prime works ? For example how Prime[1000000000] is calculated ? The only information I found was ...
2
votes
0answers
98 views

What are the limits of the Prime-functions? [duplicate]

Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits for these funtions? ...