How to calculate this sum $$\sum^\infty\_{n=0}\frac{1}{n^4+n^2+1}.$$
Thank you in advance



Closed formula for this sum $\sum^\infty_{n=0}\frac{1}{n^4+n^2+1}.$
$\newcommand{\Ga}{\Gamma}$Martin Sleziak gave references to several answers to this question. All of those answers seem to involve complex analysis.


Here is how this sum can be evaluated (almost) without complex analysis: Using partial fraction decomposition, as e.g. in [this answer](https://math.stackexchange.com/a/966977/96609), we reduce the problem to that of finding two sums of the form
\begin{equation}
 s:=\sum\_{n=0}^\infty\Big(\frac1{n+a}-\frac1{n+b}\Big)
\end{equation}
for certain complex $a$ and $b$ not in the set $\{0,-1,-2,\dots\}$.
We have
\begin{equation}
\begin{aligned}
 s&=\sum\_{n=0}^\infty\int\_0^1 dx\,(x^{n+a-1}-x^{n+b-1}) \\ 
 &=\int\_0^1 dx\,\sum\_{n=0}^\infty(x^{n+a-1}-x^{n+b-1}) \\ 
 &=\int\_0^1 dx\,\frac{x^{a-1}-x^{b-1}}{1-x}=\lim\_{h\downarrow0}I(h), 
\end{aligned}
\end{equation}
where
\begin{equation}
\begin{aligned}
I(h)&:=\int\_0^1 dx\,\frac{x^{a-1}-x^{b-1}}{(1-x)^{1-h}} \\ 
&=\frac{\Ga(a)\Ga(h)}{\Ga(a+h)}-\frac{\Ga(b)\Ga(h)}{\Ga(b+h)} \\ 
&=\frac{\Ga(a)\Ga(b+h)-\Ga(b)\Ga(a+h)}{h}\,\frac{\Ga(1+h)}{\Ga(a+h)\Ga(b+h)} \\ 
&\to\frac{\Ga(a)\Ga'(b)-\Ga(b)\Ga'(a)}{\Ga(a)\Ga(b)}
\end{aligned}
\end{equation}
as $h\downarrow0$, by l'Hospital's rule.


So,
\begin{equation}
 \sum\_{n=0}^\infty\Big(\frac1{n+a}-\frac1{n+b}\Big)
 =\frac{\Ga(a)\Ga'(b)-\Ga(b)\Ga'(a)}{\Ga(a)\Ga(b)}
 =\psi(b)-\psi(a), 
\end{equation}
where $\psi:=\Ga'/\Ga$ is the digamma function.




---


Another elementary way to find the sum is as follows: For natural $N$,
\begin{equation}
\begin{aligned}
\sum\_{n=0}^{N-1}\frac1{n+a}&=\frac d{da}\sum\_{n=0}^{N-1}\ln(n+a) \\ 
&=\frac d{da}\ln\prod\_{n=0}^{N-1}(n+a) \\ 
&=\frac d{da}\ln\frac{\Ga(N+a)}{\Ga(a)}=\psi(N+a)-\psi(a). 
\end{aligned}
\end{equation}
So,
\begin{equation}
\begin{aligned}
&\sum\_{n=0}^\infty\Big(\frac1{n+a}-\frac1{n+b}\Big) \\ 
&=\lim\_{N\to\infty}\Big(\sum\_{n=0}^{N-1}\frac1{n+a}-\sum\_{n=0}^{N-1}\frac1{n+b}\Big) \\ 
&=\psi(b)-\psi(a)+\lim\_{N\to\infty}(\psi(N+a)-\psi(N+b)) \\ 
&=\psi(b)-\psi(a). 
\end{aligned}
\end{equation}


