Previous Page Next Page Contents

partfrac -- compute a partial fraction decomposition

Introduction

partfrac(f, x) returns the partial fraction decomposition of the rational expression f with respect to the variable x.

Call(s)

partfrac(f <, x>)

Parameters

f - a rational expression in x
x - the indeterminate: typically, an identifier or an indexed identifier.

Returns

an arithmetical expression.

Further Documentation

Chapter ``Manipulating Expressions'' of the Tutorial.

Related Functions

collect, denom, divide, expand, factor, normal, numer, rectform, rewrite, simplify

Details

Example 1

In the following calls, there is no need to specify an indeterminate because the rational expressions are univariate:

>> partfrac(x^2/(x^3 - 3*x + 2))
                        5           1            4
                    --------- + ---------- + ---------
                    9 (x - 1)            2   9 (x + 2)
                                3 (x - 1)
>> partfrac(23 + (x^4 + x^3)/(x^3 - 3*x + 2))
                       19           2            8
                x + --------- + ---------- + --------- + 24
                    9 (x - 1)            2   9 (x + 2)
                                3 (x - 1)

The following expression contains two indeterminates x and y. One has to specify the variable with respect to which the partial fraction decomposition shall be computed:

>> f := x^2/(x^2 - y^2): partfrac(f, x),  partfrac(f, y)
                     y           y          x           x
             1 - --------- - ---------, --------- - ---------
                 2 (y - x)   2 (x + y)  2 (x + y)   2 (y - x)
>> delete f:

Example 2

In the following, we demonstrate the dependence of the partial fraction decomposition on the function factor:

>> partfrac(1/(x^2 + 2), x)    
                                    1
                                  ------
                                   2
                                  x  + 2

Note that the denominator x^2 + 2 does not factor over the rational numbers:

>> factor(x^2 + 2)    
                                   2
                                  x  + 2

However, it factors over the extension containing sqrt(-2). In the following calls, this extended coefficient field is implicitly assumed by factor and, consequently, by partfrac:

>> factor(sqrt(-2)*x^2 + 2*sqrt(-2))    
                        1/2          1/2          1/2
                    (I 2   ) (x - I 2   ) (x + I 2   )
>> partfrac(x/(sqrt(-2)*x^2 + 2*sqrt(-2)), x)
                      1/2 /       1                1        \
             - 1/2 I 2    | -------------- + -------------- |
                          |           1/2              1/2  |
                          \ 2 (x - I 2   )   2 (x + I 2   ) /

Example 3

Rational expressions of symbolic function calls may also be decomposed into partial fractions:

>> partfrac(1/(sin(x)^4 - sin(x)^2 + sin(x) - 1), sin(x))
                                                    2
                                   2 sin(x)   sin(x)
                                 - -------- - ------- - 2/3
                      1               3          3
                -------------- + --------------------------
                3 (sin(x) - 1)           2         3
                                   sin(x)  + sin(x)  + 1

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000