Deducing closed form of series In a past exam question we prove that the following function is well-defined and holomorphic on $\mathbb{C}$ \ $\mathbb{Z}$, and then we are asked to find the closed form. Let
$$
f(z)=\sum_{n=-\infty}^{\infty}\frac{1}{(z+n)^2}.
$$
The mark scheme says:

We have that $f$ is periodic as $f(z) = f(z+2) \forall z$. See that $f(z)$ has double poles at every integer with residue $(-1)^k$.


$(*)$ Note that $f(z) = −g'(z)$, where $g(z)$ has single poles with residue $(−1)^k$ at each integer.
Then by periodicity it follows that $g(z) = \frac{\pi}{sin(\pi z)}$ and we obtain $f$ by differentiating.

I honestly have no idea why this argument is right. I can see why $f$ is periodic and its residues are as given but everything from $(*)$ is not resonating.
Any help in understanding this would be great! Thanks
 A: What you wrote is very odd, it suggests a lot of confusion. First of all this is not a Laurent series, the terminology is "Mittag Leffler expansion".
Looking only at the poles and the periodicity is not enough, compare $\frac{\pi^2}{\sin^2(\pi z)}$ with  $\frac{\pi^2}{\sin^2(\pi z)}+e^{2i\pi z}-e^{4i\pi z} $
The obvious solution is to say that $$\frac{\pi^2}{\sin^2(\pi z)}-\sum_n \frac1{(z+n)^2}$$ is a $1$-periodic entire function vanishing as $\Im(z)\to \pm\infty$ on $\Re(z)\in [0,1]$. This implies that it is bounded, constant, and identically zero.
A: I guess some of the information is not properly copied.
This looks to me like the following well known calculation.
You start with Euler's infinite product formula for $\sin$:
$$\frac{\sin(\pi z)}{\pi z} = \prod_{n = 1}^\infty (1 - \frac{z^2}{n^2})$$ and take $\log$ then $\frac d{dz}$ on both sides to get
$$\pi \cot(\pi z) = \frac 1z + \sum_{n = 1}^\infty\left(\frac1{z - n} + \frac1{z + n}\right).$$
Taking $\frac d{dz}$ again gives $$\frac{\pi^2}{\sin^2(\pi z)} = \sum_{n = -\infty}^\infty \frac 1{(z + n)^2}.$$
This procedure appears e.g. in GTM 97, Introduction to Elliptic Curves and Modular Forms, by Neal Koblitz, in Chapter III, page 110.
