The language of Expressions

An expression is a finite mathematical combination of symbols that is well-formed according to rules that depend on the context.

 

© Copyright 2013-2021 Alelvi software, All rights reserved.

What is the syntax of the Expressions ?

An expression is a finite mathematical combination of symbols that is well-formed according to rules that depend on the context. In ExpressionsinBar, expressions are entered in the text field labelled “Input expression”. The result of the computation is displayed in the view field labelled “Result”.

For example typing the input expression “1+2” yields “3” in the result window.

Input expression field

Result view field

Input field menu

  1. Integers, Fractions, Real numbers:

'1/3+3/4'=1/3+3/4

Input expression:

Result

pi/2

evalf(pi,20)

Fractions:

Irrational numbers:

Integers:

20!

Least common multiple:

lcm(3,13)

Decomposition into prime factors:

ifactor(20!)

Arbitrary precision arithmetic:

Greatest common divisor:

gcd(3,12)

List of the divisors:

divisors(36)

  1. Constants:

Input expression

Result

Irrationals:

pi=evalf(pi)

e=evalf(e)

Infinity:

'i^2'=i^2

+inf

-inf

Prime numbers:

isprime(131)

  1. Functions:

Input expression

Result

(1+2*i)^2

evalf(sqrt(5)^3)

Real numbers:

1+1/2

1.0+1/2

  1. Complex numbers:

Input expression

Result

Notation:

+,-,*,/,ˆ are the usual operators to perform additions, subtractions, multi- plications, divisions and for raising to an integer or a fractional power.

Real and imaginary parts:

re(3+4*i)

im(3+4*i)

Modulus:

abs(3+4*i)

Argument:

arg(3+4*i)

Conjugate:

conj(3+4*i)

Maximum of two numbers:

max(1,3)

Error function:

erf(x)

Gamma function:

Gamma(x)

Minimum of two numbers:

min(1,3)

Absolute value:

abs(-30)

Sign:

sign(-30)

Floor:

floor(3.6)

Ceil:

ceil(3.6)

Fractional part:

frac(3.4123)

Integer part:

trunc(3.4123)

Square function:

sq(3)

Square root:

sqrt(3)

Exponential:

exp(3)

Natural logarithm:

log(3)

Base-10 logarithm:

log10(3)

Base-b logarithm

logb(10,b)

  1. Trigonometric Functions:

Input expression

Result

Sine, cosine, tangent:

sin(pi/3),cos(pi),tan(pi/2)

Cotangent, secant, cosecant:

cot(alpha),sec(beta),csc(beta)

Arcsine, arccosine, arctangent:

asin(1),acos(0),atan(1)

Hyperbolic sine, cosine, tangent:

sinh(x),cosh(x),tanh(x)

Inverse hyperbolic sine, cosine, tangent:

asinh(x),acosh(x),atanh(x)

  1. Algebraic manipulations:

Input expression

Result

Expand (distributivity):

Zeros of function of x:

expand((x+1)*(x-2))

Canonical form:

canonical_form(x^2-6x+3)

Simplify expression:

zeros(x^2-3)

pi+pi/2=simplify(pi+pi/2)

simplify((x-1)*(x+1))

  1. Analysis : Derivatives, Partial derivatives, Integrals

Input expression

Result

First order derivation:

diff(x^2)

'diff(x^2,x)'=diff(x^2)

diff(x*y ^2*z^3+x*y*z,z)

Partial derivative:

Higher order derivative:

diff(x^2,x)

diff(x^2,x,x)

(x^2)',(x^2)''

Integration (indefinite):

integrate(x^2,x)

integrate(x^2,x,a,b)

integrate((2x+1)/(x^2+1),x)

Integration (definite):

Discrete summation:

sum(n,n)

sum(n,n,a,b)

Limits:

limit(1/x,x=0,-1)

limit(1/x,x=0,+1)

limit(sin(x)/x,x)

sum(k,n)

Popup menu

Clear input