| Kevin Ryde on Thu, 11 Dec 2014 09:38:05 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| polynomial partial fractions |
I had the urge to break some polynomial ratios into partial fractions.
I thought maybe a vector result of terms which sum to the original.
p = x^4 / ((1-x)*(1-2*x)*(1 - x - 2*x^3))
v = polynomial_crack_into_partial_fractions(p)
v == [ (1/2) / (1-x),
(1/2) / (1-2*x),
- (1 + (1/2)*x + x^2) / (1-x-2*x^3) ]
vecsum(v) == p
What would I look at for such a thing? I know how to build a matrix for
matsolve() to give the numerators, but perhaps this exists already.
I saw Henri Cohen's cohen.gp ratdec() but it seems to go polroots()
where I had in mind only going as far as can be factorized exactly over
complex or quadratics (so leave the cubic above unchanged). Could
supply the desired denominators if necessary.
--
No, eees hamster.