LoginSignup
2
2

More than 3 years have passed since last update.

Undocumented Mathematica functions

Last updated at Posted at 2014-07-16

See also

Caution! There is no guarantee for the following information. They are obtained by guessing. In the future, the company may change them in an incompatible way.

System`

  • DuplicateFreeQ[list] (>= v9.0)
DuplicateFreeQ[{1, 2, 3}] // Print;  (* True*)
DuplicateFreeQ[{1, 2, 1}] // Print;  (* False *)
f[x_] := Module[{},
  Do[If[x > 5, Return[a]], {3}]; x
];
f[6] // Print;  (* 6 *)

f[x_] := Module[{},
  Do[If[x > 5, Return[a, Module]], {3}]; x
];
f[6] // Print;  (* a *)

System`Private`

  • InternalSeries[f, {x, x0, n}] (>= v5.1)
Func /: System`Private`InternalSeries[Func[x_], {x_, 0, n_Integer}] :=
  Sum[x^i, {i, 0, n}] + x^n * O[x];

Series[Func[x] / x, {x, 0, 2}] // Print;  (* 1/x + 1 + x + x^2 + O[x]^3 *)

SpecialFunctions`

Give the following a try:

?SpecialFunctions`*
  • HarmonicPolyLog[{m1, ..., mk}, x] (>= v9.0)
  • FunctionExpandHarmonicPolyLog[expr] (>= v9.0)
  • MultipleFiniteHarmonicSumS[{m1, ..., mk}, n] (>= v9.0)
  • MultiplePolyLog[{m1, ..., mk}, {z1, ..., zk}] (>= v9.0)
  • MultipleZetaValue[{m1, ..., mk}] (>= v9.0)
  • ShuffleProductExpand[expr] (>= v9.0)
  • StuffleProductExpand[expr] (>= v9.0)

It seems that the definitions of harmonic polylogarithms and multipolylogarithms are the same as Remiddi and Vermaseren and Vollinga and Weinzierl, respectively:

(* HPL 2.0, Mathematica 10.1.0 *)
<<HPL`;
HPL[{1, -2, 3, 0}, 0.7] // Print;
SpecialFunctions`HarmonicPolyLog[{1, -2, 3, 0}, 0.7] // Print;
SpecialFunctions`MultiplePolyLog[{1, -2, 3, 0}, {0.7, 1, 1, 1}] // Print;
-0.25112
-0.25112
-0.25112

Still the implementation is mysterious...

(* Mathematica 10.1.0 *)
Series[PolyLog[2, 1 - x], {x, 0, 1}] // Print;
Series[SpecialFunctions`HarmonicPolyLog[{2}, 1 - x] // FunctionExpand, {x, 0, 1}] // Print;
Series[SpecialFunctions`HarmonicPolyLog[{2}, 1 - x], {x, 0, 1}, Assumptions -> 0 < x < 1] // Print;
Pi^2/6 + (-1+Log[x]) x + O[x]^2
Pi^2/6 + (-1+Log[x]) x + O[x]^2
Pi^2/6 + (-1-2*I*Pi+Log[x]) x + O[x]^2

Less known functions

Only usage messages by ?Command are available.

  • ArgumentCountQ[head, len, min, max]
  • ArgumentCountQ[head, len, {m1, m2, ..., mi}] (>= v8.0)
TwoArgFunc[a___] := Null /; ArgumentCountQ[TwoArgFunc, Length[{a}], 2, 2] && False;

TwoArgFunc[1, 2] // Print;  (* TwoArgFunc[1, 2] *)
TwoArgFunc[1, 2, 3] // Print;  (* TwoArgFunc[1, 2, 3] with an error message "TwoArgFunc::argrx: TwoArgFunc called with 3 arguments; 2 arguments are expected." *)
  • ListQ[expr]

  • OptionQ[e]

In >= v6.0, one can use OptionsPattern and OptionValue for manipulating options.

  • StringQ[expr]
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2