Up | Next | Tail |
\( \newcommand {\MeijerGparams }[2]{\genfrac {}{}{0pt}{}{#1}{#2}} \)This section describes part of REDUCE’s definite integration package that is able to calculate the definite integrals of many functions, including several special functions. There are other parts of this package, such as Stan Kameny’s code for contour integration, that are not included here. The integration process described here is not the more normal approach of initially calculating the indefinite integral, but is instead the rather unusual idea of representing each function as a Meijer G-function (a formal definition of the Meijer G-function can be found in [PBM89]), and then calculating the integral by using the following Meijer G integration formula.
The resulting Meijer G-function is then retransformed, either directly or via a hypergeometric function simplification, to give the answer. A more detailed account of this theory can be found in [AM90].
As an example, if one wishes to calculate the following integral
then initially the correct Meijer G-functions are found, via a pattern matching process, and are substituted into eq. \ref {defint:eq1} to give
The cases for validity of the integral are then checked. If these are found to be satisfactory then the formula is calculated and we obtain the following Meijer G-function
This is reduced to the following hypergeometric function
which is then calculated to give the correct answer of
The above formula (\ref {defint:eq1}) is also true for the integration of a single Meijer G-function by replacing the second Meijer G-function with a trivial Meijer G-function.
A list of numerous particular Meijer G-functions is available in [PBM89].
Although the description so far has been limited to the computation of definite integrals between 0 and infinity, it can also be extended to calculate integrals between 0 and some specific upper bound, and by further extension, integrals between any two bounds. One approach is to use the Heaviside function, i.e.
Another approach, again not involving the normal indefinite integration process, again uses Meijer G-functions, this time by means of the following formula
For a more detailed look at the theory behind this see [AM90].
For example, if one wishes to calculate the following integral
then initially the correct Meijer G-function is found, by a pattern matching process, and is substituted into eq. \ref {defint:eq2} to give
which then in turn gives
and returns the result
int(e^(-x),x,0,infinity); 1
int(x*sin(1/x),x,0,infinity); 1 int(x*sin(---),x,0,infinity) x
int(x^2*cos(x)*e^(-2*x),x,0,infinity); 4 ----- 125
int(x*e^(-1/2x)*Heaviside(1-x),x,0,infinity); 2*(2*sqrt(e) - 3) ------------------- sqrt(e)
int(x*log(1+x),x,0,1); 1 --- 4
int(cos(2x),x,y,2y); sin(4*y) - sin(2*y) --------------------- 2
A useful application of the definite integration package is in the calculation of various integral transforms. The transforms available are as follows:
Laplace transform
Hankel transform
Y-transform
K-transform
StruveH transform
Fourier sine transform
Fourier cosine transform
The Laplace transform
can be calculated by using the laplace_transform operator.
This requires as parameters
the function to be integrated
the integration variable.
For example
is entered as
laplace_transform(e^(-a*x),x);
and returns the result
The Hankel transform
can be calculated by using the hankel_transform operator, e.g.,
hankel_transform(f(x),x);
This is used in the same way as the laplace_transform operator.
The Y-transform
can be calculated by using the Y_transform operator, e.g.,
Y_transform(f(x),x);
This is used in the same way as the laplace_transform operator.
The K-transform
can be calculated by using the K_transform operator, e.g.,
K_transform(f(x),x);
This is used in the same way as the laplace_transform operator.
The StruveH transform
can be calculated by using the struveh_transform operator, e.g.,
struveh_transform(f(x),x);
This is used in the same way as the laplace_transform operator.
The Fourier sine transform
can be calculated by using the fourier_sin operator, e.g.,
fourier_sin(f(x),x);
This is used in the same way as the laplace_transform operator.
The Fourier cosine transform
can be calculated by using the fourier_cos operator, e.g.,
fourier_cos(f(x),x);
This is used in the same way as the laplace_transform operator.
The required conditions for the validity of the transform integrals can be viewed using the following command:
print_conditions().
For example after calculating the following laplace transform
laplace_transform(x^k,x);
using the print_conditions operator would produce
1 repart(sum(ai) - sum(bj)) + ---*(q + 1 - p) 2 >(q - p)*repart(s) and ( - min(repart(bj))<repart(s))<1 - max(repart(ai)) or arg(eta)=pi*delta or ( - min(repart(bj))<repart(s))<1 - max(repart(ai)) or arg(eta)<pi*delta
where
The relevant Meijer G representation for any function is found by a pattern-matching process which is carried out on a list of Meijer G-function definitions. This list, although extensive, can never hope to be complete and therefore the user may wish to add more definitions. Definitions can be added by adding the following lines:
defint_choose(f(~x),~var => f1(n,x); symbolic putv(mellin!-transforms!*,n,’ (() (m n p q) (ai) (bj) (C) (var)));
where \(f(x)\) is the new function, \(i = 1,\ldots , p\), \(j=1,\ldots ,q\), \(C\) a constant, var = variable, n = an indexing number, where all expression must be in internal prefix form.
For example when considering \(\cos (x)\) we have the Meijer G representation –
defint_choose(cos(~x),~var) => f1(3,x);
where 3 is the indexing number corresponding to the 3 in the following formula
symbolic putv(mellin!-transforms!*,3,’ (() (1 0 0 2) () (nil (quotient 1 2)) (sqrt pi) (quotient (expt x 2) 4)));
or the more interesting example of the Bessel function \(J_{n}(x)\):
Meijer G representation –
Internal definite integration package representation –
defint_choose(besselj(~n,~x),~var) => f1(50,x,n); symbolic putv(mellin!-transforms!*,50,’ ((n) (1 0 0 2) () ((quotient n 2) (minus (quotient n 2))) 1 (quotient (expt x 2) 4)));
Kerry Gaskell would like to thank Victor Adamchik whose implementation of the definite integration package for REDUCE is vital to this interface.
Up | Next | Front |