06.05.2015 Views

Multivariate Partial Fraction Expansion - SIGSAM

Multivariate Partial Fraction Expansion - SIGSAM

Multivariate Partial Fraction Expansion - SIGSAM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ACM Communications in Computer Algebra, Vol. 42, No. 4, December 2008<br />

Formally Reviewed Article<br />

<strong>Multivariate</strong> <strong>Partial</strong> <strong>Fraction</strong> <strong>Expansion</strong><br />

David R. Stoutemyer<br />

dstout@hawaii.edu<br />

Abstract<br />

The Derive computer-algebra program has Expand as one of the menu choices: The user is prompted for successively less<br />

main expansion variables, which can be all of the variables or any proper subset. It is clear how to proceed when the expression<br />

is a polynomial: Fully distribute with respect to all expansion variables, but collect as coefficient polynomials all terms that share<br />

the same exponents for the expansion variables. Derive uses a partially factored form, so the collected coefficient polynomials<br />

can be fortuitously partially factored.<br />

For rational expressions the expand function does partial fraction expansion because it is the most useful kind of rational<br />

expansion. However, most other computer algebra systems and examples in the literature focus on partial fraction expansion<br />

with respect to only one variable, where any other variables are considered mere parameters. For consistency with multivariate<br />

polynomial expansion, we wanted a useful and well-defined meaning for multivariate partial fraction expansion. This paper<br />

provides such a definition and a corresponding algorithm.<br />

A major purpose of expansion is to split an expression into a sum of as many independent terms as possible, each as simple as<br />

possible. Thus:<br />

• When users ask to expand a multivariate polynomial with respect to some of its variables, they probably want it fully<br />

distributed with respect to those variables. The presence of non-expansion variables can be taken as evidence that the user<br />

would prefer recursive collection and fortuitous partial factoring with respect to those non-expansion variables, which is<br />

typically more useful, compact and intelligible.<br />

• When users ask to expand a rational expression with respect to some of its variables, the most useful form is partial<br />

fraction expansion with respect to those variables. (Distributing the denominator over the terms of the numerator is easy<br />

to program, but it merely increases the bulk.) The presence of non-expansion variables can be taken as evidence that the<br />

user would prefer common denominators, recursive collection and partial factoring with respect to those non-expansion<br />

variables, which is typically more useful, compact and intelligible.<br />

For integration and inverse Laplace transforms, partial fraction expansion is necessary only with respect to one variable at<br />

a time, which we can temporarily make the main one. However, for the purpose of fully expanding sinusoids and exponentials<br />

of sums, it can be important first to expand their arguments with respect to all variables into the simplest possible independent<br />

terms in a canonical way.<br />

The Maple tm 11.01 function<br />

convert(expression, par f rac, variable, denominatorFactorizationLevel)<br />

does partial fraction expansion with respect to the indicated variable. variable defaults to the one chosen by Maple as most main.<br />

The Mathematica (R) 6.0.1.0 function Apart[expression, variable] and the Macsyma 13 partfrac(expression, variable) functions<br />

are similar. These functions don’t necessarily split multivariate rational expressions into the simplest possible independent<br />

factors.<br />

Consequently, this paper generalizes the univariate partial fraction expansion described in the literature and provided by<br />

most other computer-algebra systems. More specifically, this algorithm can expand a ratio with respect to any ordered subset<br />

of its variables in a way that is canonical and fully expanded with respect to the ordered expansion variables to the extent of<br />

a denominator factorization level requested for each expansion variable. The algorithm described here is implemented in the<br />

Derive computer algebra program.<br />

206


Stoutemyer<br />

1 The form and an algorithm for producing it<br />

Definition 1 (distributed complete multivariate partial fraction form). Let<br />

N(x 1 ,x 2 ,...,x m )<br />

D(x 1 ,x 2 ,...,x m )<br />

be a rational expression over a unique factorization domain, with lexically-ordered expansion variables x 1 ≻ x 2 ≻ ... ≻ x m .<br />

