Toward Symbolic Integration of Elliptic Integrals
B. C. CARLSON
Ames Laboratory and Department of Mathematics,
Iowa State University, Ames, Iowa 50011-3020
Abstract
A method is proposed by which elliptic integrals can be integrated symbolically
without the kind of information about limits of integration and branch points
of the integrand that is required in integral tables using Legendre's
integrals. However, it is assumed that when all polynomials in the integrand
have been factored symbolically into linear factors, the exponents of all
distinct linear factors are known. The recurrence relations are one-parameter
relations, all formulas are given explicitly, and the integral is
eventually expressed in terms of canonical
-functions, with no increase in
their number if neither limit of integration is a branch point of the
integrand. It is the use of
-functions rather than Legendre's integrals
that makes it possible to carry out the whole process symbolically.
If (possibly complex) numerical values of the symbols are known, there are
published algorithms for numerical computation of the
-functions.
1 Introduction
Elliptic integrals are usually defined to be integrals of the form
where
is a polynomial of degree three or four in
with simple
zeros and where
is a rational function of
and
containing at
least one odd power of
. In 1954 P. F. Byrd and M. D. Friedman published
the first edition of
an extensive table of elliptic integrals [
Byrd and Friedman1971] that became an
important source. An attempt to generate in a computer-algebra system a
substantial part of this table, as well as extend it further, faces
several complications, including the following.
(1) The integrals were first converted, by various substitutions that differ
from one integrand to another, to integrals of Jacobian elliptic
functions, which were then expressed separately in terms of Legendre's
canonical forms. Two Russian tables [
Gradshteyn and Ryzhik1994,
Prudnikov et al. 1986] later omitted the
intermediate integrals of Jacobian elliptic functions and did not specify
methods of integration.
(2) Each interval of integration began or ended at a branch point of the
integrand. An integral with neither limit of integration at a branch point
would have to be split into two parts, doubling the number of canonical forms,
and even this remedy was not always available because of divergence at both
neighboring branch points.
(3) The ordering of the free limit of integration and the branch points on
the real line had to be specified.
In conjunction with (2) this often required listing 8, 18, 36, or even 72 cases
of what was essentially the same integral.
The formulas for these numerous cases often had little resemblance to one
another, differing by an integral of the first kind or an algebraic function or
both, and gave no hint of how they might be unified. The problem is most
easily seen in the arrangement chosen by .
investigated four possible approaches to symbolic
integration of elliptic integrals and found serious difficulties in each case.
Besides the method of Byrd and Friedman they considered direct conversion to
the canonical forms of Legendre and of Weierstrass. In the fourth method,
elaborated earlier by , an elliptic integral was represented as a
multivariate hypergeometric
-function before being reduced to canonical
forms by recurrence relations. Although the
-functions offered certain
advantages, a major difficulty lay in multiparameter recurrence relations.
settled on a first stage of reduction by a classical method
using one-parameter recurrence relations, to be followed by a second stage of
expression in terms of
-functions or alternatively Legendre's integrals.
Implementation was not free of troubles.
In a paper not yet published, choose Legendre's canonical forms but
make improvements on the classical method. They use Hermite reduction
[
Moses1971][
Geddes et al. 1992] to
arrive at integrands without multiple poles, and the terms with simple poles
are decomposed by an implicit full partial-fraction expansion due to
. To reduce to Legendre's canonical forms they finally choose
one of 21 transformations according to the zeros of
and the limits of
integration.
In the present paper we separate two stages of reduction, as did
. In the first stage we start from an integrand symbolically
factored into possibly complex linear factors, permitting explicit formulas
for reduction by one-parameter recurrence relations to a set of basic
integrals somewhat different from the classical ones.
All coefficients can remain symbolic
throughout this reduction, which is relatively simple for integrands that
occur frequently in practice. For integrands containing polynomials of high
degree, like some of the examples chosen by Labahn and Mutrie, the iteration of
recurrence relations could become onerous, and it might be better to begin, as
they do, with a preliminary Hermite reduction before applying the present
method to the resulting individual terms.
In the second stage the basic integrals are expressed in terms of canonical
-functions, using reduction theorems unknown at the time of Ng and
Polajnar's work. These make it possible to avoid the complications in (2)
above and unify the numerous cases mentioned in (3) (e.g. see [
Carlson1988]) while
still retaining symbolic coefficients, some of which may be complex. Although
the 21 transformations used by are avoided, and although
there are efficient algorithms [
Carlson1995] for computing numerically the
canonical
-functions of complex variables, the possible presence of
complex numbers will seem a disadvantage
to those who use a computer language without complex arithmetic and to those
who demand that a real integrand have an integral that contains no complex
numbers. The complex numbers can be eliminated by a Landen transformation
(e.g. see [
Carlson1991]), but only at the cost of more complicated formulas.
On the other hand an integrand containing only linear factors with symbolic
coefficients can be integrated in terms of canonical
-functions with no assumptions about the numerical values of the
symbols; for this purpose Legendre's canonical forms are unsuitable.
A simple rationalization procedure, found in every introduction to the subject,
allows us to separate from (
1.1) the integral of a rational function and
assume that
, where
is a rational function of t. (Moreover, if
is an even
function of t, it is advantageous but not essential to separate the odd part
of
, which leads to an elementary integral, and replace
by
in the remaining elliptic integral.) Instead of (
1.1)
we henceforth consider
|
|
|
where
and
are polynomials,
=3 or 4, and the
's are
integers. We assume that the integral is well defined
(in particular that the open interval of integration contains no finite branch
point of the integrand) and that no two of the
linear factors on
the right side are proportional. Although the
's and
's, some of
which may be complex, can be left as symbols throughout the
integration procedure described in this paper, the integer values of the
's are needed at the beginning. In many cases, including most of those
in present integral tables, the integrand contains contains only linear and
quadratic factors, making the
's obvious. If unfactored polynomials of
higher degree are present, we must not only ensure that
and
have
no common divisor (except a constant) but also determine whether they have
divisors in common with
. If so, and if all coefficients are given
numerically, the
's can be determined by making square-free factorizations
(, § 8.2) of
and
and finding the greatest common
divisor of each square-free factor and
, which is square-free by
assumption.
2 Partial-fraction decomposition
We begin by decomposing into partial fractions the rational function
in the integrand of (
1.2), performing this task analytically
once and for all rather than requiring the computer to do it in each individual
case.
Lemma 1
If
is an integer and
for
, then
|
|
|
|
|
|
where the sum defining
extends over all nonnegative integers
such that
. If
for
then
is by definition the
elementary symmetric function
of degree
in
.
Using the power-series expansion of a logarithm, we see that
|
|
|
To obtain the coefficient
of
in
|
|
|
we omit factors in the infinite product with
, multiply the exponential
series for
, and pick out the coefficient
of
.
Definition 1
Define
|
|
|
|
|
|
|
|
|
where upper (lower) signs go together and the last sum extends over all
nonnegative integers
such that
. In particular we have
|
|
We note that
if
because of the assumption that
no two linear factors on the right side of (
1.2) are proportional.
Theorem 1
The decomposition of
into partial fractions is
|
|
The polynomial part is independent of the choice of
, and
each sum over
is empty if the upper limit is less than the lower limit.
The definition (
2.5) of
implies
|
|
|
whence
|
|
|
This equation is independent of the choice of
.
If
is sufficiently large, we can expand the last product by Lemma 2.1
with
and
. It follows that
is
as defined by (
2.6), the term in
with
being irrelevant because
. Thus we see that
is
as defined by (
2.7), and (
2.11) becomes
|
|
|
Since this is valid for sufficiently large
, the polynomial part of
consists of the terms with
, which are absent
unless
. By putting
these become the first term on the right side of (
2.9).
To find the rest of (
2.9), which contains poles arising from
negative
's, we replace (
2.10) by
|
|
|
whence
|
|
|
If
is sufficiently small, we can expand the last product by
Lemma 2.1 with
and
. It follows that
is
as defined by (
2.6) and that
is
as defined by (
2.7). Hence (
2.11) becomes
|
|
|
Since this is valid if
is sufficiently small, the part of
representing a pole at
consists of the terms with
, which are absent unless
. These
can be rewritten by putting
as
|
|
|
Summation over
takes account of all the poles of
and yields the
second term on the right side of (
2.9).
We shall now apply the partial-fraction decomposition (
2.9) to the
integral (
1.2), designated henceforth by
|
|
|
where
is an
-tuple of integers. We define
-tuples
|
|
Substitution of (
2.9) in (
2.17) reduces
to a set of
simpler integrals in which at most one component of
is nonzero:
|
|
|
The first term on the right side is independent of the choice of
, and
each sum over
is empty if the upper limit is less than the lower limit.
3 Recurrence relations and basic integrals
The integrals
in (
2.19) can be expressed in terms of
and
by using recurrence relations. The main relation
involves also an algebraic term of the form
, where
has the form of an integrand in (
2.17).
Theorem 2
Define
|
|
|
|
|
|
For
and
or
let
be the elementary
symmetric function of degree
in
|
|
|
and define
|
|
|
whence
if
. Then, for any integer
and
for
,
|
|
|
Choose
, whence
|
|
|
|
|
|
From
|
|
it follows that
|
|
and therefore
|
|
|
Replacing
by
in the last term of (
3.7) and
substituting (
3.8) and (
3.9), we find
|
|
|
Integration from
to
proves (
3.5).
If
one of the quantities listed in (
3.3) is 0.
Then
, and the sum over
in (
3.5) effectively
starts with
.
Thus the recurrence
relation contains
integrals if
or
integrals if
. In the first case
can be reduced to the
integrals
, but in the second
case
is added to the list. Further reduction uses the
following theorem in the cases
and 2, cases that could alternatively be
obtained less directly from (
2.19).
Theorem 3
If
is a positive integer, then
|
|
|
Raising both sides of
|
|
|
to the power
and making a binomial expansion of the right side, we find
|
|
|
Multiplying both sides by
and integrating
from
to
, we obtain (
3.11).
If we choose
in the first sum in (
2.19), the
integrals in that sum and in the first
terms of the second sum can be
reduced by (
3.5) to integrals of the form
, with
if
and
if
. The remaining terms of the
second sum can be reduced by (
3.5) to integrals of the form
, with
if
and
if
. Now
can be expressed by (
3.11) in terms of
with
and
, and these integrals can be treated in
the same way as the integrals in the first sum in (
2.19). In this way
all the integrals on the right side of (
2.19) can be reduced to basic
integrals of the form
in the cubic case (
)
plus
in the quartic case (
).
As the integrand in (
1.2) becomes more complicated, so of course does
this reduction to basic integrals, but for integrands that occur frequently in
practice it is quick and simple. To illustrate this, we show how 136 quartic
integrals from [
Gradshteyn and Ryzhik1994] are represented in terms of basic integrals by five
formulas. Each entry in Table 1 starts with a list of those
integrals that have the
form
displayed in the entry and defined in
(
1.2). Also displayed is the expression for
in terms of the
basic integrals
, and
.
Equation (
2.19) suffices for
and
; recurrence
relations are not needed.
Table 1: Some integrals from Gradshteyn and Rhyzhik in terms of basic integrals
|
§ 3.147, 1-8: |
|
|
§ 3.148, 1-8: |
|
|
§ 3.149, 1-8; § 3.151, 1-8]: |
|
|
§ 3.167, 1-32: |
|
|
§ 3.168, 1-72: |
|
If the basic integrals are to be expressed in terms of Legendre's
canonical forms, each of 136 formulas has to be accompanied by
inequalities relating the branch points of the integrand and the interval of
integration. In the next Section we shall use
-functions to avoid most of
this complexity.
4 Reduction of basic integrals to
-functions
Let
lie in the complex plane cut along the negative
real axis, at most one of them being 0. We define two elliptic integrals that
are symmetric in
:
|
|
|
|
|
|
The functions
and
are respectively homogeneous of degree -1/2
and -3/2 in their variables. If
is real and negative,
takes
its Cauchy principal value. Useful degenerate cases are
|
|
|
|
|
|
If
is real and negative,
takes its Cauchy principal value,
|
|
|
If the
's are distinct, then
, and
are
elliptic integrals of the first, second, and third kinds, respectively, and
is an inverse circular or inverse hyperbolic function.
The following reduction theorem, which is not part of the classical theory of
elliptic integrals, replaces a quartic polynomial under the square root by
a cubic polynomial in the integrands of
and
. Permuting
the zeros of the quartic polynomial simply permutes the zeros of the cubic.
Theorem 4
Let
lie in the plane cut along the negative
real axis, at most one of them being 0, and take their square roots in the
right half-plane. Let
, and define
|
|
|
whence
|
|
|
Assume that
has positive real part or is 0. (At most one of the
's is 0 because the sum of any two is not 0.) Then
|
|
|
Let
be complex
and nonzero, and if
define
|
|
|
where
is assumed to have positive real part or be 0. Then
|
|
|
|
|
We omit the proof of this theorem because a very simple proof of (
4.8) is
given in [
Carlson1998] and the proof of (
4.10) is somewhat cumbersome.
It splits the integral into two parts and recombines them by the addition
theorem for
, which contains a term in
. One can show that
(
4.10) reduces to (
4.8) in the limit as
.
Because
(in particular,
),
there are only three distinct
's with subscripts 1,2,3,4.
Corollary 1
Let
and
. Assume the line segment with
endpoints
and
lies in the complex
plane cut along the negative real axis, and take all square roots in the right
half-plane. Define
|
|
|
whence
|
|
|
Assume that
if
and that
has positive
real part or is 0. (At most one of the
's is 0 because of
(
4.13).) Then
|
|
|
where
is defined by (
2.17) and (
2.18).
Let
and assume the line segment with endpoints
and
lies in the complex
plane punctured at 0. Define
|
|
|
|
|
|
and assume
has positive real part or is 0. Then
|
|
|
|
|
|
Map the interval of integration in
|
|
|
onto the positive real line by substituting
|
|
|
|
|
|
The result is
|
|
where we have used (
4.8) and the homogeneity of
. The last line
proves (
4.14), while (
4.6) and (
4.7) become (
4.12)
and (
4.13).
By the same change of integration variable we find
|
|
|
|
|
where we have used (
4.10) and the homogeneity of
and
.
The last line of (
4.23) proves (
4.17), while (
4.9) and
(
4.11) become (
4.15), (
4.16), and (
4.18).
To obtain
from (
4.17), we shall want the relation
|
|
|
This is proved by multiplying both sides of
|
|
by the integrand of (
2.17) and integrating from
to
.
Corollary 2
Under the same conditions as in Corollary 4.1 we have
|
|
In (
4.29) the quantities
are
obtained from (
4.15), (
4.16), and
(
4.18) by putting
and
, whence
and
.
For convenient reference, (
4.14) is copied here as (
4.26).
To prove (
4.27) we substitute (
4.17) in a special case of
(
4.25) :
|
|
|
To prove (
4.28) we put
in (
4.27) and note that
implies
|
|
Then interchange
and
.
To prove (
4.29) from (
4.17) we replace
by 0, where
and
, whence
and
.
Equation (
4.30) is a special case of (
4.25).
The free index
in (
4.27) allows four choices for
, at most two of which can be real and negative. Thus
can
be chosen to avoid a Cauchy principal value of
. The free index
in (
4.30) achieves the same end in conjunction with (
4.29). The
free index
in (
4.28) can be chosen so that
, for
at most one of the three
's can be 0 because of (
4.13).
In the cubic case (
) we put
,
, and
,
whence
and
.
5 Summary of procedure
The parts of this paper that are needed for a symbolic integration program are
(1) the reduction formula (
2.19), in which various quantities are defined
by (
2.17), (
2.18), and Definition 2.1;
(2) the recurrence formulas in Theorems 3.1 and 3.2, along with the
instructions in the first paragraph after the proof of Theorem 3.2;
(3) the reductions to
-functions in Corollary 4.2, in which various
quantities are defined by (
4.12), (
4.13), (
4.15),
(
4.16), and (
4.18), along with the remarks in the last two
paragraphs of Section 4; if
or
is infinite, appropriate limits
should be taken in (
4.12), (
4.16), and (
4.18).
The procedure presented here has not yet been implemented in software. It
differs from the method used to construct integral tables like [
Carlson1988] in
several ways: it does not depend on human judgment in using recurrence
relations, some of the basic integrals are chosen differently, and provisions
are made for avoiding Cauchy principal values of
and infinite values of
.
6 An example
The examples in Table 1 are expressed at once in terms
of
-functions by (
4.26)-(
4.30). A more difficult
example, not found in [
Gradshteyn and Ryzhik1994], which illustrates the various steps in the
first paragraph after the proof of Theorem 3.2, is a cubic case,
|
|
|
We use the subscript 5 and take
so that we can put
and
when the basic cubic integrals
, are
expressed in terms of
-functions.
Applying (
2.19) and Definition 2.1, we find
|
|
|
where the last term needs to be reduced to basic integrals. Putting
and
in (
3.5), we have
|
|
|
To deal with
we use (
3.11) to get
|
|
|
and
is reduced to basic integrals by putting
and
in (
3.5) . Because
we find
|
|
|
Substituting (
6.5) in (
6.4), then (
6.4) in (
6.3), then
(
6.3) in (
6.2), and collecting terms, we arrive at
|
|
|
where
|
|
where we have substituted the values of the
's from (
3.4).
The next step, simplification of the
's, is perhaps the
least straightforward to automate. A glance at (
6.7) suggests choosing
. The last two terms in (
6.9) can be combined by the identity
|
|
|
The last two terms in square brackets in (
6.10) can be combined by a
companion of (
4.25),
|
|
|
whence
|
|
|
Thus (
6.6) becomes
|
|
The basic integrals in this equation are expressed in terms of
-functions
by (
4.26), (
4.28) with
and
chosen as 1, 2, or 4 so
that
, and (
4.27) with
and
chosen as
1, 2, 3, or 4 so that
is not real and negative. Because we are
putting
and
, the choice to try first in each case is 4 in
order to give the extra term in
a coefficient 0. In the other
coefficients and in the variables of the
-functions, defined by
(
4.12), (
4.15), and (
4.18), we note that
,
, and
.
It is a matter of taste whether or not to substitute the expressions in terms
of
-functions for the basic integrals in (
6.14).
If one wants to exhibit a result with a single equality sign, the right
side becomes unwieldy. For an integral table one would list the basic
integrals separately, as we have done here.
As a check we have computed
|
|
|
obtained from (
6.6) with
|
|
A numerical integration gave
with a stated limit of
absolute error of
, much larger than the difference from
(
6.15).
Acknowledgment: I wish to thank George Labahn for sending me
a preprint of [
Labahn and Mutrie1997].
Footnotes:
This work was supported by the
Director of Energy Research, Office of Basic
Energy Sciences. The Ames Laboratory is operated for the U. S. Department of
Energy by Iowa State University under Contract W-7405-ENG-82.
E-mail: carlson@decst2.ams.ameslab.gov
Replacement of
by
and
by
yields Equation (5.12) in [
Carlson1998], an equation that is now seen to
be merely a special case of Equation (5.13) and so can be omitted.
File translated from
TEX
by
TTM,
version 3.01.
On 5 Jul 2001, 00:33.