I'm running Mathematica 7.0.0 and came across this weird calculation (lines 1-14).
f[x_, r_] := x*(r - x)*Exp[-Pi*I/(2 r)*x^2]; g[x_, r_] := Exp[-Pi*I/(2 r)*x^2]*(r - Pi*I*x^2 - 2*x + Pi*I/r*x^3); int[r_] := FullSimplify[ Integrate[f[x, r], {x, 0, r}] + Integrate[-Sum[Sin[2*Pi*n*x]/(n*Pi), {n, 1, Infinity}]* g[x, r], {x, 0, r}], r > 0 && Element[r, Integers]]; int[r] // N int[12] // N Output: 0. 2.64102 - 39.4256 I
So I've got two functions, $f$ and $g = f'$, and I'm interested in a certain expression (as shown). However, the general expression that Mathematica 7 gives for positive integers $r$ is $0$, whereas it gives something non-zero for particular integers $r$ (as it should).
Can somebody with Mathematica 8 verify this or tell me why I shouldn't be surprised? Thanks.