4
$\begingroup$

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$!

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

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.

Edit

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}]
$\endgroup$
9
$\begingroup$

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)
$\endgroup$

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.