next up previous contents
Next: Integration by part Up: Derivation and integration. Previous: Derivation

   
Integration

The main integration command are RISCH and EXPA. The RISCH program accepts functions as input and (tries to) return the primitive. EXPA should be called for symbolic expressions which contains the $\int $ symbol. The last computed antiderivative is stored in the variable PRIMIT. The variable ERABLEMSG contains additionnal information if RISCH returns an unevaluated antiderivative (with a $\int $ sign).

Some examples for RISCH:

The RISCH program must sometimes be used in conjunction with the TSIMP function to get ``weak normalization''. If you get No closed form in ERABLMSG, try TSIMP and RISCH again, if you get again the message No closed form, this does not mean that RISCH failed, but that your input does not admit an antiderivative which may be expressed in terms of elementary functions.

Remark 3  

For integrals with bounds, the right instruction is EXPA.
Example of EXPA usage (in real and symbolic mode):

\begin{displaymath}\int _1^2 \frac{1}{x^3+1} \mbox{ \tt EXPA }
\frac{\ln(3)-2\ln(2)}{6} +\frac{\pi }{18}\sqrt{3} \end{displaymath}

If you have still computed the antiderivative e.g. with RISCH, you can evaluate it between two bounds using PREVAL. Arguments of PREVAL are a function f(x) at level 3, lower and upper bounds a and b at level 2 and 1. It returns f(b)-f(a) (x is the variable contained in VX).

Remark 4   Warning: EXPA does not detect discontinuities of the antiderivative. It blindly computes the value at both end of the integration interval (by a call to LIMIT, hence infinite bounds are allowed) and returns the difference. For example, $\int _0^{2\pi }\frac{1}{\sin(x)+2} $ returns 0. You should always check the answer numerically and if the answers are not the same, you have to study the antiderivative for discontinuities.


next up previous contents
Next: Integration by part Up: Derivation and integration. Previous: Derivation
Bernard Parisse
1998-07-31