Partial Fractions

A partial fraction is a decomposition of a quotient into a sum of quotients where the denominators of the summand are powers of primes. (Most people first encounter partial fractions when they are learning integral calculus. For a technical discussion of partial fractions see, for example, Lang's Algebra.) For example, the rational number 1/6 is decomposed into 1/2-1/3. You can compute partial fractions of quotients of objects from domains belonging to the category EuclideanDomain. For example, Integer, Complex Integer, and UnivariatePolynomial(x,Fraction Integer) all belong to EuclideanDomain. In the examples following, we demonstrate how to decompose quotients of each of these kinds of objects into partial fractions. It is necessary that we know how to factor the denominator when we want to compute a partial fraction. Although the interpreter can often do this automatically, it may be necessary for you to include a call to factor. In these examples, it is not necessary to factor the denominators explicitly. The main operation for computing partial fractions is called partialFraction and we use this to compute a decomposition of 1/10!. The first argument top partialFraction is the numerator of the quotient and the second argument is the factored denominator.

Since the denominators are powers of primes, it may be possible to expand the numerators further with respect to those primes. Use the operation padicFraction to do this.

The operation compactFraction returns an expanded fraction into the usual form. The compacted version is used internally for computational efficiency.

You can add, subtract, multiply, and divide partial fractions. In addition, you can extract the parts of the decomposition. numberOfFractionalTerms computes the number of terms in the fractional part. This does not include the whole part of the fraction, which you get by calling wholePart. In this example, the whole part is 0.

The operation nthFractionalTerm returns the individual terms in the decomposition. Notice that the object returned is a partial fraction itself. firstNumer and firstDenom extract the numerator and denominator of the first term of the fraction.

Given two gaussian integers (see Complex), you can decompose their quotient into a partial fraction.

To convert back to a quotient, simply use the conversion

To conclude this section, we compute the decomposition of

                       1
         -------------------------------
                       2       3       4
         (x + 1)(x + 2) (a + 3) (x + 4)

The polynomials in this object have type UnivariatePolynomial(x,Fraction Integer). We use the primeFactor operation (see Factored) to create the denominator in factored form directly.

These are the compact and expanded partial fractions for the quotient.

Also see FullPartialFractionExpansion for examples of factor-free conversion of quotients to full partial fractions. Issue the system command

to display the full list of operations defined by PartialFraction.