Arithmetic and Numbers

Basic operations.

({{\[SelectionPlaceholder] + \[Placeholder], \[SelectionPlaceholder] - \[Placeholder], \[SelectionPlaceholder]×\[Placeholder], (\[SelectionPlaceholder]/\[Placeholder])}, {-\[SelectionPlaceholder], (\[SelectionPlaceholder]^\[Placeholder]), (Sqrt[\[SelectionPlaceholder]]), (\[SelectionPlaceholder]^(1/\[Placeholder]))}})

Numericalize to machine precision or to specified arbitrary precision.

({{N[\[SelectionPlaceholder]], N[\[SelectionPlaceholder], \[Placeholder]]}})

Algebra

Solving Equations

Enter an equation of the form lhs==rhs, or solve an equation or system of equations.

({{\[SelectionPlaceholder] == \[Placeholder]}, {Solve[\[SelectionPlaceholder] == \[Placeholder], \[Placeholder]]}, {\(Solve[{\[SelectionPlaceholder] == \[Placeholder], \[Placeholder] == \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ {\[Placeholder], \[Placeholder]}]\)}, {NSolve[\[SelectionPlaceholder] == \[Placeholder], \[Placeholder]]}})

Polynomial Manipulation

({{Expand[\[SelectionPlaceholder]]}, {Factor[\[SelectionPlaceholder]]}, {Together[\[SelectionPlaceholder]]}, {Apart[\[SelectionPlaceholder]]}, {Cancel[\[SelectionPlaceholder]]}})

Simplification

Simplify tries various manipulations to make expressions smaller. FullSimplify tries more manipulations, but takes longer.

({{Simplify[\[SelectionPlaceholder]]}, {Simplify[\[SelectionPlaceholder], \[Placeholder]]}, {FullSimplify[\[SelectionPlaceholder]]}, {FullSimplify[\[SelectionPlaceholder], \[Placeholder]]}, {FunctionExpand[\[SelectionPlaceholder]]}, {FunctionExpand[\[SelectionPlaceholder], \[Placeholder]]}})

The two-argument forms of the simplification functions take assumptions in the second argument, which can be formed from the items in the following palette.

({{({{\[SelectionPlaceholder] > \[Placeholder], \[SelectionPlaceholder] < \[Placeholder]}, {\[SelectionPlaceholder] ≥ \[Placeholder], \[SelectionPlaceholder] ≤ \[Placeholder]}, {\[SelectionPlaceholder] == \[Placeholder], \[SelectionPlaceholder] ∧ \[Placeholder]}})}, {\[SelectionPlaceholder] ∈ Complexes}, {\[SelectionPlaceholder] ∈ Reals}, {\[SelectionPlaceholder] ∈ Algebraics}, {\[SelectionPlaceholder] ∈ Rationals}, {\[SelectionPlaceholder] ∈ Integers}, {\[SelectionPlaceholder] ∈ Primes}, {\[SelectionPlaceholder] ∈ Booleans}})

Complex Numbers

({{\[SelectionPlaceholder] + \[Placeholder]  I}, {({{Re[\[SelectionPlaceholder]], Im[\[SelectionPlaceholder]]}, {Abs[\[SelectionPlaceholder]], Arg[\[SelectionPlaceholder]]}})}, {Conjugate[\[SelectionPlaceholder]]}})

PowerExpand assumes that variables are positive real with integer exponents, while ComplexExpand assumes all variables are real.

({{PowerExpand[\[SelectionPlaceholder]]}, {ComplexExpand[\[SelectionPlaceholder]]}})

Lists and Matrices

Creating Lists and Matrices

When entering a vector or a matrix, add rows by typing Ctrl[↵] and add columns by typing Ctrl[,].

({{(({{\[Placeholder]}, {\[Placeholder]}})), (({{\[Placeholder], \[Placeholder]}})), , (({{\[Placeholder], \[Placeholder]}, {\[Placeholder], \[Placeholder]}}))}})

One way to create lists and matrices automatically is to iterate a variable over a range of values with Table, using the iterator {var, min, max} or {var, min, max, increment}. When given a list, many math functions operate on each element of the list.

({{Table[\[SelectionPlaceholder], {\[Placeholder], \[Placeholder], \[Placeholder]}]}, {Table[\[SelectionPlaceholder], {\[Placeholder], \[Placeholder], \[Placeholder], \[Placeholder]}]}, {\(Table[\[SelectionPlaceholder], {\[Placeholder], \[Placeholder], \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}})

Matrix Operations

({{\[SelectionPlaceholder] . \[Placeholder]}, {Cross[\[SelectionPlaceholder], \[Placeholder]]}, {Outer[\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]}, {ListConvolve[\[SelectionPlaceholder], \[Placeholder]]}, {ListCorrelate[\[SelectionPlaceholder], \[Placeholder]]}, {Tr[\[SelectionPlaceholder]]}, {Det[\[SelectionPlaceholder]]}, {Inverse[\[SelectionPlaceholder]]}, {Transpose[\[SelectionPlaceholder]]}, {Eigenvalues[\[SelectionPlaceholder]]}, {Eigenvectors[\[SelectionPlaceholder]]}, {LinearSolve[\[SelectionPlaceholder], \[Placeholder]]}, {RowReduce[\[SelectionPlaceholder]]}})

A common variation of the convolution and correlation operations is to “pad” the data set with zeros. For vectors, the following forms can be used.

({{ListConvolve[\[SelectionPlaceholder], \[Placeholder], 
    {1, -1}, 0]}, {ListCorrelate[\[SelectionPlaceholder], \[Placeholder],  
     {1, -1}, 0]}})

Trigonometric and Exponential Functions

Trigonometric

({{Sin[\[SelectionPlaceholder]], ArcSin[\[SelectionPlaceholder]]}, {Cos[\[SelectionPlaceholder]], ArcCos[\[SelectionPlaceholder]]}, {Tan[\[SelectionPlaceholder]], ArcTan[\[SelectionPlaceholder]]}})

Manipulation of trigonometric expressions to alternate forms.

({{TrigExpand[\[SelectionPlaceholder]]}, {TrigFactor[\[SelectionPlaceholder]]}, {TrigReduce[\[SelectionPlaceholder]]}, {ExpToTrig[\[SelectionPlaceholder]]}, {TrigToExp[\[SelectionPlaceholder]]}})

Exponential and Logarithmic

Log[10, x] is the base 10 logarithm.

({{Log[\[SelectionPlaceholder]], Log[10,  \[SelectionPlaceholder]], Exp[\[SelectionPlaceholder]]}})

Hyperbolic

({{Sinh[\[SelectionPlaceholder]], ArcSinh[\[SelectionPlaceholder]]}, {Cosh[\[SelectionPlaceholder]], ArcCosh[\[SelectionPlaceholder]]}, {Tanh[\[SelectionPlaceholder]], ArcTanh[\[SelectionPlaceholder]]}})

Calculus

Common Operations

(∂_x) f[x] is the derivative of f[x] with respect to x, while (∂_(x, y))f[x, y] is the derivative with respect to x and y.

({{∫\[SelectionPlaceholder] \[DifferentialD]\[Placeholder], (∂_\[Placeholder]) \[SelectionPlaceholder]}, {(∫_\[Placeholder]^\[Placeholder])\[SelectionPlaceholder] \[DifferentialD]\[Placeholder], (∂_(\[Placeholder], \[Placeholder]))\[SelectionPlaceholder]}, {(∑_(\[Placeholder] = \[Placeholder])^\[Placeholder]) \[SelectionPlaceholder], (∏_(\[Placeholder] = \[Placeholder])^\[Placeholder]) \[SelectionPlaceholder]}})

Series expansions are expressed in terms of a variable at a point for a given number of terms in the form {var, point, terms}.

({{Limit[\[SelectionPlaceholder], \[Placeholder] -> \[Placeholder]]}, {Series[\[SelectionPlaceholder], {\[Placeholder],  \[Placeholder],  \[Placeholder]}]}})

Differential Equations

Solve a differential equation, specifying the equation, the function to be found, and the variable. You may give initial conditions in the form of equations.

({{DSolve[\[SelectionPlaceholder]  ==  \[Placeholder],  \[Placeholder],  \[Placeholder]]}, {\(DSolve[{\[SelectionPlaceholder]\  == \ \[Placeholder], \ \[Placeholder]\  == \ \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[Placeholder], \ \[Placeholder]]\)}, {\(DSolve[{\[SelectionPlaceholder]\  == \ \[Placeholder], \ \[Placeholder]\  == \ \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\[Placeholder], \ \[Placeholder]}, \ \[Placeholder]]\)}})

A numeric method can be used where a range is specified for the variable in the form {var, min, max}.

\(NDSolve[{\[SelectionPlaceholder]\  == \ \[Placeholder], \ \[Placeholder]\  == \ \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[Placeholder], \ {\[Placeholder], \ \[Placeholder], \ \[Placeholder]}]\)

Symbolic Transforms

({{ZTransform[\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]}, {InverseZTransform[\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]}, {LaplaceTransform[\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]}, {\(InverseLaplaceTransform[
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 	\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]\)}, {FourierTransform[\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]}, {\(InverseFourierTransform[
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 	\[SelectionPlaceholder], \[Placeholder], \[Placeholder]]\)}})

The following functions are found frequently in transforms.

({{DiracDelta[\[SelectionPlaceholder]]}, {DiscreteDelta[\[SelectionPlaceholder]]}, {UnitStep[\[SelectionPlaceholder]]}})

Numeric Root Finding

If you can't solve an equation exactly, you may be able to find particular numeric solutions using methods that require one or two starting points for finding the solution. You may also solve systems of equations this way.

({{FindRoot[\[SelectionPlaceholder] == \[Placeholder],  {\[Placeholder],  \[Placeholder]}]}, {\(FindRoot[\[SelectionPlaceholder] == \[Placeholder], 
	\ \ \ \ \ \ \ \ \ {\[Placeholder], \ {\[Placeholder], \ \[Placeholder]}}]\)}, {\(FindRoot[{\[SelectionPlaceholder] == \[Placeholder], \ \[Placeholder] == \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {\[Placeholder], \ \[Placeholder]}, \ {\[Placeholder], \ \[Placeholder]}]\)}})

Other Functions

Mathematica contains a large number of functions, of which only a small fraction can be found in this palette. The following two sections contain a few of the additional math functions.

Integer Functions

({{Floor[\[SelectionPlaceholder]]}, {Ceiling[\[SelectionPlaceholder]]}, {Round[\[SelectionPlaceholder]]}, {Chop[\[SelectionPlaceholder]]}, {Mod[\[SelectionPlaceholder], \[Placeholder]]}, {Quotient[\[SelectionPlaceholder], \[Placeholder]]}, {GCD[\[SelectionPlaceholder], \[Placeholder]]}, {LCM[\[SelectionPlaceholder], \[Placeholder]]}, {FactorInteger[\[SelectionPlaceholder]]}, {Rationalize[\[SelectionPlaceholder]]}, {BitAnd[\[SelectionPlaceholder], \[Placeholder]]}, {BitOr[\[SelectionPlaceholder], \[Placeholder]]}, {BitXor[\[SelectionPlaceholder], \[Placeholder]]}})

Special Functions

({{\[SelectionPlaceholder]!}, {BesselI[\[Placeholder], \[SelectionPlaceholder]]}, {BesselJ[\[Placeholder], \[SelectionPlaceholder]]}, {BesselK[\[Placeholder], \[SelectionPlaceholder]]}, {BesselY[\[Placeholder], \[SelectionPlaceholder]]}, {Erf[\[SelectionPlaceholder]]}, {Gamma[\[SelectionPlaceholder]]}, {Zeta[\[SelectionPlaceholder]]}})

Graphics

Many plotting functions take a function or list of functions as the first argument, and variable ranges in the form of {var, min, max} as additional arguments.

({{Plot[\[SelectionPlaceholder], {\[Placeholder], \[Placeholder], \[Placeholder]}]}, {Plot[{\[SelectionPlaceholder], \[Placeholder]}, {\[Placeholder], \[Placeholder], \[Placeholder]}]}, {\(ParametricPlot[{\[SelectionPlaceholder], \[Placeholder]}, 
	\ \ \ \ \ \ \ \ \ \ \ \ \ {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}, {\(Plot3D[\[SelectionPlaceholder], 
	\ \ {\[Placeholder], \[Placeholder], \[Placeholder]}, {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}, {\(ParametricPlot3D[
	\ \ \ \ \ \ \ {\[SelectionPlaceholder], \[Placeholder], \[Placeholder]}, 
\ \ \ \ \ \ \ 	{\[Placeholder], \[Placeholder], \[Placeholder]}]\)}, {\(ParametricPlot3D[
	\ \ \ \ {\[SelectionPlaceholder], \[Placeholder], \[Placeholder]}, 
	\ \ \ \ {\[Placeholder], \[Placeholder], \[Placeholder]}, {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}, {\(ContourPlot[\[SelectionPlaceholder], 
	\ \ \ {\[Placeholder], \[Placeholder], \[Placeholder]}, {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}, {\(DensityPlot[\[SelectionPlaceholder], 
	\ \ \ {\[Placeholder], \[Placeholder], \[Placeholder]}, {\[Placeholder], \[Placeholder], \[Placeholder]}]\)}})

To plot data, or lists of numbers, use ListPlot. It takes a list of y values, or {x,y} pairs. The points can be made into a line . ListPlot3D only accepts an array of z values.

({{ListPlot[\[SelectionPlaceholder]]}, {\(ListPlot[\[SelectionPlaceholder], 
	
              PlotJoined -> True]\)}, {ListPlot3D[\[SelectionPlaceholder]]}})