When given a single variable sequence, GeneratingFunction is automatically expressed in the most "direct form", for example,

GeneratingFunction[(i + 1) v[i - 1], i, x]

returns something like

2 x GeneratingFunction[v[i], i, x] + v[-1] + x^2 D[GeneratingFunction[v[i], i, x],x]

But, if I add an extra variable that does not otherwise affect the result

GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}]

then the function is not evaluated in the same way, although, it would seem that it would be correct to return

2 x GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}] + v[-1,j]
 + x^2 D[GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}],x]

what is happening here, how can I make it behave in a way that would fit this intuition?


If you don't include j or y in GeneratingFunction[], then you get something like what you want:

GeneratingFunction[(i + 1) v[i - 1, j], i, x]
   2 x GeneratingFunction[v[i, j], i, x] + v[-1, j] +
   x^2 Derivative[0, 0, 1][GeneratingFunction][v[i, j], i, x]

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.