Is there a way to show how Mathematica defines a function, such as
In: Something[Sqrt], Out: Sqrt[x] -> x^(1/2)
As far as I understand it the command Definition[] should do the job, but unfortunately it does not work on built in functions. I am asking because more complicated functions than Sqrt, such as for example the JacobiAmplitude[], are not well documented in the Help section, and give different results with different programs.
Since I got a solution containing those functions which are not defined uniformly everywhere, I would need to know how to interpret the output generally so I could do the calculation with pencil and on paper if I had to .
I tried to reconstruct the definitions myself with the informations given at NIST, and I got this far:
That gives the same results like the built in functions for some ranges, but not for others; also it takes literally hours to compute the definitions I defined myself, even when I let the sum run to a small finite value instead of infinity.
The built in JacobiAmplitude[] in contrast evaluates in a few seconds and for all given input values, so I assume I'm doing something wrong with my own definitions.
EllipticK[]
is built-in, or if you must,ArithmeticGeometricMean[]
.EllipticNomeQ[]
is also built-in, and the most efficient algorithm also depends on the AGM. 2. The series for the Jacobian amplitude you are displaying has very limited numerical utility. 3. Note that Mathematica uses the parameter $m$ instead of the modulus $k$ as the second argument for the elliptic integrals and elliptic functions. $\endgroup$JacobiAmplitude[]
is implemented as top-level code,PrintDefinitions[]
from theGeneralUtilities`
package can be revealing. $\endgroup$MathematicalFunctionData
introduced in v10.3 (withToEntity
as demonstrated on its documentation)? I believe this is very much what you're looking for, and trying to extract this information from the way Mathematica actually works is probably a relatively futile effort in comparison. $\endgroup$