Reputation: 329
Long story short, I am working on a project which entails fixing a bug I have found in Mathematica (8 and 10). In general, I would like to know what a specific Mathematica function is actually doing when it is called. That is, what is the numerical method implemented by a Mathematica function.
For my specific case, I am trying to figure out how Plot() takes a InterpolatingFunction and fits a curve to it. I have found cases where the fit is dependent on the interval which is plotted. If I expand or contract the plotting domain I get erroneous curve fitting in a localized region. It seems that Plot() selects a subset of data points from the InterpolatingFunction and fits the data. This causes error (though rare and easily avoided) for a specific curve I am plotting.
I am not asking for a solution to this problem, I just want to know what the Plot() function does when I give it an InterpolatingFunction. In general, I would like to obtain this information for any function. It seems like Wolfram would document this information somewhere, but nothing this specific can be found in the documentation center.
Edit: a more detailed description is here. There are answers and suggestions there, along with a link to a similar issues.
Upvotes: 1
Views: 196
Reputation: 6999
Plot
does an initial coarse sampling (~50 points) and adaptively samples additional points to smooth the curve. Try setting PlotPoints->1000
if the default is missing sharp features
The answer to your general question is unfortunately the inner workings of functions are not generally known / documented. mathematica.stackexchange.com is a better place to ask, but be specific.
Upvotes: 0