<s>[INST] About Inequalities of a series I have a question in an old exam that confused me: assuming that we have this equality for all $x\in \mathbb R$
$$\frac{1}{1+e^x}=\frac12-\sum_{n=0}^\infty\frac{2x}{x^2+(2n+1)^2\pi^2}$$
prove that for all $N\in \mathbb N$ and $x>0$
$$\frac1\pi\arctan\left(\frac{(2N-1)\pi}{x}\right)\le \phi_N(x)\le \frac1\pi\arctan\left(\frac{(2N+1)\pi}{x}\right)$$
where
$$\phi_N(x)=\frac{1}{1+e^x}+\sum_{n=0}^{N-1} \frac{2x}{x^2+(2n+1)^2\pi^2}.$$
So, what I tried so far: I know that
$$\phi_N(x)=\frac12-\sum_{n=N}^\infty\frac{2x}{x^2+(2n+1)^2\pi^2}$$
and I know that for $|x|<1$ we have
$$\arctan(x)=\sum_{n=0}^\infty \frac{(-1)^n}{2n+1}x^{2n+1}$$ and I can't find another idea. Any suggestion?
 [/INST] Hint:
Using MVT for integrals, we have
\begin{align*}
 \frac{2x}{x^2+(2n+1)^2\pi^2}
 &\ge \int_n^{n+1} \frac{2x}{x^2+(2t + 1)^2\pi^2}\, \mathrm{d} t\\
 &= \frac{1}{\pi}\arctan \frac{(2n + 3)\pi}{x} - \frac{1}{\pi}\arctan \frac{(2n + 1)\pi}{x}
\end{align*}
and
\begin{align*}
 \frac{2x}{x^2+(2n+1)^2\pi^2}
 &\le \int_n^{n+1} \frac{2x}{x^2+(2t - 1)^2\pi^2}\, \mathrm{d} t \\
 &= \frac{1}{\pi}\arctan \frac{(2n + 1)\pi}{x} - \frac{1}{\pi}\arctan \frac{(2n - 1)\pi}{x}.
\end{align*}
</s>