# Finding consecutive residues of large expression?

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.

• Can you paste the expression (or a subset that allows reproduction) directly into the question here? That might be more convenient and potentially less insecure than downloading. – Yves Klett Dec 4 '15 at 6:53
• @YvesKlett I have added a link to github where the expression is shown in plain text that can be copied to a mathematica notebook. I hope that solves the safety concerns? – Kagaratsch Dec 4 '15 at 14:12
• The minimum total degree appearing in the numerator is, if I computed correctly, 33. The min total degree in denominator is 5. So it seems that all terms in a series expansion will have total degree larger than 4, which means there should be no term in (x*y*z*w)^(-1). Or am I simply looking at this all wrong? – Daniel Lichtblau Dec 6 '15 at 23:35
• The denominator produces extra poles in later variables once the residue in an earlier variable has been taken. Therefore, we are not just looking for the coefficient of (xyzw)^(-1), but instead we are first computing coefficient of x^(-1), then coefficient of y^(-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). – Kagaratsch Dec 7 '15 at 16:06