1. 2014

    Another Mathematica bug

    Math is hard.

    Not for Barbie, but for Mathematica.

    I ran into a weird Mathematica bug while trying to evaluate the sum

    $$\sum_{k=1}^{\infty} \biggl[-\frac{\pi^2}{6} + \psi'(k + 1) + H_k^2\biggr]\frac{z^k}{k!}$$

    Split this into three parts. The first one is the well-known expansion of the exponential function

    $$-\frac{\pi^2}{6}\sum_{k=1}^{\infty} \frac{z^k}{k!} = -\frac{\pi^2}{6}(e^z - 1)$$

    The second is not the well-known expansion of the exponential function.

    $$\sum_{k=1}^{\infty} \psi'(k + 1)\frac{z^k}{k!} \neq \frac{\pi^2}{6}(e^z - 1)$$

    Obviously not, in fact, since if two power series are equal, \(\sum_i a_n z^n = \sum_i b_n z^n\), for an infinite number of points, each of their coefficients have to be equal: \(\forall n,\ a_n = b_n\). (You can show this by taking the difference of the two sides and plugging in a bunch of different values of \(z\).)

    I guess Mathematica doesn’t know that.

    In[1] = Sum[PolyGamma[1, k + 1] z^k/k!, {k, 1, Infinity}]
    Out[1] = 1/6(-1 + E^z)Pi^2

    I had my hopes up for …