[Date Index] [Thread Index] [Author Index]
Re: Partial Fraction Decomposition with imaginary coeff.
> You just don't know how difficult Apart has made my life. > It is crucial to the implementation of inverse linear > transforms. Under 1.2, it would not handle polynomials > with rational coefficients expressed in decimal form. > Under 1.2 and 2.0, Apart does not break up terms like > 1 / (x^2 + 1). About two years ago, I had to write a general > purpose routine to work around Apart's drawbacks. I call it > MyApart. It is embedded in the signal processing packages > for Mathematica and is used by the inverse z- and Laplace > transforms when Apart doesn't complete the decomposition. > MyApart is, of course, darn slow. I don't know if you want to do full (numeric) factorization ... which of one would want in a straight forward implementation of Z and Laplace transforms. But using apart on pieces that that can be separated by Gaussian integers is quite simple: In:= GApart[ r_ ] := Apart[ Numerator[ r ]/Factor[ Denominator[ r ], GaussianIntegers->True ] ] In:= GApart[ 17/((1 + x)(1 + x^2)) ] 17 17 I 17 17 I -(--) - ---- -(--) + ---- 4 4 4 4 17 Out= ------------ + ------------ + --------- -I + x I + x 2 (1 + x) //Roger