Bug in splitting sum
There is a symbolic calculation bug in there:
Let's define:
plus[k_, m_] := f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])];
minus[k_, m_] := f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])];
While
(With[{m = 60}, Sum[minus[k, m], {k, 1, -1 + m, 2}]] // N) ==
(Sum[minus[k, m], {k, 1, -1 + m, 2}] /. m -> 60 // N)
(* True *)
on the other hand:
(With[{m = 60}, Sum[plus[k, m], {k, 1, -1 + m, 2}]] // N) ==
(Sum[plus[k, m], {k, 1, -1 + m, 2}] /. m -> 60 // N)
(* False *)
So the term with the HurwitzZeta[ ..]
functions is in error.
This is interesting! Here's a partial answer (so more of a long comment):
Clear[f]
f[x_] = x^2;
Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}]
and the output is:
whereas
Sum[f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}]
doesn't evaluate (i.e. it returns itself), and
Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])] + f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}]
(* -(1 + Floor[1/2 (-2 + m)]) (-2 - 2 m - m^2 + 2 Floor[1/2 (-2 + m)]) *)
You will note that if you set the terms with the HurwitzZeta
function to zero, then these two expressions are identical up to a factor of 1/2
. The HurwitzZeta
functions would cancel each other out if the arguments for two of those functions didn't have the Floor[m/2]
pieces in them.
Now, if we evaluate the sums symbolically first (the 2/m
doesn't make a difference), we get
Clear[f, f1]
f1 = Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])] +
f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}];
f1 = f1 /. m -> 60 // Expand;
f[x_] = x^2;
f1 // N
(* 109920. *)
and
Clear[f]
f1 = Sum[f[1/2 (2 + m + Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}] +
Sum[f[1/2 (2 + m - Sqrt[4 - 4 k + m^2])], {k, 1, -1 + m, 2}];
f1 = f1 /. m -> 60 // Expand;
f[x_] = x^2;
f1 // N
(* 109920. *)
which indicates to me that they should be equal.
On the other hand,
Sum[(1/2 (2 + 60 + Sqrt[4 - 4 k + 60^2]))^2 + (1/2 (2 + 60 - Sqrt[4 - 4 k + 60^2]))^2, {k, 1, -1 + 60, 2}] // N
Sum[(1/2 (2 + 60 - Sqrt[4 - 4 k + 60^2]))^2, {k, 1, -1 + 60, 2}] +
Sum[(1/2 (2 + 60 - Sqrt[4 - 4 k + 60^2]))^2, {k, 1, -1 + 60, 2}] // N
(* 109920 *)
(* 71.3744 *)
I perhaps suspect a bug. However, I also suspect that if the second sum evaluated, it would have terms that would cancel the HurwitzZeta
functions in the first term, so perhaps it's instead some sort of problem there.