Any variable you type is valid, for example x, y, yams and wow can all be used as variables in the input box.

You can use sqrt(-1) to get i.

Infinity is denoted oo (two lowercase o's)

pi will be interpreted as pi=3.1415...

x**2 means x squared, x^2 is invalid syntax.

You need to have times between all terms, otherwise an error will be thrown.
For example, 2x(y) is not valid, while 2*x*y is. Also, 2*xy will consider "xy" as a single variable, so make sure to seperate variables as needed.

(expression).diff(var) is the notation for writing an expression differentiated with respect to variable var. For example:
denotes the derivative of x^2+y*x with respect to x.

Evaluating equations

If you want to plug in values into an expression, simply do
(x + y + z).subs(x, 3)

This will replace all instances of x with a 3. If you do something like
(x+y+z).subs(x, 3).subs(y, 4).subs(z, 10)
then the Evaluated box below output will show a number, because all you have left is an expression with lots of numbers in it.

Solving equations

Type something of the form:
x = x*3 + 2*x**2
then press the solve button, and the solutions will appear in an arraw below Output, as well as in the Formatted box.

For example, if you type x = x*3 + 2*x**2 then press solve, the values of x that satisfy your equation will be in an array below output, and in the Formatted box, where x = [-1, 0] means that -1 or 0 are solutions for x.

You can also solve differential equationsm via entering in something like
dsolve(f(x).diff(x)*x + y)< br /> Then pressing simplify.

Press simplify to evaluate

Find Greatest Common Denominator
gcd(4, 6)

Find Least Common Multiple
lcm(4, 6)

Factor polynomial
factor(x**2 + 2*x + 1)

Expand polynomial

Binomial, aka n choose k
binomial(10, 4)

nth catalan number


Discrete random variables

Uniform Distribution
DiscreteUniform(name, items)
DiscreteUniform('yams', [10, 20, 33])

Die(name, sides)
Die('yams', 7)

Bernoulli Distribution
Bernoulli(name, probOfSuccess, succ=1, fail=0)
Bernoulli("yams", 0.5)
Bernoulli("yams", 0.4, succ=1, fail=-1)

Coin toss
Coin(name, p=1/2)
Coin("yams", p=0.3)

Binomial distribution
Binomial(name, numTrials, probOfSuccess, succ=1, fail=0)
Binomial("yams", 10, 0.4)
Binomial("yams", 20, 0.2, succ=10, fail=1)

Hypergeometric distribution
Hypoergeometric(name, N, m, n)

Finite Random Variable
FiniteRV(name, densityMap)
FiniteRV("yams", {0: .1, 1: .2, 2: .3, 3: .4})


Continuous random variables

Arcsin distribution
Arcsin(name, a=0, b=1)
a is the left interval boundary, and b is the right interval boundary

Benini Distribution
Benini(name, alpha, beta, sigma)

Beta distribution
Beta(name, alpha, beta)

Beta prime distribution
BetaPrime(name, alpha, beta)

Cauchy distribution
Cauchy(name, x0, gamma)

Chi distribution
Chi(name, k)

Non-central Chi distribution
ChiNoncentral(name, degreesOfFreedom, shiftParamater)

Chi-squared distribution
ChiSquared(name, degreesOfFreedom)

Dagum distribution
Dagum(name, p, a, b)

Erlang distribution
Erlang(name, k, lambda)

Exponential distribution
Exponential(name, lambda)

F distribution
FDistribution(name, d1, d2)

Fisher's Z distribution
FisherZ(name, d1, d2)

Frechet distribution
Frechet(name, a, s=1, m=0)

Gamma distribution
Gamma(name, k, theta)

Inverse gamma distribution
GammaInverse(name, a, b)

Kumaraswamy distribution
Kumaraswamy(name, a, b)

Laplace distribution
Laplace(name, mu, b)

Logistic distribution
Logistic(name, mu, s)

Log-normal distribution
LogNormal(name, mean, sigmaj)

Maxwell distribution
Maxwell(name, a)

Nakagami distribution
Nakagami(name, mu, omega)

Normal distribution
Normal(name, mean, std)

Pareto distribution
Pareto(name, xm, alpha)

U-quadratic distribution
QuadraticU(name, a, b)

Raised cosine distribution
RaisedCosine(name, mu, s)

Rayleigh distribution
Rayleigh(name, sigma)

Student's t distribution
StudentT(name, nu)

Triangular distribution
Triangular(name, a, b, c)

Uniform distribution
Uniform(name, left, right)

Irwin-Hall distribution
UniformSum(name, n)

von Mises distribution
VonMises(name, mu, k)

Weibull distribution
Weibull(name, alpha, beta)

Wigner semicircle distribution
WignerSemicircle(name, R)

Continuous random variable
ContinuousRV(name, pdf, interval=(-oo, oo))


Probability that a condition is true
P(Die('X', 6)> 4)

Probability that a condition is true given another condition
P(Die('X', 6) < 3, X>2)

Optionally, one can provide P(..., numsamples=None, evalf=True, evaluate=True).
numsamples enables sampling and approximatex the probability with that many samples.
evalf should be set to true if sampling should return a number and not a complex expression.
evaluate is in case of a condinuous systems returning unevaluated integrals

Hyperbolic functions

Hyperbolic cosine

Hyperbolic sine

Hyperbolic tangent

Hyperbolic secant

Hyperbolic cosecant

Hyperbolic cotangent

Inverse hyperbolic cosine

Inverse hyperbolic sine

Inverse hyperbolic tangent

Inverse hyperbolic secant

Inverse hyperbolic cosecant

Inverse hyperbolic cotangent

Factorials and gamma functions


Double factorial

Gamma function

Reciprocal of the gamma function

Rising factorial or Pochhammer symbol
rf(10, 20)
Falling factorial
ff(6, 2)
Beta function
beta(10, 20)

Generalized incomplete beta function
betainc(3, 4, 0, 6)

Super factorial

Hyper factorial

Bernes G-function

psi(m, z) = Polygamma function of order m of z psi(3, 4)

digamma(z) is shorthand for psi(0, z)

nth harmonic number

yam-maths is an interface to sympy, and much of this is from it's documentation here.