Java Math Engine: Integration
Symbolic integration can be performed on objects known to the system such as
built-in functions, previously defined functions, variable and operations. The
symbolic integration engine is not as powerful as the differentiation engine,
simply because integration is not as easy. We will list below the kind of functions
which can be integrated.
The operator which performs symbolic integration is int. There
are three ways to use it:
- int(expr)
- int(expr, var)
- int(expr, var, val1, val2)
In the above explanation, expr denotes a valid mathematical
expression, var denotes the variable of differentiation, val1
denoted the lower limit of integration and val2 denotes the upper
limit of integration.
The meaning of each form of the int operator is given below:
- The first form finds the indefinite integral of expr with
respect to the variable x. The answer will be a function
of x. In the Java Math Pad, it can be assigned to a function.
- The second form finds the indefinite integral of expr with
respect to var. The answer will be a function of var.
In the Java Math Pad, it can be assigned to a function.
- The third form finds the definite integral of expr with respect
to var between val1 and val2.
Here are some examples:
- int(sin(x)) finds an anti derivative of sin(x).
- int(cos(t),t) finds an anti derivative of cos(t)
with respect to t.
- int(sin(x),x,-pi/2,pi/2) finds the definite integral of sin(x)
with respect to x, between -pi/2
and pi/2.
The following functions can be integrated:
- Linear functions.
- sin(expr), arcsin(expr), cos(expr),
arccos(expr), tan(expr), arctan(expr),
cot(expr), sec(expr), csc(expr),
exp(expr), ln(expr), log(expr),
log2(expr) and sqrt(expr) where expr
is a linear function.
- Addition, subtraction and multiplication by a constant of functions from
1) and 2).