Function: integrate (expr, x, a, b)
Attempts to symbolically compute the
integral of expr with respect to x. integrate (expr, x) is an indefinite
integral, while integrate (expr, x, a, b) is a definite
integral, with limits of integration a and b. The limits
should not contain x, although integrate does not enforce
this restriction. a need not be less than b. If b
is equal to a, integrate returns zero.
See quad_qag and related
functions for numerical approximation of definite integrals. See residue for
computation of residues (complex integration). See antid for an alternative
means of computing indefinite integrals.
The integral (an expression free of integrate) is
returned if integrate succeeds. Otherwise the return value is the noun form of the integral
(the quoted operator 'integrate) or an expression containing one or more noun forms. The noun form of integrate is
displayed with an integral sign.
In some circumstances it is useful to
construct a noun form by hand, by quoting integrate with a single
quote, e.g., 'integrate (expr, x). For example,
the integral may depend on some parameters which are not yet computed. The noun
may be applied to its arguments by ev (i, nouns) where i is the noun
form of interest.
integrate handles definite integrals separately from indefinite, and employs a
range of heuristics to handle each case. Special cases of definite integrals
include limits of integration equal to zero or infinity (inf or minf),
trigonometric functions with limits of integration equal to zero and %pi or 2 %pi, rational
functions, integrals related to the definitions of the beta and psi functions, and
some logarithmic and trigonometric integrals. Processing rational functions may
include computation of residues. If an applicable special case is not found, an
attempt will be made to compute the indefinite integral and evaluate it at the
limits of integration. This may include taking a limit as a limit of
integration goes to infinity or negative infinity; see also ldefint.
Special cases of indefinite integrals
include trigonometric functions, exponential and logarithmic functions, and
rational functions. integrate may also make use of a short table of elementary integrals.
integrate may carry out a change of variable if the integrand has the form f(g(x)) * diff(g(x), x). integrate attempts to find a subexpression g(x) such that the
derivative of g(x) divides the integrand. This search may make use of derivatives defined
by the gradef function. See also changevar and antid.
If none of the preceding heuristics
find the indefinite integral, the Risch algorithm is executed. The flag risch may be set
as an evflag, in a call to ev or on the command line, e.g., ev (integrate (expr, x), risch) or integrate (expr, x), risch. If risch is present, integrate calls
the risch function without attempting heuristics first. See also risch.
integrate works only with functional relations represented explicitly with the f(x) notation. integrate does not
respect implicit dependencies established by the depends function.
integrate may need to know some property of a parameter in the integrand. integrate will
first consult the assume database, and, if the variable of interest is not there, integrate will ask
the user. Depending on the question, suitable responses are yes; or no;, or pos;, zero;, or neg;.
integrate is not, by default, declared to be linear. See declare and linear.
integrate attempts integration by parts only in a few special cases.
Examples:
· Elementary indefinite and definite integrals.
|
|
(%i1) integrate (sin(x)^3, x); 3 cos (x)(%o1) ------- - cos(x) 3(%i2) integrate (x/ sqrt (b^2 - x^2), x); 2 2(%o2) - sqrt(b - x )(%i3) integrate (cos(x)^2 * exp(x), x, 0, %pi); %pi 3 %e 3(%o3) ------- - - 5 5(%i4) integrate (x^2 * exp(-x^2), x, minf, inf); sqrt(%pi)(%o4) --------- 2 |
·
Use of assume and interactive query.
|
|
(%i1) assume (a > 1)$(%i2) integrate (x**a/(x+1)**(5/2), x, 0, inf); 2 a + 2Is ------- an integer? 5 no;Is 2 a - 3 positive, negative, or zero? neg; 3(%o2) beta(a + 1, - - a) 2 |