Evaluating the infinite and partial sum of an alternating series The inspiration comes from a physical problem. Let's focus on the non-negative half of the number axis -- so we are studying a 1D system. We put 1 unit positve charge on "site" 0, then a unit negative charge on site 1, then a unit positive charge on site 2, ... See figure below.

The question is what's the force on the zeroth charge (the left most one). More specifically,


*

*what's the total force if we are considering all the charges. (the infinite sum)

*what's the partial force if we are considering forces exerted by the first N charges, here N excludes the 0th charge. (the partial sum)


The physics is just Columb's law. We neglect all physical constants, and since all charges are unit, we have the force expressed as a series
$$
F(N) = \sum_{n=1}^N \frac{(-1)^{n-1}}{n^2}
$$
A plot in Mathematica shows $F(100)$ is well converged and is about $0.82242$. But I am sure someone has more elegant analysis. I myself did a lousy approximation by "spreading" a charge into an interval as
$$
\frac{\pi}{2} {\cos(\pi x)}
$$
$F(N)$ is then approximated by an integration.
$$
F(N) \sim -\frac{\pi}{2} \int_{1/2}^{N+1/2} \frac{\cos(\pi x)}{x^2} dx
$$
This approximation is very crude and for the infinite sum, it gives $F(\infty) \sim 0.98713$ - not bad, but not good either.
 A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\mrm{F}\pars{N} & \equiv \sum_{n = 1}^{N}{\pars{-1}^{n - 1} \over n^{2}} =
\sum_{n = 1}^{\infty}{\pars{-1}^{n - 1} \over n^{2}} -
\sum_{n = 1}^{\infty}{\pars{-1}^{n + N - 1} \over \pars{n + N}^{2}}
\\[5mm] & =
-\,\mrm{Li}\pars{-1} - \pars{-1}^{N}
\braces{{1 \over 4}\bracks{\zeta\pars{2,{1 \over 2}\,N + {1 \over 2}} -
\zeta\pars{2,{1 \over 2}\,N + 1}}}
\\[5mm] & =
{\pi \over 12} - {1 \over 4}\,\pars{-1}^{N}
\bracks{\zeta\pars{2,{1 \over 2}\,N + {1 \over 2}} -
\zeta\pars{2,{1 \over 2}\,N + 1}}
\end{align}

$\ds{\zeta\pars{s,a}}$ is the
  Hurwitz Zeta Function. It has the following asymptotic behaviour:

$$
\zeta\pars{2,a} \sim {1 \over a}\quad\mbox{as}\ a \to \infty
$$

Then,
\begin{align}
\mrm{F}\pars{N} & \equiv \sum_{n = 1}^{N}{\pars{-1}^{n - 1} \over n^{2}} \sim
{\pi^{2} \over 12} - {1 \over 4}\,\pars{-1}^{N}\pars{{1 \over N/2 + 1/2} - {1 \over N/2 + 1}}
\\[5mm] & \sim 
\bbx{\ds{{\pi^{2} \over 12} - {\pars{-1}^{N} \over 2N^{2}}\quad\mbox{as}\ N \to \infty}}
\end{align}
A: Here is another way to evaluate the series $S=\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2}$ in closed form without appealing to special functions or complex-plane analysis.  Rather, we transform the series to an integral that we can evaluate using standard methodologies.   
We begin by recasting $S$ as 
$$\begin{align}
\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2}&=\sum_{n=1}^\infty\left(\frac{1}{(2n-1)^2}-\frac1{(2n)^2}\right)\\\\
&=\sum_{n=1}^\infty\left(\frac{1}{(2n-1)^2}+\frac1{(2n)^2}\right)-\frac12\sum_{n=1}^\infty\frac{1}{n^2}\\\\
&=\frac12\sum_{n=1}^\infty\frac{1}{n^2}\tag 1
\end{align}$$
Next, we make use of the identity $\frac1n=\int_0^1x^{n-1}\,dx$ to write
$$\begin{align}
\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2}&=\frac12\sum_{n=1}^\infty\int_0^1x^{n-1}\,dx\int_0^1y^{n-1}\,dy\\\\
&=\frac12\int_0^1\int_0^1\sum_{n=1}^\infty(xy)^{n-1}\,dx\,dy\\\\
&=\frac12\int_0^1\int_0^1 \frac{1}{1-xy}\,dx\,dy\tag 2
\end{align}$$

In THIS ANSWER, I used the straightforward coordinate transformation $x=s+t$, $y=s-t$ to evaluate the integral on the right-hand side of $(2)$.  
This transformation leads to integrals for which anti-derivatives can be written in terms of elementary functions.  The final result is

$$\bbox[5px,border:2px solid #C0A000]{\sum_{n=1}^\infty\frac{(-1)^{n-1}}{n^2}=\frac{\pi^2}{12}}$$

as was expected!
