This self answer consists of three parts. In the first past we provide closed expression for the sum for all vaues of the parameter $x \gt 0$, the second part shows a close relation between the correct result and the wrong one returned by Mathematica, finally, I briefly discuss a well appreciated but wrong answer.
Looking for anWe start with deriving an integral representation usingof the sum.
Using the formula
which returns the condition x>1 and the (correct) expression si[x>1,n]
above.
Assumptions-> 0<x<1
returns But what happens in the remaining region of $x$?
Integrate[Log[1/z] (z^n - z^(n x))/(z - z^x), {z, 0, 1},
Assumptions -> 0 < x < 1]
(* Out (-PolyGamma[1, n/(-1 + x)] + PolyGamma[1, (n x)/(-1 + x)])/(-1 + x)^2 *)
At $x=1/2$ this gives
4 (-PolyGamma[1, -2 n] + PolyGamma[1, -n])
which is just as wrong as the generic result sg[x,n]
.
Hence also Integrate[]
has a similar bug as Sum[]
.
What's the remedy? Well, let usone idea is to just set x->1/2
before doing the integral:
ThisNow the result corresponds to the general correct formula (2)si[x,n].
This heuristic trick results ingives (2)si[x,n]
valid for 0<x<1
.
Comment on Soler's answerRelation between correct and wrong expression
§1 Soler's formula is wrong for almost any real n Let us compare these two expressions for $x = 2$
This answer received pretty much support from the community.
The main assertion refers to this formula
s0 = PolyGamma[1, 1 - 2 n] - PolyGamma[1, 1 - n] (* wrong *);
s1 = PolyGamma[1, n] - PolyGamma[1, 2 n] (* correct *);
and states: "Unless you explicitly state otherwise, Sum evaluates generically, ignoring specific conditions. In your case, the result for generic n is correct"
In fact the expression s0 is wrong for any positive integer n. Simpliy because it is divergent.
And here we show that the formula s0 is wrong almost everywhere.
In the first part I haves0
is returned by Mathematica, and it is wrong, as it leads to infinite values for positive integer n
, s1
was derived by analytic continuation, and it is true as it gives the formulacorrect values for positive integers n
.
s1 = PolyGamma[1, n] - PolyGamma[1, 2 n];
and provedFor brevity we shall say s0
is wrong if it to be true for positive integers ndoes not conincide with s1
.
So the problem can be decoupled from the divergence.
But we can derive the difference quite generally using the reflection formulareflection formula of the polygamma function (https://de.wikipedia.org/wiki/Polygammafunktion)
s1 - s0 = [Pi]^2/Sin[n [Pi]]^2 - [Pi]^2/Sin[2 n [Pi]]^2
s1 - s0 = \[Pi]^2/Sin[n \[Pi]]^2 - \[Pi]^2/Sin[2 n \[Pi]]^2
Hence s0s0
is incorrect for all real nn
except finitelycountably many values. This is sometimes stated as "almost always inccorect".
§2 The strange method of SolerComment on the strange answer of Soner
But let's nevertheless turn toI make this comment because this answer was pretty much appreciated by the "reasoning"community.
In spite of Solerthis support this answer is planily wrong, and this goes for the result as well as for the method.
The answer starts with the bold face line "it is not a bug", and then states: "Unless you explicitly state otherwise, Sum evaluates generically, ignoring specific conditions. In your case, the result for generic n is correct" and he quotes s0
.
In fact the expression s0 is wrong for any positive integer n. Simply because it is divergent. And we have furthermore shown that s0 is wrong almost everywhere.
But let's nevertheless turn to the "reasoning" of Soner:
The first step is clear: an expansion in nn
about the value n=10n=10
in question. To first order this yields
Now the magic (or was it perhaps meant as a test of the audience?): the author just throws away the divergent part (by suddenly applying an additional limit n->inf, remember that we were at n=10) and declare the rest as the value of the function.
It is interesting that the finite partSimply stated: this is indeed the value of the sum (the intimate relation between correct and incorrect formulas has been shown strictly using the reflection formula above) but the procedure applied here looks more like a joke to menot mathematics. With the same "method" youhe could as well "prove" that Zeta[1] = 0.