3

Is there any command to give me the list of all the embedded elementary functions in Mathematica like Cos Sin Cosh Sinh Log and so on?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
user49047
  • 791
  • 5
  • 17
  • 1
    I think you need to define what makes a function elementary. – SPPearce Feb 08 '19 at 12:04
  • 1
    @kraZug Mathematica has already named it : https://reference.wolfram.com/language/guide/ElementaryFunctions.html – user49047 Feb 08 '19 at 12:08
  • 1
    I think it is safe to say that if there is an elementary function, then Mathematica has it. Now you get to decide what functions are elementary. – Somos Feb 08 '19 at 18:30

2 Answers2

4

There doesn't seem to be a direct way to use WolframLanguageData to get only the functions listed on the referenced page of elementary functions. The expression

WolframLanguageData[
 EntityClass[
  "WolframLanguageSymbol", {"FunctionalityArea", "BasicFunctions"}]]

gives rather more than asked for. There doesn't seem to be a functionality area closer to what is wanted.

Never mind, we can always read the documentation and do a little string hacking maybe:

n1 = Import[$InstallationDirectory ~~ "/Documentation/English/System/Guides/ElementaryFunctions.nb", "Text"];

and then after a little data-tasting ...

StringCases[n1, 
 "HelpLookup[\"paclet:ref/" ~~ fn : WordCharacter .. ~~ "\"" :> fn]
High Performance Mark
  • 1,534
  • 1
  • 10
  • 17
4

Another way to enumerate the elementary functions would be through MathematicalFunctionData[]:

FromEntity /@ MathematicalFunctionData["ElementaryFunctions"]
   {ArcCos, ArcCosh, ArcCot, ArcCoth, ArcCsc, ArcCsch, ArcSec, ArcSech, ArcSin, ArcSinh,
    ArcTan, ArcTanh, ArcTan[#1, #2] &, Cos, Cosh, Cot, Coth, Csc, Csch, Exp, Haversine,
    Log10, Log2, Log[#1, #2] &, Log, #1^#2 &, ProductLog, ProductLog[#1, #2] &, Sec, Sech,
    Sin, Sinc, Sinh, Sqrt, Tan, Tanh}

Note the separate entries for the one-argument and two-argument versions of Log[], ArcTan[], and ProductLog[].

One might argue that the Lambert function ProductLog[] is not actually elementary, but this is the convention followed by Mathematica. Similarly, one might also wonder why e.g. Gudermannian[], InverseGudermannian[], InverseHaversine[], and LogisticSigmoid[] aren't in the returned list.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574