I have given a large expression expr
(has LeafCount
of 2772
, you can find it in this file or on this github page as plain text) in four variables x,y,z,w
and a prescription to take residues in each variable from left to right in succession (so, take series coefficient of x^(-1)
, then of y^(-1)
of what remains, etc.), until all variables are gone and we are left with a pure number. So I start with:
first = SeriesCoefficient[expr, {x, 0, -1}];
Which gives a result in just a few seconds. However, unfortunately this result has LeafCount
of 870786
, so that when I start the second step
second = SeriesCoefficient[first, {y, 0, -1}];
it takes forever and never finishes calculating. I tried such things like expanding the initial expression and sequencing the calculation in pieces (takes even longer). I also tried to analytically write down the possible expansion coefficients of these pieces, and compose the residues analytically (takes almost just as long). At the end I still cannot get the second step to give a result.
I ran out of ideas. Is there something else I could try to obtain the result here? Maybe even something numerical (as in floating point)? Thanks for any suggestion!
EDIT
There was a concern about downloading files, so I saved the expression at github. You can see it as plain text here and copy and paste it to your own mathematica notebook.
(x*y*z*w)^(-1)
. Or am I simply looking at this all wrong? $\endgroup$ – Daniel Lichtblau Dec 6 '15 at 23:35(xyzw)^(-1)
, but instead we are first computing coefficient ofx^(-1)
, then coefficient ofy^(-1)
of what remains, and so on. Expanding the numerator and taking just the first term as an example will compute quickly and show that the results are different compared to just thinking of(xyzw)^(-1)
. $\endgroup$ – Kagaratsch Dec 7 '15 at 16:06