# Evaluating sums using residues $(-1)^n/n^2$ [duplicate]

I am an alien towards compelx analysis, with very little know I am posing a question, who someone may want to help with.

Evaluate:

$$\frac{1}{4}\cdot \sum_{n=1}^{\infty} \frac{(-1)^n}{n^2}$$

In disguise this is similar to $\zeta(2)$ but how can this be done using residues, and complex analysis?

I need some help. I am just interested.

The answer is $\displaystyle \frac{\pi^2}{48}$

## marked as duplicate by Jack D'Aurizio, Ahaan S. Rungta, user98602, Aditya Hase, Pedro Tamaroff♦ calculus StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Dec 21 '14 at 22:12

• en.wikipedia.org/wiki/Dirichlet_eta_function – Gahawar Dec 19 '14 at 14:55
• The solution for $\zeta(2)$ given by robjohn in the above linked Question lends itself to an answer here, but a bit more reasoning is needed to reduce the case of alternating signs here to the absolute series for $\zeta(2)$. It's not hard however. – hardmath Dec 19 '14 at 15:31
• If the answer is supposed to be positive, you need either $-\frac14$ before the sum or $(-1)^{n-1}$ in the numerator of the fraction. – robjohn Dec 21 '14 at 22:30
• @robjohn, a friendly request to you, since you are amazing at complex analysis. Would you have time to answer this question from me: math.stackexchange.com/questions/1077460/… – Amad27 Dec 22 '14 at 10:24

Using $\boldsymbol{\pi\csc(\pi z)}$

Since $\pi\csc(\pi z)$ has residue $(-1)^n$ at $z=n$ for $n\in\mathbb{Z}$, we will use the contours $$\gamma_\infty=\lim\limits_{R\to\infty}Re^{2\pi i[0,1]}\qquad\text{and}\qquad\gamma_0=\lim\limits_{R\to0}Re^{2\pi i[0,1]}$$ To sum over all $n\in\mathbb{Z}$ except $n=0$, we use the difference of the contours, which circles the non-zero integers once counter-clockwise. \begin{align} 2\sum_{n=1}^\infty\frac{(-1)^n}{n^2} &=\frac1{2\pi i}\left(\int_{\gamma_\infty}\frac{\pi\csc(\pi z)}{z^2}\mathrm{d}z-\int_{\gamma_0}\frac{\pi\csc(\pi z)}{z^2}\mathrm{d}z\right)\\ &=\color{#C00000}{\frac1{2\pi i}\int_{\gamma_\infty}\frac{\pi\csc(\pi z)}{z^2}\mathrm{d}z}-\operatorname*{Res}_{z=0}\left(\color{#00A000}{\frac{\pi\csc(\pi z)}{z^2}}\right)\\ &=\color{#C00000}{0}-\operatorname*{Res}_{z=0}\left(\color{#00A000}{\frac1{z^2}\frac\pi{\pi z-\pi^3z^3/6+O\left(z^5\right)}}\right)\\ &=\color{#C00000}{0}-\operatorname*{Res}_{z=0}\left(\color{#00A000}{\frac1{z^3}+\frac{\pi^2}{6z}+O(z)}\right)\\ &=-\frac{\pi^2}6 \end{align} because, for $k\in\mathbb{Z}$ and $|z|=\pi\left(k+\frac12\right)$, $|\csc(z)|\le1$.

Therefore, $$\sum_{n=1}^\infty\frac{(-1)^n}{n^2}=-\frac{\pi^2}{12}$$

Extending A Previous Result

In this answer, it is shown that $$\sum_{k=1}^\infty\frac1{k^2}=\frac{\pi^2}6$$ Note that \begin{align} \hphantom{=}&\frac1{1^2}{+}\frac1{2^2}+\frac1{3^2}{+}\frac1{4^2}+\frac1{5^2}{+}\frac1{6^2}+\frac1{7^2}+\dots\\ \hphantom{=}&\hphantom{\frac1{1^2}}\color{#C00000}{-\frac2{2^2}\hphantom{+\frac1{3^2}}-\frac2{4^2}\hphantom{+\frac1{5^2}}-\frac2{6^2}\hphantom{+\frac1{7^2}}-\dots}\\ =&\frac1{1^2}{-}\frac1{2^2}+\frac1{3^2}{-}\frac1{4^2}+\frac1{5^2}{-}\frac1{6^2}+\frac1{7^2}-\dots \end{align} where the series in red is two times one quarter of the series above it; that is, one half of the series above it. Therefore, the alternating series is one half of the non-alternating series; that is, $$\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2}=\frac{\pi^2}{12}$$

• I thought this looked familiar. I see that I have also posted this answer to the question to which this one was marked as a duplicate. Now that I look closer, this question is not really a duplicate of that one since this question asks about the alternating series. Granted, it is not too difficult to derive the alternating series from the non-alternating series, but a bit of extra work is needed. – robjohn Dec 21 '14 at 22:39
• Good answer. How did you convert the sum into a contour integral though? – Amad27 Dec 22 '14 at 9:37
• @Amad27: The function $\pi\csc(\pi z)$ has singularities exactly on $\mathbb{Z}$ with residue $(-1)^n$ at $z=n\in\mathbb{Z}$. Thus, $\frac{\pi\csc(\pi z)}{z^2}$ also has singularities exactly on $\mathbb{Z}$ with residue $\frac{(-1)^n}{n^2}$ at $z=n\in\mathbb{Z}$. The difference of the contour integrals along $\gamma_\infty$ and $\gamma_0$ equals $2\pi i$ times the sum of the residues inside $\gamma_\infty$ but outside $\gamma_0$. This is $4\pi i$ times the sum we are looking for. We don't need to worry about the residue at $z=0$ since it is not inside the difference of the contours. – robjohn Dec 22 '14 at 10:49
• May I know that why $\csc z \leq 1$ when $|z|=k+1/2$? – mnmn1993 Mar 7 '18 at 17:59

For a complex variable $s$, whose real part is greater than zero, the Dirichlet eta function is defined by the series $$\eta(s) := -\sum_{n=1}^{\infty} \frac{(-1)^n}{n^s}.$$

In particular, one has that

$$\eta(s) = \left(1-2^{1-s}\right)\zeta(s),$$

where $\zeta$ denotes the Riemann zeta function. With that in mind, one need only substitute $s=2$ into the above equation. I presume that you are familiar with the famed Basel problem.

• Also, this does not really meet the requirements that it be done through the methods of complex analysis, but I suppose that, since $\zeta(2)$ has already been found through such methods on this site, it is fine. – Gahawar Dec 19 '14 at 15:09