Integrating expressions

To integrate an expression switch MathMate to integration mode by clicking the mode icon until you see the integration sign or choosing Integration in the Mode toolbar. The mode icon is situated to the left of the expression field. Below and above the integration sign there are entry fields for integration limits.

In the integration mode you may calculate (one-dimensional) integrals of expressions with respect to a given integration variable. Other variables of the expression are considered parameters. The choice of the integration variable and initialization of parameters are performed prior to computations.

To integrate an expression:

  1. Switch the integration mode on.
  2. Enter an expression, e.g. exp(x)
  3. Enter the integration limits
  4. If the expression contains several identifiers point out which one is to be taken as the integration variable and input the values of the other parameters
  5. Click Start or press Enter
If MathMate detects only one parameter in the expression which has not been assigned a value and no parameter is marked variable, this parameter is taken as integration variable. If all of the variables are assigned some values, the integrand is considered constant and the result will be just the product of this constant and the length of the integration interval. You may integrate the same expression again after having modified integration variable name, integration limits or parameter values.

The desired and actual computation accuracy

Numerical integral computation is certainly not an exact procedure and the result may be obtained with more or less accuracy. The desired relative error of integration is defined by the Precision option. However the actual error of the result may be sometimes different from the given one.

When MathMate displays the result of the integration it also shows the estimated absolute computation errror in the Result window.

Sometimes the MathMate integration algorithm is unable to reach the given accuracy. It can happen if the function contains fast oscillations or a singularity near some point A. In these cases MathMate interrupts calculation and displays the message

Precision not reached, may be singularity near A

When you see such a message first try to analyze if there is a non-integrable singularity point in the neighbourhood or try to decrease the accuracy using significant digits option (increasing significant digits is NEVER recommended in case you get the message about a singularity point)

See also