There can optionally be additional variables ordered after x m . Let the denominator D be factored into factors that are at least<br />

primitive, square-free, and coprime with respect to the expansion variables. Factors that are free of all expansion variables can<br />

be fortuitously either expanded or partially factored by any amount. A distributed complete multivariate partial fraction form<br />

for N/D with respect to that factorization and that ordered set of expansion variables is a sum of the form<br />

with properties<br />

k<br />

N j<br />

∑<br />

j=1<br />

a) For each expansion variable, each D j contains at most one factor of D having that variable as its main variable.<br />

D j<br />

,<br />

b) If the denominator of D j has a square-free factor P having an expansion variable as its main variable and having<br />

multiplicity n ≥ 1, then the degree of N j is less than the degree of P in that variable.<br />

c) N j is a monomial with respect to all of its factorization variables.<br />

Remarks:<br />

• The amount of denominator factoring can be different for different expansion variables. Alternatives include over the<br />

rational numbers, Gaussian rationals, using radicals, or over the reals or complex numbers using approximate coefficients.<br />

• The form is canonical to within ordering of terms and factors with respect to the expansion variables. Factors and terms<br />

that are free of all expansion variables can be any candid form, as described in [1].<br />

• The number of terms together with the rational functions they each represent can depend on the ordering of the expansion<br />

variables.<br />

• For the terms of the “polynomial” part with respect to any variable, D j can be 1 or an expression that is independent of<br />

the main expansion variable.<br />

1.1 The algorithm<br />

Order the variables with the expansion variables most main. For ease of notation, let x be the most main variable, then y; and<br />

represent lesser variables with ellipses.<br />

Suppose that our point of departure is a reduced ratio of two recursively expanded polynomials in x,y and lesser variables.<br />

We can make the ratio proper by the reduction<br />

N(x,y,...)<br />

R(x,y,...)<br />

→ Q(x,y,...) +<br />

D(x,y,...) D(x,y,...)<br />

where Q is the quotient of N/D and R is the corresponding remainder.<br />

The collected coefficients of powers of x in Q are ratios of polynomials in any remaining variables. Any such coefficients<br />

that contain expansion variables can be recursively expanded by the entire algorithm that we are describing, until these quotient<br />

coefficients contain no expansion variables. The powers of x are then distributed across these partial-fraction coefficient<br />

expansions. This recursion and distribution will inductively satisfy Definition 1.<br />

Partition D into factors that contain the most main expansion variable and those that don’t:<br />

R(x,y,...)<br />

D(x,y,...) → R(x,y,...)<br />

E(x,y,...)F(y,...) .<br />

207


<strong>Multivariate</strong> <strong>Partial</strong> <strong>Fraction</strong>s<br />

Formally Reviewed Article<br />

Expression R/E can be split into partial fractions with respect to its main expansion variable by any of the published<br />

algorithms. For example, let P n be a coprime factor of E having multiplicity n, and let G be its cofactor E/P n . With the aid of<br />

an extended polynomial GCD algorithm we can solve the linear Diophantine polynomial equation<br />

UG +V P n = R<br />

for the unique polynomials U and V such that degree(U) < degree(P n ) and degree(V ) < degree(U). Dividing by E = P n G then<br />

transposing sides gives the rewrite<br />

R<br />

E → U P n + V G .<br />

We can then recursively apply the same algorithm to V /G until G has only one factor.<br />

For n > 1, we can use successive quotients and remainders to further split each U/P n into very proper ratios:<br />

U<br />

P n → U n<br />

P n + U n−1<br />

P n−1 + ··· + U 1<br />

P 1<br />

where degree(U j ) < degree(P) for 1 ≤ j ≤ n.<br />

(We can optionally omit this step for a typically more compact incomplete partial fraction expansion. In that case, “degree<br />

of P” should be replaced with “degree of P n ” in property b of Definition 1.)<br />

We can then distribute the withheld denominator factors F(y,...) over the resulting terms.<br />

Whenever one of the resulting numerators has more than one power of x, we can further split the expression by distributing<br />

the denominator over the distinct powers of x in the numerator. This makes each term have the form<br />

x k<br />

P j S(y,...)<br />

T (y,...) .<br />

(We can optionally omit this step if x is the last expansion variable, giving an undistributed partial fraction expansion with<br />

respect to that variable. This is preferable for many methods of integrating with respect to that variable.)<br />

If y is an expansion variable, we can now recursively apply the entire algorithm to S/T , then distribute x k /P j over the<br />

resulting expansion to obtain more and simpler terms. This recursion and distribution will inductively satisfy Definition 1 for<br />

the proper fraction part.<br />

2 Examples<br />

As an example of the algorithm, consider the following reduced ratio of recursively represented polynomials wherein x is the<br />

main variable.<br />

x 3 (y 6 + y 5 + 4y 4 + y 3 + 2y 2 − 2y − 7) − x(y 8 + y 7 + 2y 6 − y 5 − 6y 4 − 10y 3 − 15y 2 − 8y) − 2y 7 + 2y 6 − 8y 5 + 8y 4 − 8y 3 + 8y 2<br />

x 2 (y 6 + 3y 4 − 4) − (y 8 + 3y 6 − 4y 2 )<br />

Suppose we want to do a partial fraction expansion with respect to x alone. This ratio is improper with respect to x, so the<br />

equivalent quotient plus reduced proper ratio is<br />

x y4 + y 3 + 5y 2 + 2y + 7<br />

y 4 + 4y 2 + 4<br />

+ x(2y2 + 2y) − (y 2 − y)<br />

x 2 (y 2 − 1) − (y 4 − y 2 ) .<br />

Notice how the quotient polynomial part satisfies Definition 1 with respect to the expansion variable x, but the degree of the<br />

coefficient numerator is not less than the degree of the coefficient denominator in y.<br />

With respect to x, the denominator of the proper ratio factors to (x + y)(x − y)(y 2 − 1), and the partial fraction expansion of<br />

this ratio is then<br />

2y 2<br />

(x + y)(y 2 − 1) + 2y<br />

(x − y)(y 2 − 1) .<br />

Notice how these two terms satisfy Definition 1 with respect to the expansion variable x, but the degree of y in the numerator<br />

of the first term is not less than the degree of y in the denominator factor that has y as its main variable.<br />

If we also want to expand with respect to y as a secondary variable, the partial fraction expansion of 2y 2 /(y 2 − 1) is<br />

208


Stoutemyer<br />

Distributing 1/(x + y) over this sum gives<br />

2 − 1<br />

y + 1 + 1<br />

y − 1 .<br />

Similarly the partial fraction expansion of 2y/(y 2 − 1) is<br />

2<br />

x + y − 1<br />

(x + y)(y + 1) + 1<br />

(x + y)(y − 1) .<br />

Distributing 1/(x − y) over this sum gives<br />

1<br />

y + 1 + 1<br />

y − 1 .<br />

1<br />

(x − y)(y + 1) + 1<br />

(x − y)(y − 1) .<br />

Returning to the polynomial part, the coefficient of the cofactor x is improper in y, so expanding it into a quotient plus a<br />

proper ratio gives<br />

1 + y3 + y 2 + 2y + 3<br />

y 4 + 2y 2 + 1 .<br />

Factoring the denominator over the rational numbers then making the numerator very proper gives the two terms<br />

Distributing the denominator y 2 + 2 over y + 1 gives<br />

1<br />

(y 2 + 2) 2 + y + 1<br />

y 2 + 2<br />

Distributing the cofactor x over all of these terms gives<br />

x +<br />

y<br />

y 2 + 2 + 1<br />

y 2 + 2 .<br />

x<br />

(y 2 + 2) 2 + xy<br />

y 2 + 2 + x<br />

y 2 + 2 .<br />

Notice how all nine terms of the final result satisfy Definition 1.<br />

For comparison, now let’s consider expanding the original ratio with respect to y alone. With y as the main variable the ratio<br />

can be recursively represented as<br />

H<br />

y 8 − y 6 (x 2 − 3) − 3y 4 x 2 − 4y 2 + 4x 2<br />

where<br />

H = y 8 x + y 7 (x + 2) − y 6 (x 3 − 2x + 2) − y 5 (x 3 + x − 8) − y 4 (4x 3 + 6x + 8) −<br />

y 3 (x 3 + 10x − 8) − y 2 (2x 3 + 15x + 8) + y(2x 3 − 8x) + 7x 3 .<br />

This ratio is improper with respect to y, so the quotient with respect to y is x, and the corresponding proper ratio is<br />

y 7 (x + 2) − y 6 (x + 2) − y 5 (x 3 + x − 8) − y 4 (x 3 + 6x + 8) − y 3 (x 3 + 10x − 8) − y 2 (2x 3 + 11x + 8) + y(2x 3 − 8x) + 3x 3<br />

(y − x)(y + x)(y − 1)(y + 1)(y 2 + 2) 2<br />

Completing the partial fraction expansion with respect to y alone gives<br />

x<br />

x +<br />

(y 2 + 2) 2 + yx<br />

y 2 + 2 + x<br />

y 2 + 2 − 2<br />

(y + 1)(x 2 − 1) + 2x<br />

(y − 1)(x 2 − 1) + 2x 2<br />

(y + x)(x 2 − 1) − 2x<br />

(y − x)(x 2 − 1)<br />

Continuing, the partial fraction expansion with respect to y as the main variable and x as the secondary variable gives<br />

209


<strong>Multivariate</strong> <strong>Partial</strong> <strong>Fraction</strong>s<br />

Formally Reviewed Article<br />

x +<br />

x + yx<br />

(y 2 +2) 2 y 2 +2 +<br />

x<br />

y 2 +2 + 1<br />

In comparison, the expansion with respect to x alone was<br />

x y4 + y 3 + 5y 2 + 2y + 7<br />

y 4 + 4y 2 + 4<br />

and the expansion with respect to x then y was<br />

(y+1)(x+1) − 1<br />

(y+1)(x−1) + 1<br />

(y−1)(x+1) + 1<br />

(y−1)(x−1) −<br />

1<br />

(y+x)(x+1) + 1<br />

(y+x)(x−1) + y+x 2 − 1<br />

(y−x)(x+1) − 1<br />

(y−x)(x−1)<br />

+<br />

2y 2<br />

(x + y)(y 2 − 1) + 2y<br />

(x − y)(y 2 − 1)<br />

x<br />

x +<br />

(y 2 + 2) 2 + xy<br />

y 2 + 2 + x<br />

y 2 + 2 + 2<br />

x + y − 1<br />

(x + y)(y + 1) + 1<br />

(x + y)(y − 1) + 1<br />

(x − y)(y + 1) + 1<br />

(x − y)(y − 1) .<br />

All four of the above expansions are different, but all satisfy Definition 1 with respect to their expansion variable or variables.<br />

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<br />

13 terms, 5 of which were equivalent. For this example the differing terms are all of the same complexity. Therefore orderings<br />

that yield more terms doesn’t necessarily make those terms simpler.<br />

3 Conclusions<br />

The algorithm here accomplishes the goal of systematic fine splitting for partial fraction expansion with respect to one or more<br />

expansion variables. The alternative orderings of the expansion variables give extra control over the number of terms and the<br />

form of the result.<br />

Acknowledgment<br />

I thank the referee for suggesting important improvements to this article.<br />

References<br />

[1] D.R. Stoutemyer, Ten commandments for good default expression simplification, Proceedings of the Milestones in Computer<br />

Algebra Conference, 2008, http://www.orcca.on.ca/conferences/mca2008/<br />

210

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!