PF _ _ _ _ _ _ _ _ _ _ _ _ operator
pftransforms <expression> into a list of partial fraction s with respect to the main variable, <variable>. pf does a complete partial fraction decomposition, and as the algorithms used are fairly unsophisticated (factorization and the extended Euclidean algorithm), the code may be unacceptably slow in complicated cases.
pf(2/((x+1)^2*(x+2)),x); 2 -2 2 {-----,-----,------------} X + 2 X + 1 2 X + 2*X + 1 off exp; pf(2/((x+1)^2*(x+2)),x); 2 - 2 2 {-----,-----,--------} X + 2 X + 1 2 (X + 1) for each j in ws sum j; 2 ---------------- 2 ( + 2)*(X + 1)
If you want the denominators in factored form, turn exp off, as shown in the second example above. As shown in the final example, the for each construct can be used to recombine t he terms. Alternatively, one can use the operations on lists to extract any desired term.