6.20.2 Primitive and definite integral: risch
The Risch algorithm is a powerful algorithm for finding an elementary
primitive of an elementary function or concluding that one doesn’t
exist. The risch command finds primitives and can use them to
evaluate definite integrals.
To find a primitive:
-
risch takes one mandatory argument and one optional
argument:
-
expr, an expression.
- Optionally x, the name of a variable
(by default the variable is x).
- risch(expr ⟨ ,x ⟩) returns a
primitive of expr with respect to x.
Examples.
-
Input:
risch(x^2)
Output:
- Input:
risch(t^2,t)
Output:
- Input:
risch(exp(-x^2))
Output:
meaning that exp(−x2) has no primitive expressed
with the usual functions.
To evaluate a definite integral:
-
risch takes four arguments:
-
expr, an expression expr.
- x, the variable.
- a and b, the bounds of the definite integral.
- int(expr,x,a,b) returns
the exact value of the definite integral if the computation was
successful or an unevaluated integral otherwise.
Example.
Input:
risch(x^2,x,0,1)
Output: