Bug introduced in 9.0 or earlier and fixed in 11.0.0
In:
D[Sum[Sin[x],x],x]
D[Sum[f[x],x],x]
Out:
1/2 Cos[1/2 (-1 - Pi + 2 x)] Csc[1/2]
0
Function f is undefined, but Mathematica 9 counts it as constant?
Mathematica 8 returns
Probably this is just a bug. Especially since it "works" in 8. You could fix it by doing
SetOptions[D, NonConstants -> {Sum}]
first, or by putting this in your init.m file.
D[Sum,x] == 0
to be True
, wouldn't you?
$\endgroup$
Sin[x]
it simplifies it first to the expression dependent of x. So it's not a bug. $\endgroup$Sum[f[x],x]
is the same asSum[f[y],{y,0,x-1}]
. But without specifying the limits it's not a function, because x is an index variable not an upper limit. $\endgroup$D[Sum[Sin[x],x],x]
has a nonzero value, thenD[Sum[f[x],x],x]
cannot be zero in general, since we might havef==Sin
. $\endgroup$