Multivariate Partial Fraction Expansion

advertisement
ACM Communications in Computer Algebra, Vol. 42, No. 4, December 2008
Formally Reviewed Article
Multivariate Partial Fraction Expansion
David R. Stoutemyer
dstout@hawaii.edu
Abstract
The Derive computer-algebra program has Expand as one of the menu choices: The user is prompted for successively less
main expansion variables, which can be all of the variables or any proper subset. It is clear how to proceed when the expression
is a polynomial: Fully distribute with respect to all expansion variables, but collect as coefficient polynomials all terms that share
the same exponents for the expansion variables. Derive uses a partially factored form, so the collected coefficient polynomials
can be fortuitously partially factored.
For rational expressions the expand function does partial fraction expansion because it is the most useful kind of rational
expansion. However, most other computer algebra systems and examples in the literature focus on partial fraction expansion
with respect to only one variable, where any other variables are considered mere parameters. For consistency with multivariate
polynomial expansion, we wanted a useful and well-defined meaning for multivariate partial fraction expansion. This paper
provides such a definition and a corresponding algorithm.
A major purpose of expansion is to split an expression into a sum of as many independent terms as possible, each as simple as
possible. Thus:
• When users ask to expand a multivariate polynomial with respect to some of its variables, they probably want it fully
distributed with respect to those variables. The presence of non-expansion variables can be taken as evidence that the user
would prefer recursive collection and fortuitous partial factoring with respect to those non-expansion variables, which is
typically more useful, compact and intelligible.
• When users ask to expand a rational expression with respect to some of its variables, the most useful form is partial
fraction expansion with respect to those variables. (Distributing the denominator over the terms of the numerator is easy
to program, but it merely increases the bulk.) The presence of non-expansion variables can be taken as evidence that the
user would prefer common denominators, recursive collection and partial factoring with respect to those non-expansion
variables, which is typically more useful, compact and intelligible.
For integration and inverse Laplace transforms, partial fraction expansion is necessary only with respect to one variable at
a time, which we can temporarily make the main one. However, for the purpose of fully expanding sinusoids and exponentials
of sums, it can be important first to expand their arguments with respect to all variables into the simplest possible independent
terms in a canonical way.
The Mapletm 11.01 function
convert(expression, par f rac, variable, denominatorFactorizationLevel)
does partial fraction expansion with respect to the indicated variable. variable defaults to the one chosen by Maple as most main.
The Mathematica(R) 6.0.1.0 function Apart[expression, variable] and the Macsyma 13 partfrac(expression, variable) functions
are similar. These functions don’t necessarily split multivariate rational expressions into the simplest possible independent
factors.
Consequently, this paper generalizes the univariate partial fraction expansion described in the literature and provided by
most other computer-algebra systems. More specifically, this algorithm can expand a ratio with respect to any ordered subset
of its variables in a way that is canonical and fully expanded with respect to the ordered expansion variables to the extent of
a denominator factorization level requested for each expansion variable. The algorithm described here is implemented in the
Derive computer algebra program.
206
Stoutemyer
1
The form and an algorithm for producing it
Definition 1 (distributed complete multivariate partial fraction form). Let
N(x1 , x2 , . . . , xm )
D(x1 , x2 , . . . , xm )
be a rational expression over a unique factorization domain, with lexically-ordered expansion variables x1 Â x2 Â . . . Â xm .
There can optionally be additional variables ordered after xm . Let the denominator D be factored into factors that are at least
primitive, square-free, and coprime with respect to the expansion variables. Factors that are free of all expansion variables can
be fortuitously either expanded or partially factored by any amount. A distributed complete multivariate partial fraction form
for N/D with respect to that factorization and that ordered set of expansion variables is a sum of the form
k
Nj
∑ Dj ,
j=1
with properties
a) For each expansion variable, each D j contains at most one factor of D having that variable as its main variable.
b) If the denominator of D j has a square-free factor P having an expansion variable as its main variable and having
multiplicity n ≥ 1, then the degree of N j is less than the degree of P in that variable.
c) N j is a monomial with respect to all of its factorization variables.
Remarks:
• The amount of denominator factoring can be different for different expansion variables. Alternatives include over the
rational numbers, Gaussian rationals, using radicals, or over the reals or complex numbers using approximate coefficients.
• The form is canonical to within ordering of terms and factors with respect to the expansion variables. Factors and terms
that are free of all expansion variables can be any candid form, as described in [1].
• The number of terms together with the rational functions they each represent can depend on the ordering of the expansion
variables.
• For the terms of the “polynomial” part with respect to any variable, D j can be 1 or an expression that is independent of
the main expansion variable.
1.1
The algorithm
Order the variables with the expansion variables most main. For ease of notation, let x be the most main variable, then y; and
represent lesser variables with ellipses.
Suppose that our point of departure is a reduced ratio of two recursively expanded polynomials in x, y and lesser variables.
We can make the ratio proper by the reduction
N(x, y, . . .)
R(x, y, . . .)
→ Q(x, y, . . .) +
D(x, y, . . .)
D(x, y, . . .)
where Q is the quotient of N/D and R is the corresponding remainder.
The collected coefficients of powers of x in Q are ratios of polynomials in any remaining variables. Any such coefficients
that contain expansion variables can be recursively expanded by the entire algorithm that we are describing, until these quotient coefficients contain no expansion variables. The powers of x are then distributed across these partial-fraction coefficient
expansions. This recursion and distribution will inductively satisfy Definition 1.
Partition D into factors that contain the most main expansion variable and those that don’t:
R(x, y, . . .)
R(x, y, . . .)
→
.
D(x, y, . . .)
E(x, y, . . .)F(y, . . .)
207
Multivariate Partial Fractions
Formally Reviewed Article
Expression R/E can be split into partial fractions with respect to its main expansion variable by any of the published
algorithms. For example, let Pn be a coprime factor of E having multiplicity n, and let G be its cofactor E/Pn . With the aid of
an extended polynomial GCD algorithm we can solve the linear Diophantine polynomial equation
UG +V Pn = R
for the unique polynomials U and V such that degree(U) < degree(Pn ) and degree(V ) < degree(U). Dividing by E = Pn G then
transposing sides gives the rewrite
U V
R
→ n+ .
E
P
G
We can then recursively apply the same algorithm to V /G until G has only one factor.
For n > 1, we can use successive quotients and remainders to further split each U/Pn into very proper ratios:
U
Un Un−1
U1
→ n + n−1 + · · · + 1
Pn
P
P
P
where degree(U j ) < degree(P) for 1 ≤ j ≤ n.
(We can optionally omit this step for a typically more compact incomplete partial fraction expansion. In that case, “degree
of P” should be replaced with “degree of Pn ” in property b of Definition 1.)
We can then distribute the withheld denominator factors F(y, . . .) over the resulting terms.
Whenever one of the resulting numerators has more than one power of x, we can further split the expression by distributing
the denominator over the distinct powers of x in the numerator. This makes each term have the form
xk S(y, . . .)
.
P j T (y, . . .)
(We can optionally omit this step if x is the last expansion variable, giving an undistributed partial fraction expansion with
respect to that variable. This is preferable for many methods of integrating with respect to that variable.)
If y is an expansion variable, we can now recursively apply the entire algorithm to S/T , then distribute xk /P j over the
resulting expansion to obtain more and simpler terms. This recursion and distribution will inductively satisfy Definition 1 for
the proper fraction part.
2
Examples
As an example of the algorithm, consider the following reduced ratio of recursively represented polynomials wherein x is the
main variable.
x3 (y6 + y5 + 4y4 + y3 + 2y2 − 2y − 7) − x(y8 + y7 + 2y6 − y5 − 6y4 − 10y3 − 15y2 − 8y) − 2y7 + 2y6 − 8y5 + 8y4 − 8y3 + 8y2
x2 (y6 + 3y4 − 4) − (y8 + 3y6 − 4y2 )
Suppose we want to do a partial fraction expansion with respect to x alone. This ratio is improper with respect to x, so the
equivalent quotient plus reduced proper ratio is
x
y4 + y3 + 5y2 + 2y + 7 x(2y2 + 2y) − (y2 − y)
+ 2 2
.
y4 + 4y2 + 4
x (y − 1) − (y4 − y2 )
Notice how the quotient polynomial part satisfies Definition 1 with respect to the expansion variable x, but the degree of the
coefficient numerator is not less than the degree of the coefficient denominator in y.
With respect to x, the denominator of the proper ratio factors to (x + y)(x − y)(y2 − 1), and the partial fraction expansion of
this ratio is then
2y
2y2
+
.
(x + y)(y2 − 1) (x − y)(y2 − 1)
Notice how these two terms satisfy Definition 1 with respect to the expansion variable x, but the degree of y in the numerator
of the first term is not less than the degree of y in the denominator factor that has y as its main variable.
If we also want to expand with respect to y as a secondary variable, the partial fraction expansion of 2y2 /(y2 − 1) is
208
Stoutemyer
2−
1
1
+
.
y+1 y−1
Distributing 1/(x + y) over this sum gives
2
1
1
−
+
.
x + y (x + y)(y + 1) (x + y)(y − 1)
Similarly the partial fraction expansion of 2y/(y2 − 1) is
1
1
+
.
y+1 y−1
Distributing 1/(x − y) over this sum gives
1
1
+
.
(x − y)(y + 1) (x − y)(y − 1)
Returning to the polynomial part, the coefficient of the cofactor x is improper in y, so expanding it into a quotient plus a
proper ratio gives
1+
y3 + y2 + 2y + 3
.
y4 + 2y2 + 1
Factoring the denominator over the rational numbers then making the numerator very proper gives the two terms
1
(y2 + 2)2
+
y+1
y2 + 2
Distributing the denominator y2 + 2 over y + 1 gives
y
y2 + 2
+
1
y2 + 2
.
Distributing the cofactor x over all of these terms gives
x+
xy
x
x
+
+
.
(y2 + 2)2 y2 + 2 y2 + 2
Notice how all nine terms of the final result satisfy Definition 1.
For comparison, now let’s consider expanding the original ratio with respect to y alone. With y as the main variable the ratio
can be recursively represented as
H
y8 − y6 (x2 − 3) − 3y4 x2 − 4y2 + 4x2
where
H
= y8 x + y7 (x + 2) − y6 (x3 − 2x + 2) − y5 (x3 + x − 8) − y4 (4x3 + 6x + 8) −
y3 (x3 + 10x − 8) − y2 (2x3 + 15x + 8) + y(2x3 − 8x) + 7x3 .
This ratio is improper with respect to y, so the quotient with respect to y is x, and the corresponding proper ratio is
y7 (x + 2) − y6 (x + 2) − y5 (x3 + x − 8) − y4 (x3 + 6x + 8) − y3 (x3 + 10x − 8) − y2 (2x3 + 11x + 8) + y(2x3 − 8x) + 3x3
(y − x)(y + x)(y − 1)(y + 1)(y2 + 2)2
Completing the partial fraction expansion with respect to y alone gives
x+
x
yx
x
2
2x
2x2
2x
+
+
−
+
+
−
(y2 + 2)2 y2 + 2 y2 + 2 (y + 1)(x2 − 1) (y − 1)(x2 − 1) (y + x)(x2 − 1) (y − x)(x2 − 1)
Continuing, the partial fraction expansion with respect to y as the main variable and x as the secondary variable gives
209
Multivariate Partial Fractions
Formally Reviewed Article
yx
x
x
1
1
1
1
x + (y2 +2)
2 + y2 +2 + y2 +2 + (y+1)(x+1) − (y+1)(x−1) + (y−1)(x+1) + (y−1)(x−1) −
1
2
1
1
1
(y+x)(x+1) + (y+x)(x−1) + y+x − (y−x)(x+1) − (y−x)(x−1)
In comparison, the expansion with respect to x alone was
x
y4 + y3 + 5y2 + 2y + 7
2y2
2y
+
+
4
2
2
y + 4y + 4
(x + y)(y − 1) (x − y)(y2 − 1)
and the expansion with respect to x then y was
x+
x
xy
x
2
1
1
1
1
+
+
+
−
+
+
+
.
(y2 + 2)2 y2 + 2 y2 + 2 x + y (x + y)(y + 1) (x + y)(y − 1) (x − y)(y + 1) (x − y)(y − 1)
All four of the above expansions are different, but all satisfy Definition 1 with respect to their expansion variable or variables.
For this given N/D, expansion with respect to x then y gave a total of 9 terms, whereas expansion with respect to y then x gave
13 terms, 5 of which were equivalent. For this example the differing terms are all of the same complexity. Therefore orderings
that yield more terms doesn’t necessarily make those terms simpler.
3
Conclusions
The algorithm here accomplishes the goal of systematic fine splitting for partial fraction expansion with respect to one or more
expansion variables. The alternative orderings of the expansion variables give extra control over the number of terms and the
form of the result.
Acknowledgment
I thank the referee for suggesting important improvements to this article.
References
[1] D.R. Stoutemyer, Ten commandments for good default expression simplification, Proceedings of the Milestones in Computer Algebra Conference, 2008, http://www.orcca.on.ca/conferences/mca2008/
210
Download