Sunday, April 24, 2016

How It Works: Trapezoid Integration

How It Works : Integrate by the Trapezoid Rule

In related post I used a numerical integration function from Bahder, Mathematica for Scientists and Engineers, to integrate a sawtooth function. This is a great book. Despite having been written in 1995, it's a wealth of 'under the hood' insights into the Wolfram Language. Here is a second function from Bahder for integration via the trapezoid rule that is more sophisticated than the first one. And due to using built-in Listable functionality in Dot and Plus it's about twice as fast

The syntax of the parameter uses a named Pattern to check the data parameter to see if it is a List of 2-element (x,y) pairs, then uses Condition to make sure that data contains more than one point.

Here is the formula for integration by the trapezoid rule:


And here is Bahder's code. The syntax of the parameter uses a named Pattern to check data to see if it is a List of 2-element (x,y) pairs, then uses Condition to make sure that data contains more than one point.

Clear@integrateTrapezoid;
integrateTrapezoid[data:{{_,_}..}/;Length@data>1]:=Module[{xDifferences,ySums},
xDifferences=Dot[{-1,1},#]&/@Partition[First/@data,2,1];
ySums=Apply[Plus,Partition[Last/@data,2,1],{1}];
Plus@@(xDifferences,ySums)/2
]

The Dot product multiplies each vector (List) term by term and sums them.

Dot[{a,b,c},{x,y,z}]

a x+b y+c z

Let's check to make sure the abbreviated operators for Apply and Divide will work as intended; which they will. Apply is 'stickier' than Divide and so Plus will be evaluated before taking the average (dividing by 2).

Precedence/@{Apply,Divide}

{620.,470.}

We test it on his data and.. it doesn't work. There is a bug.

data1={{1.2,51.3},{2.3,72.8},{3.0,87.1},{3.7,53.2}};

integrateTrapezoid@data1

{62.6,80.3,70.5}

Let's add some Print statements, which suffice for debugging all pure functional programs, that is, short ones.

Clear@integrateTrapezoid;integrateTrapezoid[data:{{_,_}..}/;Length@data>1]:=Module[{xDifferences,ySums},
xDifferences=Dot[{-1,1},#]&/@Partition[First/@data,2,1];
Print@xDifferences;
ySums=Apply[Plus,Partition[Last/@data,2,1],{1}];
Print@ySums;
Plus@@(xDifferences,ySums)/2
]

With the Print statement results it's easy to see that xDifferences is indeed the difference between successive x-points and ySums is the sum of each pair of successive y-values.

integrateTrapezoid@data1

{1.1,0.7,0.7}
{124.1,159.9,140.3}
{62.6,80.3,70.5}

I see the bug. We should be multiplying xDifferences by ySums, not listing them. There's a lesson: Always use a multiplication symbol in code rather than a space, which might be mis-read as I did in Bahder's code. We'll add the multiplication and remove the Print statements.

Clear@integrateTrapezoid;integrateTrapezoid[data:{{_,_}..}/;Length@data>1]:=Module[{xDifferences,ySums},
xDifferences=Dot[{-1,1},#]&/@Partition[First/@data,2,1];
ySums=Apply[Plus,Partition[Last/@data,2,1],{1}];
Print@(xDifferences*ySums);
Plus@@(xDifferences*ySums)/2
]

Now we get the correct answer.

integrateTrapezoid@data1

{136.51,111.93,98.21}
173.325

Let's try it on something else.

data2={{0.0,0.0},{1.0,1.0},{2.0,0.0},{3.0,2.0},{4.0,0.0},{5.0,2.0},{6.0,1.0},{7.0,3.0},{8.0,0.0},{9.0,2.0},{10.0,0.0}};
Graphics[Line@data2,Axes->True]



integrateTrapezoid@data2

{1.,1.,2.,2.,2.,3.,4.,3.,2.,2.}
11.

Trusting we got xDifferences and ySums right, we can copy and paste them into the program final line by hand to double-check its validity.

Plus@@{1.`,1.`,2.`,2.`,2.`,3.`,4.`,3.`,2.`,2.`}/2

11.

Recommended:

Saturday, April 23, 2016

Compiling a Function: Mandelbrot Set

Computing the Mandelbrot set is a classic example of the need to Compile a Mathematica function (see Ruskeepää, p. 451). You just need to get the syntax right for a successful Compile. Below, the first argument is the parameter, c, and its type, Complex. The entire Module is the second argument, the expression to be compiled. Definitely try this at home!

Clear@mandelbrot;mandelbrot=Compile[{{c,_Complex}},Module[{z=0+0I,n=0},While [Abs@z<2&&n<50,z=z^2+c;n++];n  ] ]

CompiledFunction[Argument count: 1
Argument types: {_Complex}

The CompiledFunction can be applied to individual numbers. The criteria for inclusion in the Mandelbrot set is, after a limited number of iterations of z = z^2 + c (in this case 50), is its absolute value less than a given number (in this case 2). The absolute value of a complex number is its Euclidean distance from the origin. If the absolute value of a number exceeds 2 before 50 iterations, e.g. 4, it is excluded.

mandelbrot[0.2+I]

4

mandelbrot[0.2+0.2I]

50

Let's do some heavy-duty computing. As a precaution we'll increase the RAM allocated to Mathematica.

Needs@"JLink`";
ReinstallJava[JVMArguments->"-Xmx6000m"]

LinkObject[[]

Start with a couple of individual plots. I use ImageSize->Full so when you do this yourself a large image will automatically be generated. On my Dell Optiplex 900 these take 2.68 seconds each.

Timing[DensityPlot[mandelbrot[x+I y],{x,-2,1},{y,-1.5,1.5},ColorFunction->Hue,PlotPoints->200,Mesh->False,ImageSize->Full,FrameTicks->{{-2,-1,0,1},{-1,0,1}}]]//Column


 Timing[DensityPlot[mandelbrot[x+I y],{x,-2,1},{y,-1.5,1.5},ColorFunction->"Rainbow",PlotPoints->200,Mesh->False,ImageSize->Full,FrameTicks->{{-2,-1,0,1},{-1,0,1}}]]//Column

 I'm kind of curious about all the built-in ColorFunctions. Let's plot Mandelbrot sets using each of them. Here they are. I reverse the order since I like some of the ones at the end best.

colorFunctions=ColorData@"Gradients"

{AlpineColors,Aquamarine,ArmyColors,AtlanticColors,AuroraColors,AvocadoColors,BeachColors,BlueGreenYellow,BrassTones,BrightBands,BrownCyanTones,CandyColors,CherryTones,CMYKColors,CoffeeTones,DarkBands,DarkRainbow,DarkTerrain,DeepSeaColors,FallColors,FruitPunchColors,FuchsiaTones,GrayTones,GrayYellowTones,GreenBrownTerrain,GreenPinkTones,IslandColors,LakeColors,LightTemperatureMap,LightTerrain,MintColors,NeonColors,Pastel,PearlColors,PigeonTones,PlumColors,Rainbow,RedBlueTones,RedGreenSplit,RoseColors,RustTones,SandyTerrain,SiennaTones,SolarColors,SouthwestColors,StarryNightColors,SunsetColors,TemperatureMap,ThermometerColors,ValentineTones,WatermelonColors}

Length@colorFunctions

51

I'll make a Grid of them that will correspond to the Grid of the plots themselves so we can easily look up the ColorFunction of one we like by finding its name in the corresponding place in the Grid. Although each row will have 3 plots and 3 divides 51 evenly, by habit I use the syntax for Partition that would not drop an overhang of a ragged List (the empty List {} in the position of the padding argument).

Reverse@colorFunctions//Partition[#,3,3,1,{}]&//Grid

















The iterator, predefined, in this Table iterates over all the ColorFunctions. Note you do not need to use the cumbersome {i, Length@colorFunctions} requiring the iterator to be a number.

Table[DensityPlot[mandelbrot[x+I y],{x,-2,1},{y,-1.5,1.5},ColorFunction->predefined,PlotPoints->200,Mesh->False,FrameTicks->{{-2,-1,0,1},{-1,0,1}},ImageSize->Medium],{predefined,Reverse@colorFunctions}]//Partition[#,3,3,1,{}]&//Grid




























































































Recommended:

Thursday, April 21, 2016

Example of a Package in a Notebook: Trapezoid Integration of Data Points

Integrate by the Trapezoid Rule


This example of writing your own numerical integration function is from Bahder's excellent book, Mathematica for Scientists and Engineers. I use it to show how to write a Package in a Notebook, as opposed to in a .m file.

While it always pays to see if Mathematica has a built-in function to do what you want, I don't see that NIntegrate can integrate over data points, although it has this nice introduction for the TrapezoidRule: "The trapezoidal rule for integral estimation is one of the simplest and oldest rules (possibly used by the Babylonians and certainly by the ancient Greek mathematicians)."

I needed a function to integrate over data points from an irregular, piecewise, sawtooth-type function. Bahder notes that integrating via the trapezoid rule approximates the integral over a list of (x,y) data points that may be irregularly spaced. Here is the formula. Keyboard shortcuts are faster than a palette; here they are Ctrl+- for subscript and Ctrl+spacebar to exit a subscript. Remember to use a double equal sign for 'equals'.



Here is the numerical integral in a Package. The Package is in one Cell and I set the Cell to Initialization (right-click on the Cell and select Initialization Cell) to automatically load the Package when I evaluate any function in the Notebook.

Note Bahder's use of a named Pattern and Repeated to type-check the data argument. It compares a List of repeated two-element Lists to the pairs that we give it. He then makes sure that there is more than one data pair using Condition. Some say the Wolfram Language is weakly-typed. That is incorrect; it has powerful type-creation and type-checking capabilities.

BeginPackage@"BahderMSE`";

IntegrateTrapezoid::usage="IntegrateTrapezoid[data:{{_,_}..}/;Length@data>1] takes a list of (x,y) pairs, x1 < x2 <x3 ..., that are not necessarily evenly spaced and returns a numerical approximation to their integral using the trapezoid rule.";

Begin@"`Private`";

IntegrateTrapezoid[data:{{_,_}..}/;Length@data>1]:=1/2 Sum[(data[[n+1,1]]-data[[n,1]])(data[[n,2]]+data[[n+1,2]]),{n,Length[data]-1}]

End[];
EndPackage[]

Let's check the usage statement.

In[7]:= ?IntegrateTrapezoid

IntegrateTrapezoid[data:{{_,_}..}/;Length@data>1] takes a list of (x,y) pairs, x1 < x2 <x3 ..., that are not necessarily evenly spaced and returns a numerical approximation to their integral using the trapezoid rule.

Now test it on the same data Bahder used...

In[8]:= data1={{1.2,51.3},{2.3,72.8},{3.0,87.1},{3.7,53.2}};

And we do get the same result.

In[9]:= IntegrateTrapezoid@data1

Out[9]= 173.325

Let's try a different example using Mathematica's SawtoothWave function. This is a typical use of Thread to combine the x and y points in their own Lists.

In[10]:= Thread@{Range[0,3,0.1],SawtoothWave@#&/@Range[0,3,0.1]}

Out[10]= {{0.,0.},{0.1,0.1},{0.2,0.2},{0.3,0.3},{0.4,0.4},{0.5,0.5},{0.6,0.6},{0.7,0.7},{0.8,0.8},{0.9,0.9},{1.,0.},{1.1,0.1},{1.2,0.2},{1.3,0.3},{1.4,0.4},{1.5,0.5},{1.6,0.6},{1.7,0.7},{1.8,0.8},{1.9,0.9},{2.,0.},{2.1,0.1},{2.2,0.2},{2.3,0.3},{2.4,0.4},{2.5,0.5},{2.6,0.6},{2.7,0.7},{2.8,0.8},{2.9,0.9},{3.,0.}}

We see that it is a numerical approximation of the full SawtoothWave where the peaks fall short of 1.









There are three triangles of unit length and height = 0.9, so the total area by a = 1/2 b * h is 1.35. The function works for this example but would need to be validated and its accuracy evaluated for others.

IntegrateTrapezoid@%%

Out[12]= 1.35


Thomas Bahder, Mathematica for Scientists and Engineers


Thursday, February 4, 2016

Wolfram Language Attribute: OneIdentity

Attributes modify the behavior of entire classes of functions. Some Attributes cause functions to have well-known mathematical properties such as commutativity, associativity, or idempotency, notably for valid pattern-matching. Others control the way the Wolfram Language evaluates or does not evaluate a function's arguments, which if you study that you will see is at the very core of Wolfram Language operation.

Listable is a valuable functional language Attribute since it incorporates Thread into a function so it automatically maps over a List and instead of taking a List apart, we apply a function to it as a gestalt.

NumericFunction is an Attribute of all Wolfram Language mathematical functions and is True when all of their arguments are numerical. I suspect it is integral to the interaction of many functions with the underlying knowledge base of Mathematica and therefore to many functions' valid behavior (e.g. Piecewise – always define piecewise mathematical functions with Piecewise).

Attribute: OneIdentity


OneIdentity is the mathematical property of idempotency, which dictates that applying a function any number of times to its argument (i.e. Nest) returns the argument unchanged. Examples are adding zero to any number, or multiplying any number by one, or raising any number to 1st or 0th power (except 0 - someone explain that inconsistency to me!).

0^0

During evaluation of In[549]:= Power::indet: Indeterminate expression 0^0 encountered. >>

Out[549]= Indeterminate

The Doc Center says that OneIdentity is necessary for pattern-matching to work with the default of Times, Plus, and Power, which is a period. I.e., x_+ y_. => x + 1, x_ * y_. => x * 1, and x_^y_. => x^1.

MatchQ[x, Times[n_. , x_]]

True

You can see that OneIdentity removes nested Heads. It says to the evaluator, 'If the given pattern x_ matches any of these patterns, return True.'

a+b+c/.x_:>u/;Print@FullForm[Plus[x]//HoldForm]

HoldForm[Plus[Plus[a,b,c]]]
HoldForm[Plus[Plus]]
HoldForm[Plus[a]]
HoldForm[Plus[b]]
HoldForm[Plus[c]]

a+b+c

Here are related posts on Flat and Orderless. This post shows how to reveal all built-in functions with a given Attribute, categorized by the Attribute.

This is an excellent out-of-print book but there is plenty to learn from it. I'd compare it to David Wagner's Power Programming in Mathematica in its insight to how the Wolfram Language works.

Bahder, Thomas B. Mathematica for Scientists and Engineers. Reading, MA: Addison-Wesley. 1994.




Get new posts by email:

Wolfram Language Attribute: Flat

Attributes modify the behavior of entire classes of functions. Some Attributes cause functions to have well-known mathematical properties such as commutativity, associativity, or idempotency, notably for valid pattern-matching. Others control the way the Wolfram Language evaluates or does not evaluate a function's arguments, which if you study that you will see is at the very core of Wolfram Language operation.

Listable is a valuable functional language Attribute since it incorporates Thread into a function so it automatically maps over a List and instead of taking a List apart, we apply a function to it as a gestalt.

NumericFunction is an Attribute of all Wolfram Language mathematical functions and is True when all of their arguments are numerical. I suspect it is integral to the interaction of many functions with the underlying knowledge base of Mathematica and therefore to many functions' valid behavior (e.g. Piecewise – always define piecewise mathematical functions with Piecewise).

Attribute: Flat


Flat is the mathematical property of associativity, which dictates that different groupings of numbers to specify the order in which the operation is performed, return the same result. E.g. ((a+b)+c) = (a+(b+c)) and (2x3)x4 = 2x(3x4).

a+(b+c)==(a+b)+c

True

Thomas Bahder uses a neat trick to show how Attributes work and how some affect pattern-matching. Here is the trick revealing the mechanism of Flat. Bahder uses a Condition that will never be True, which causes Wolfram Language to try all permutations of the function's arguments that are valid under Orderless. In the false predicate he inserts a Print statement to reveal how the Wolfram Language evaluator works. HoldForm is necessary to stop the evaluator from putting the arguments into standard order before printing them.

Flat tells the Wolfram Language evaluator, 'If the given pattern x_ + y_ matches any of the following patterns, return True.'

a+b+c/.x_+y_:>u/;Print@FullForm[Plus[x,y]//HoldForm]

HoldForm[Plus[a,Plus[b,c]]]
HoldForm[Plus[b,Plus[a,c]]]
HoldForm[Plus[c,Plus[a,b]]]
HoldForm[Plus[Plus[a,b],c]]
HoldForm[Plus[Plus[a,c],b]]
HoldForm[Plus[Plus[b,c],a]]
HoldForm[Plus[a,b]]
HoldForm[Plus[b,a]]
HoldForm[Plus[a,c]]
HoldForm[Plus[c,a]]
HoldForm[Plus[b,c]]
HoldForm[Plus[c,b]]

a+b+c

Here are related posts on Orderless and OneIdentity, and this post shows how to reveal all built-in functions with Attributes categorize by their Attribute.

This is an excellent out-of-print book but there is plenty to learn from it. I'd compare it to David Wagner's Power Programming in Mathematica in its insight to how the Wolfram Language works.

Bahder, Thomas B. Mathematica for Scientists and Engineers. Reading, MA: Addison-Wesley. 1994.

Wolfram Language Attribute: Orderless

Attributes modify the behavior of entire classes of functions. Some Attributes cause functions to have well-known mathematical properties such as commutativity, associativity, or idempotency, notably for valid pattern-matching. Others control the way the Wolfram Language evaluates or does not evaluate a function's arguments, which if you study that you will see is at the very core of Wolfram Language operation.

Listable is a valuable functional language Attribute since it incorporates Thread into a function so it automatically maps over a List and instead of taking a List apart, we apply a function to it as a gestalt.

NumericFunction is an Attribute of all WL mathematical functions and is True when all of their arguments are numerical. I suspect it is integral to the interaction of many functions with the underlying knowledge base of Mathematica and therefore to many functions' valid behavior (e.g. Piecewise  – always define piecewise mathematical functions with Piecewise).

Attribute: Orderless


Thomas Bahder uses a neat trick to show how Attributes work and how some affect pattern-matching. Here is the trick revealing the mechanism of Orderless, which is equivalent to the mathematical commutative property, that is, x + y = y + x.



Bahder uses a Condition that will never be True, which causes WL to try all permutations of the function's arguments that are valid under Orderless. In the false predicate he inserts a Print statement to reveal how the WL evaluator works. HoldForm is necessary to stop the evaluator from putting the arguments into standard order before printing them.

Orderless says to the Wolfram Language evaluator, 'If given pattern matches any of these patterns, return True.'

a+b+c/.x_+y_+z_:>u/;Print@FullForm[Plus[x,y,z]//HoldForm]

HoldForm[Plus[a,b,c]]
HoldForm[Plus[a,c,b]]
HoldForm[Plus[b,a,c]]
HoldForm[Plus[b,c,a]]
HoldForm[Plus[c,a,b]]
HoldForm[Plus[c,b,a]]

a+b+c

Here are related posts on Flat and OneIdentity. This post lists all Wolfram Language functions that have any Attribute except Protected.

This is an excellent out-of-print book but there is plenty to learn from it. I'd compare it to David Wagner's Power Programming in Mathematica in its insight to how the Wolfram Language works. 


Bahder, Thomas B. Mathematica for Scientists and Engineers. Reading, MA: Addison-Wesley. 1994.


All Wolfram Language Functions with any Attribute

Attributes modify the behavior of entire classes of functions. Here are posts on Orderless, Flat, and OneIdentity.

Here is the List of the 19 Wolfram Language Attributes in v10. The indefatiguable Trott does something similar in his Mathematica Guidebook for Programming.

allAttributes = {Orderless, Flat, OneIdentity, Listable, Constant, 
  NumericFunction, Protected, Locked, HoldFirst, HoldRest, HoldAll, 
  HoldAllComplete, NHoldFirst, NHoldFirst, NHoldRest, NHoldAll, SequenceHold, 
  Temporary, Stub}; Length@allAttributes

19

About 5000 of the built-in functions are Protected so I'll delete that one since it doesn't tell us much.

allAttributesLessProtected=DeleteCases[allAttributes,Protected]

{Orderless,Flat,OneIdentity,Listable,Constant,NumericFunction,Locked,HoldFirst,HoldRest,HoldAll,HoldAllComplete,NHoldFirst,NHoldFirst,NHoldRest,NHoldAll,SequenceHold,Temporary,Stub}

Collect all System Symbols. There are 5574 in version 10.2.

allSystemSymbols = Names@"System`*"; Length@allSystemSymbols

5574

Define a predicate to tell whether a Symbol has an Attribute or not, and make it Listable to automatically Map over a List argument.

SetAttributes[hasAttributeQ, Listable]; 
hasAttributeQ[symbol_, attribute_] := 
 If[MemberQ[Attributes@symbol, attribute], True, False];

Now construct a Table of functions with any of the Attributes. Use Select to apply the predicate hasAttributeQ to each built-in function, and return it if it has an Attribute. I could not get the column label in TableHeadings to work so I used Labeled to add one to each group. The formatting and centering of the Label didn't translate to this blog format but if you execute the code you'll see the result.

Table[Select[hasAttributeQ[#,attribute]&]@allSystemSymbols//TableForm[#,TableHeadings->{Automatic,None}]&//Labeled[#,"\n"<>ToString@attribute,Top,LabelStyle->Directive[Large,Bold,FontFamily->"Times New Roman"]]&,{attribute,allAttributes}]//Column


Orderless

1 ArithmeticGeometricMean
2 BitAnd
3 BitOr
4 BitXor
5 CoprimeQ
6 DiracComb
7 DiracDelta
8 DiscreteDelta
9 Equivalent
10 GCD
11 HeavisideLambda
12 HeavisidePi
13 HeavisideTheta
14 KroneckerDelta
15 LCM
16 Majority
17 Max
18 Min
19 Multinomial
20 OrderlessPatternSequence
21 Plus
22 Times
23 UnitBox
24 UnitStep
25 UnitTriangle
26 Xnor
27 Xor


Flat

1 And
2 BitAnd
3 BitOr
4 BitXor
5 Composition
6 Dot
7 GCD
8 Intersection
9 Join
10 LCM
11 Max
12 Min
13 NonCommutativeMultiply
14 Or
15 PermutationProduct
16 Plus
17 RegionProduct
18 RightComposition
19 StringExpression
20 StringJoin
21 Times
22 Union
23 Xor


OneIdentity

1 And
2 BitAnd
3 BitOr
4 BitXor
5 Composition
6 Dot
7 GCD
8 Intersection
9 Join
10 LCM
11 Max
12 Min
13 NonCommutativeMultiply
14 Or
15 PermutationProduct
16 Plus
17 Power
18 RegionProduct
19 RightComposition
20 StringExpression
21 StringJoin
22 Times
23 Union
24 Xor


Listable

1 Abs
2 AbsArg
3 AiryAi
4 AiryAiPrime
5 AiryBi
6 AiryBiPrime
7 AlgebraicIntegerQ
8 AlgebraicNumberDenominator
9 AlgebraicNumberNorm
10 AlgebraicNumberTrace
11 AlgebraicUnitQ
12 Apart
13 ArcCos
14 ArcCosh
15 ArcCot
16 ArcCoth
17 ArcCsc
18 ArcCsch
19 ArcSec
20 ArcSech
21 ArcSin
22 ArcSinh
23 ArcTan
24 ArcTanh
25 Arg
26 ArithmeticGeometricMean
27 Attributes
28 BarnesG
29 BellB
30 BernoulliB
31 BesselI
32 BesselJ
33 BesselK
34 BesselY
35 Beta
36 BetaRegularized
37 Binomial
38 BitAnd
39 BitClear
40 BitGet
41 BitLength
42 BitNot
43 BitOr
44 BitSet
45 BitShiftLeft
46 BitShiftRight
47 BitXor
48 Boole
49 BooleanConvert
50 BooleanMinimize
51 Cancel
52 CarmichaelLambda
53 Ceiling
54 Characters
55 ChebyshevT
56 ChebyshevU
57 Coefficient
58 CompositeQ
59 Conjugate
60 ContinuedFraction
61 CoprimeQ
62 Cos
63 Cosh
64 Cot
65 Coth
66 CreateDirectory
67 Csc
68 Csch
69 CubeRoot
70 Cyclotomic
71 Decompose
72 DedekindEta
73 Denominator
74 DiracComb
75 DiracDelta
76 DirectedInfinity
77 Discriminant
78 Divide
79 Divisible
80 Divisors
81 DivisorSigma
82 EllipticE
83 EllipticF
84 EllipticK
85 EllipticPi
86 EllipticTheta
87 EllipticThetaPrime
88 Erf
89 Erfc
90 Erfi
91 EulerE
92 EulerPhi
93 EvenQ
94 Exp
95 ExpIntegralE
96 ExpIntegralEi
97 Exponent
98 ExpToTrig
99 ExtendedGCD
100 Factor
101 Factorial
102 Factorial2
103 FactorialPower
104 FactorInteger
105 FactorSquareFree
106 Fibonacci
107 Fibonorial
108 Floor
109 FractionalPart
110 Gamma
111 GammaRegularized
112 GCD
113 GegenbauerC
114 Gudermannian
115 HankelH1
116 HankelH2
117 HarmonicNumber
118 Haversine
119 HeavisideLambda
120 HeavisidePi
121 HeavisideTheta
122 HermiteH
123 HurwitzLerchPhi
124 HurwitzZeta
125 Hypergeometric0F1
126 Hypergeometric0F1Regularized
127 Hypergeometric1F1
128 Hypergeometric1F1Regularized
129 Hypergeometric2F1
130 Hypergeometric2F1Regularized
131 HypergeometricU
132 Im
133 In
134 InString
135 IntegerDigits
136 IntegerExponent
137 IntegerLength
138 IntegerPart
139 IntegerString
140 IntervalMemberQ
141 InverseGudermannian
142 InverseHaversine
143 IrreduciblePolynomialQ
144 JacobiP
145 JacobiSymbol
146 JacobiZeta
147 KelvinBei
148 KelvinBer
149 KelvinKei
150 KelvinKer
151 LaguerreL
152 LambertW
153 LCM
154 LegendreP
155 LegendreQ
156 LerchPhi
157 Limit
158 Log
159 Log10
160 Log2
161 LogBarnesG
162 LogGamma
163 LogIntegral
164 LogisticSigmoid
165 LucasL
166 MakeExpression
167 MantissaExponent
168 MathieuC
169 MathieuCharacteristicA
170 MathieuCharacteristicB
171 MathieuCharacteristicExponent
172 MathieuCPrime
173 MathieuS
174 MathieuSPrime
175 MessageList
176 MinimalPolynomial
177 Minus
178 Mod
179 MoebiusMu
180 Multinomial
181 Negative
182 NonNegative
183 NonPositive
184 NumberFieldDiscriminant
185 NumberFieldFundamentalUnits
186 NumberFieldIntegralBasis
187 NumberFieldNormRepresentatives
188 NumberFieldRegulator
189 NumberFieldRootsOfUnity
190 NumberFieldSignature
191 Numerator
192 OddQ
193 Out
194 ParabolicCylinderD
195 PartitionsP
196 PartitionsQ
197 Plus
198 Pochhammer
199 PolyGamma
200 PolyLog
201 PolynomialGCD
202 PolynomialLCM
203 Positive
204 PossibleZeroQ
205 Power
206 PowerMod
207 Prime
208 PrimePi
209 PrimeQ
210 PrimitiveRoot
211 ProductLog
212 QBinomial
213 QFactorial
214 QGamma
215 QPochhammer
216 QPolyGamma
217 QuadraticIrrationalQ
218 QuantityVariableCanonicalUnit
219 QuantityVariableDimensions
220 QuantityVariableIdentifier
221 QuantityVariablePhysicalQuantity
222 Quotient
223 QuotientRemainder
224 Range
225 Re
226 RealDigits
227 RealExponent
228 ReIm
229 RemoveScheduledTask
230 Resultant
231 RiemannSiegelTheta
232 RiemannSiegelZ
233 RootApproximant
234 RootOfUnityQ
235 Round
236 Sec
237 Sech
238 Sign
239 Sin
240 Sinc
241 Sinh
242 SphericalBesselJ
243 SphericalBesselY
244 SphericalHankelH1
245 SphericalHankelH2
246 SphericalHarmonicY
247 SpheroidalEigenvalue
248 SpheroidalPS
249 SpheroidalPSPrime
250 SpheroidalQS
251 SpheroidalQSPrime
252 SpheroidalS1
253 SpheroidalS1Prime
254 SpheroidalS2
255 SpheroidalS2Prime
256 Sqrt
257 StirlingS1
258 StirlingS2
259 StopScheduledTask
260 StringByteCount
261 StringLength
262 StringReverse
263 StruveH
264 StruveL
265 Subtract
266 Surd
267 Tan
268 Tanh
269 Times
270 ToExpression
271 Together
272 ToHeldExpression
273 ToLowerCase
274 ToUpperCase
275 TrigFactor
276 TrigToExp
277 UnitBox
278 UnitDimensions
279 Unitize
280 UnitSimplify
281 UnitStep
282 UnitTriangle
283 WhittakerM
284 WhittakerW
285 Zeta


Constant

1 Catalan
2 Degree
3 E
4 EulerGamma
5 Glaisher
6 GoldenAngle
7 GoldenRatio
8 Khinchin
9 MachinePrecision
10 Pi


NumericFunction

1 Abs
2 AiryAi
3 AiryAiPrime
4 AiryBi
5 AiryBiPrime
6 ArcCos
7 ArcCosh
8 ArcCot
9 ArcCoth
10 ArcCsc
11 ArcCsch
12 ArcSec
13 ArcSech
14 ArcSin
15 ArcSinh
16 ArcTan
17 ArcTanh
18 Arg
19 ArithmeticGeometricMean
20 BarnesG
21 BesselI
22 BesselJ
23 BesselK
24 BesselY
25 Beta
26 BetaRegularized
27 Binomial
28 BSplineBasis
29 Ceiling
30 ChebyshevT
31 ChebyshevU
32 Clip
33 Conjugate
34 Cos
35 Cosh
36 Cot
37 Coth
38 Csc
39 Csch
40 CubeRoot
41 DedekindEta
42 DiracComb
43 DiscreteDelta
44 Divide
45 EllipticE
46 EllipticF
47 EllipticK
48 EllipticPi
49 EllipticTheta
50 EllipticThetaPrime
51 Erf
52 Erfc
53 Erfi
54 Exp
55 ExpIntegralE
56 ExpIntegralEi
57 Factorial
58 Factorial2
59 FactorialPower
60 Fibonacci
61 Floor
62 FractionalPart
63 Gamma
64 GammaRegularized
65 GegenbauerC
66 Gudermannian
67 HankelH1
68 HankelH2
69 HarmonicNumber
70 Haversine
71 HeavisideLambda
72 HeavisidePi
73 HermiteH
74 HurwitzLerchPhi
75 HurwitzZeta
76 Hypergeometric0F1
77 Hypergeometric0F1Regularized
78 Hypergeometric1F1
79 Hypergeometric1F1Regularized
80 Hypergeometric2F1
81 Hypergeometric2F1Regularized
82 HypergeometricU
83 Im
84 IntegerPart
85 InverseGudermannian
86 InverseHaversine
87 JacobiP
88 JacobiZeta
89 KelvinBei
90 KelvinBer
91 KelvinKei
92 KelvinKer
93 KroneckerDelta
94 LaguerreL
95 LegendreP
96 LegendreQ
97 LerchPhi
98 Log
99 Log10
100 Log2
101 LogBarnesG
102 LogGamma
103 LogIntegral
104 LogisticSigmoid
105 LucasL
106 MathieuC
107 MathieuCharacteristicA
108 MathieuCharacteristicB
109 MathieuCharacteristicExponent
110 MathieuCPrime
111 MathieuS
112 MathieuSPrime
113 Max
114 Min
115 Minus
116 Mod
117 Multinomial
118 ParabolicCylinderD
119 Plus
120 Pochhammer
121 PolyGamma
122 PolyLog
123 Power
124 QBinomial
125 QFactorial
126 QGamma
127 QHypergeometricPFQ
128 QPochhammer
129 QPolyGamma
130 Quotient
131 QuotientRemainder
132 Re
133 Rescale
134 RiemannSiegelTheta
135 RiemannSiegelZ
136 Round
137 Sec
138 Sech
139 Sign
140 Sin
141 Sinc
142 Sinh
143 SphericalBesselJ
144 SphericalBesselY
145 SphericalHankelH1
146 SphericalHankelH2
147 SphericalHarmonicY
148 SpheroidalEigenvalue
149 SpheroidalPS
150 SpheroidalPSPrime
151 SpheroidalQS
152 SpheroidalQSPrime
153 SpheroidalS1
154 SpheroidalS1Prime
155 SpheroidalS2
156 SpheroidalS2Prime
157 Sqrt
158 StruveH
159 StruveL
160 Subtract
161 Surd
162 Tan
163 Tanh
164 Times
165 UnitBox
166 UnitStep
167 UnitTriangle
168 WhittakerM
169 WhittakerW
170 Zeta


Locked

1 False
2 I
3 List
4 Locked
5 Remove
6 Removed
7 Symbol
8 TooBig
9 True
10 $Aborted
11 $BatchOutput
12 $CommandLine
13 $CreationDate
14 $InitialDirectory
15 $Input
16 $InputStreamMethods
17 $LinkSupported
18 $MachineType
19 $MinorReleaseNumber
20 $Off
21 $OperatingSystem
22 $OutputStreamMethods
23 $PipeSupported
24 $PrintForms
25 $PrintLiteral
26 $ProcessorType
27 $ProductInformation
28 $ReleaseNumber
29 $ScriptCommandLine
30 $System
31 $SystemID
32 $SystemMemory
33 $SystemWordLength
34 $TimeUnit
35 $Version
36 $VersionNumber


HoldFirst

1 AddTo
2 AppendTo
3 AssociateTo
4 AutoRefreshed
5 Catch
6 ClearAttributes
7 CloudEvaluate
8 CloudSave
9 CloudSubmit
10 Context
11 Control
12 CreateScheduledTask
13 Debug
14 Decrement
15 Delayed
16 DialogReturn
17 DisplayWithRef
18 DivideBy
19 Dynamic
20 Inactivate
21 Inactive
22 Increment
23 KeyDropFrom
24 Message
25 MessageName
26 MessagePacket
27 NCache
28 Pattern
29 PreDecrement
30 PreIncrement
31 PrependTo
32 Reap
33 RefBox
34 Refresh
35 RepeatedTiming
36 ResponseForm
37 RuleCondition
38 RunScheduledTask
39 Set
40 SetAttributes
41 Stack
42 SubtractFrom
43 TableViewBox
44 TimesBy
45 Unset
46 UpSet
47 UsingFrontEnd
48 WaitUntil


HoldRest

1 Assuming
2 Button
3 DumpSave
4 DynamicWrapper
5 DynamicWrapperBox
6 FirstCase
7 FirstPosition
8 If
9 MenuItem
10 PatternTest
11 Quantity
12 RuleDelayed
13 Save
14 SelectFirst
15 Switch


HoldAll

1 AbortProtect
2 AbsoluteTiming
3 And
4 Animate
5 Arrow3DBox
6 ArrowBox
7 Attributes
8 BezierCurve3DBox
9 BezierCurveBox
10 Block
11 BlockRandom
12 BSplineCurve3DBox
13 BSplineCurveBox
14 BSplineSurface3DBox
15 CancelButton
16 Check
17 CheckAbort
18 CheckAll
19 ChoiceButtons
20 CircleBox
21 Clear
22 ClearAll
23 Compile
24 CompiledFunction
25 CompoundExpression
26 Condition
27 ConeBox
28 ConicHullRegion3DBox
29 ConicHullRegionBox
30 ConsoleMessage
31 ContinuedFractionK
32 ContinuousTask
33 ContourPlot
34 ContourPlot3D
35 ControlActive
36 ControllerManipulate
37 CuboidBox
38 CylinderBox
39 DefaultButton
40 DefaultValues
41 Defer
42 Definition
43 DensityPlot
44 Dialog
45 DialogInput
46 DiskBox
47 Do
48 DownValues
49 DynamicBox
50 DynamicModule
51 DynamicModuleBox
52 Exists
53 FileName
54 FilledCurveBox
55 FindArgMax
56 FindArgMin
57 FindMaximum
58 FindMaxValue
59 FindMinimum
60 FindMinValue
61 FindRoot
62 For
63 ForAll
64 FormatValues
65 FullDefinition
66 Function
67 GeometricTransformation3DBox
68 GeometricTransformationBox
69 Graphics3DBox
70 GraphicsBox
71 GraphicsComplex3DBox
72 GraphicsComplexBox
73 GraphicsGroup3DBox
74 GraphicsGroupBox
75 GraphPropertyDistribution
76 HexahedronBox
77 Hold
78 HoldForm
79 HoldPattern
80 ImplicitRegion
81 Information
82 Inset3DBox
83 InsetBox
84 Interpretation
85 JoinedCurveBox
86 KnownUnitQ
87 Line3DBox
88 LineBox
89 LineIntegralConvolutionPlot
90 Literal
91 LogLinearPlot
92 LogLogPlot
93 LogPlot
94 Manipulate
95 MatchLocalNameQ
96 MaxMemoryUsed
97 MemoryConstrained
98 Messages
99 Module
100 Monitor
101 Nand
102 NIntegrate
103 Nor
104 NProduct
105 NSum
106 NValues
107 Off
108 On
109 Or
110 OwnValues
111 ParametricPlot
112 ParametricPlot3D
113 ParametricRegion
114 Piecewise
115 Play
116 Plot
117 Plot3D
118 Point3DBox
119 PointBox
120 PolarPlot
121 Polygon3DBox
122 PolygonBox
123 PrismBox
124 Product
125 Protect
126 PyramidBox
127 Quiet
128 Raster3DBox
129 RasterBox
130 RectangleBox
131 RegionPlot
132 RegionPlot3D
133 Remove
134 RevolutionPlot3D
135 SampledSoundFunction
136 ScheduledTask
137 ScheduledTaskObject
138 SetDelayed
139 SphereBox
140 SphericalPlot3D
141 StackBegin
142 StackComplete
143 StackInhibit
144 StreamDensityPlot
145 StreamPlot
146 SubValues
147 Sum
148 SurvivalModel
149 Table
150 TagSet
151 TagSetDelayed
152 TagUnset
153 TetrahedronBox
154 Text3DBox
155 TextBox
156 TimeConstrained
157 Timing
158 Trace
159 TraceDialog
160 TracePrint
161 TraceScan
162 TubeBezierCurveBox
163 TubeBox
164 TubeBSplineCurveBox
165 Unprotect
166 UpSetDelayed
167 UpValues
168 ValueQ
169 VectorDensityPlot
170 VectorPlot
171 VectorPlot3D
172 WhenEvent
173 Which
174 While
175 With
176 $ConditionHold
177 $Failed


HoldAllComplete

1 Assert
2 ColorQ
3 DebugTag
4 DisplayWith
5 DynamicImage
6 EvaluationData
7 GenerateHTTPResponse
8 HoldComplete
9 InterpretationBox
10 Lookup
11 MakeBoxes
12 ParametricFunction
13 Parenthesize
14 PreemptProtect
15 SystemException
16 Unevaluated


NHoldFirst

1 EllipticTheta
2 EllipticThetaPrime
3 FrontEndValueCache
4 MathieuC
5 MathieuCharacteristicA
6 MathieuCharacteristicB
7 MathieuCPrime
8 MathieuS
9 MathieuSPrime
10 QPolyGamma


NHoldFirst

1 EllipticTheta
2 EllipticThetaPrime
3 FrontEndValueCache
4 MathieuC
5 MathieuCharacteristicA
6 MathieuCharacteristicB
7 MathieuCPrime
8 MathieuS
9 MathieuSPrime
10 QPolyGamma


NHoldRest

1 Drop
2 Extract
3 GraphicsComplex
4 HeldPart
5 Indexed
6 Overscript
7 Part
8 Quantity
9 Subscript
10 Subsuperscript
11 Superscript
12 Take
13 TakeDrop
14 Underoverscript
15 Underscript


NHoldAll

1 AlgebraicNumber
2 BarabasiAlbertGraphDistribution
3 BernoulliGraphDistribution
4 C
5 CompiledFunction
6 Cycles
7 DateObject
8 DegreeGraphDistribution
9 Derivative
10 DifferenceRoot
11 DifferentialRoot
12 DivisorSigma
13 DivisorSum
14 Graph
15 Graph3D
16 InverseFunction
17 LibraryFunction
18 OptimumFlowData
19 PathGraph
20 PriceGraphDistribution
21 Root
22 ShortestPathFunction
23 Slot
24 SlotSequence
25 SpatialGraphDistribution
26 SurvivalModel
27 TemporalData
28 TimeObject
29 TreeGraph
30 UniformGraphDistribution
31 WattsStrogatzGraphDistribution


SequenceHold

1 AbsoluteTiming
2 RepeatedTiming
3 Rule
4 RuleDelayed
5 Set
6 SetDelayed
7 TagSet
8 TagSetDelayed
9 Timing
10 UpSet
11 UpSetDelayed


Temporary

1 Null$
2 \[FormalX]$


Stub

{}