I have the following function which I call FF[q_,y_,u_] and this function is well known to have a reasonable Taylor expansion in all three variables. For example, there are no negative powers of $q$, expanding $u$ around 1, there is at worst a second order pole $(u-1)^{-2}$, etc. However, when I try to implement and manipulate this expansion in Mathematica, I get very weird results. For example, when I try to run the following

FF[q_, y_, u_] := 
  (y^(-1))*(((1 - u)*(1 - (1/u))/((1 - (y)*(1/u))*(1 - u*y)))^(-1))* 
  ((QPochhammer[y*u, q]*QPochhammer[y^(-1)*u^(-1), q]* 
    QPochhammer[y*u^(-1), q]*QPochhammer[y^(-1)*u, q])/
   ((QPochhammer[u, q]^2)*(QPochhammer[1/u, q])^2));
FullSimplify[Series[FF[q, y, u], {u, 1, 2}, {q, 0, 1}, {y, 0, 1}]]

I get the mysterious error

"division by series with no coefficients in $\mathcal{O}(q^{87})$"

or something crazy.

I've tried changing the order in which I expand, but I still get this error. I get the same error when I try to isolate the coefficient of $(u-1)^{0}$:

SeriesCoefficient[FF[q, y, u], {u, 1, 0}]
FullSimplify[Series[%, {q, 0, 2}, {y, 0, 2}]]

My question is, what exactly is going on here? Is it something I'm doing, or a Mathematica glitch with regards to this specific function? And more generally, are there oddities one has to keep in mind when naively doing this series munging in Mathematica?

  • 3
    $\begingroup$ Series computes a Taylor expansion, not a Fourier series. Do you really want a Fourier series? $\endgroup$ – mikado Feb 26 '17 at 20:42
  • $\begingroup$ Ah I'm sorry, the original function was in terms of $\tau, z, t$ where my variables are related by $q=e^{2 \pi i \tau}, y= e^{2 \pi i z}, u = e^{2 \pi i t}$ so I think I do indeed want a Taylor expansion in the variables I used above. Once you've got everything in terms of $q,y,u$ it should be ordinary Taylor series. Sorry, I'll make the edit! $\endgroup$ – Benighted Feb 26 '17 at 20:54
  • 2
    $\begingroup$ Not sure what goes wrong, but reversing order of expansion seems to work well: Series[FF[q, y, u], {q, 0, 1}, {y, 0, 1}, {u, 1, 2}] $\endgroup$ – Daniel Lichtblau Feb 26 '17 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.