I have a simple double sum as function:

u[m_, n_] = Sum[m^M/M! * n^N/N!, {M, 0, Infinity}, {N, 0, M - 1}]

and would like to compute the partial derivatives.

D[u[m, n], m]

I can't get the output neatly here, but it basically gives me (with correct indices on the summations)

$$ \left(\sum \sum \frac{m^{M-1}M n^N}{M! N!}\right)[m, n] + \left(\sum \sum \frac{m^{M} n^N}{M! N!}\right)^{(1, 0)}[m, n]$$

I would have thought that the first term would be the correct answer. I looked up the $(1, 0)$ notation and it apparently means "partial derivative w.r.t. the first input" - but isn't that exactly what I've put in here?

How am I supposed to understand this result?

  • 1
    $\begingroup$ Might be better to differentiate the summand instead of the sum. Also, avoid using N since it is a built-in function. $\endgroup$ Jul 27, 2017 at 11:52
  • 1
    $\begingroup$ I only seem to get the first term ( OSX) $\endgroup$
    – Ruud3.1415
    Jul 27, 2017 at 11:55

1 Answer 1


I think you got the wrong result because you evaluated some code that is different from what included in the question. I think you used:

u = Sum[m^M/M! * n^N/N!, {M, 0, Infinity}, {N, 0, M - 1}]

and forgot to Clear[u].

To differentiate appropriately you need Inactive[Sum] and replace the built in N by e.g. esc N esc.

u[m_, n_] = Sum[m^M/M!*n^Ν/Ν!, {M, 0, Infinity}, {Ν, 0, M - 1}]
uSym[m_, n_] = Inactive[Sum][m^M/M!*n^Ν/Ν!, {M, 0, Infinity}, {Ν, 0, M - 1}]
uDm[m_, n_] = Activate[D[uSym[m, n], m]];

$\sum _{M=0}^{\infty } \sum _{Ν=0}^{M-1} \frac{M m^{M-1} n^Ν}{M! Ν!}$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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