Consider the following:

a[m_, n_, x_] := 
    1/2^n (-1)^n/((2 n)!) Sum[Binomial[m, l] (m - 2 l)^(2 n), {l, 0, m}] x^(2 n)

a[m_, 0, x_] := 1

f[m_, x_] := Sum[a[m, n, x], {n, 0, Infinity}]

Indeterminate expression

I'm totally clueless why Mathematica fills in $0$ for $x$ while I feed it $x = 1$!

  • $\begingroup$ Please also copy the code into the text editor so that we can more easily test your code. $\endgroup$
    – tkott
    Mar 11, 2012 at 18:56

2 Answers 2


Since you define f[m_,x_] by Sum[a[m,n,x],{n,0,Infinity}] so there are terms in the sum like 0^0 because :

a[0,n,1]=1/2^n ((-1)^n)/((2n)!) Sum[Binomial[0,l] (0-2l)^(2n),{l,0,0}] x^(2n)

When there is a[0,n,1] you start the sum with Sum[Binomial[0,l] (0-2l)^(2n),{l,0,0}] and the first term in the definition of f[m_,x_] is with n==0.


To prevent generating of messages one can define a[m,n,x] and f[m,x] this way :

a[m_Integer, n_Integer, x_] /; n > 0 := 
  1/2^n (-1)^n/((2 n)!) Sum[ Binomial[m, l] (m - 2l)^(2n), {l, 0, m}] x^(2 n)
a[m_Integer, 0, x_] := 1
f[m_Integer, x_] := Sum[ a[ m, n, x], {n, 0, Infinity}]

It is not because of x, but because the Sum in the definition of a.

In[12]:= Sum[Binomial[m, l] (m - 2 l)^(2 n), {l, 0, m}] /. m -> 0

Out[12]= 0^(2 n)

Your Answer

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

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