<s>[INST] Why are there complex numbers in the exact solution of $\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}$? Knowing that
\begin{align} 
\cot(z)=\frac{1}{z}-2z\cdot\sum_{n=1}^{\infty} \dfrac{1}{\pi^2n^2-z^2} 
\end{align}
we can easily calculate the value of
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^2+1}
\end{align}
by just plugging in $z=i\pi$. Therefore:
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^2+1}=\frac{1}{2}\cdot\left(\pi \coth(\pi)-1\right)
\end{align}
In this case, the "$i's$" cancel eachother out nicely. 
I also wanted to calculate the exact value of
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}
\end{align}
with an equal approach. After partial fraction decomposition:
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}=\frac{1}{2i}\left(\sum_{n=1}^{\infty}\dfrac{1}{n^2-i}-\dfrac{1}{n^2+i}\right)=\frac{1}{2i}\left(\sum_{n=1}^{\infty}\dfrac{1}{n^2-i}-\sum_{n=1}^{\infty}\dfrac{1}{n^2+i}\right)
\end{align}
By plugging in $z=\sqrt{i}\pi$ and $z=i\sqrt{i}\pi$, I arrive at:
\begin{align}
\frac{1}{2i}\left[\sum_{n=1}^{\infty}\dfrac{1}{n^2-i}-\sum_{n=1}^{\infty}\dfrac{1}{n^2+i}\right]&=\frac{1}{2i}\left[\frac{1}{2i}-\frac{\pi}{2\sqrt{i}} \cdot \cot(\sqrt{i}\pi)-\left(-\frac{1}{2i}-\frac{1}{2i\sqrt{i}}\cdot \cot(i\sqrt{i}\pi)\right)\right]=\\&=\frac{1}{4}\left[-2+\pi\sqrt{i}\cot(\sqrt{i}\pi)-\frac{\pi}{\sqrt{i}}\cot(i\sqrt{i}\pi)\right]
\end{align}
In this case I can't get completely rid of the "$i's$" and the exact value of
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}
\end{align}
is a complex number. But the answer must obviously be a real number.
Wolfram Alpha gets:
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}\approx0.57848+0.\times10^{-22}\,i
\end{align}
You now can argument that the imaginary part is negligible and so the value is a real number, but that doesn't satisfy my question, because there always will be a imaginary part in the answer.
If anyone can explain to me, why it is the case, that the exact value for
\begin{align}
\sum_{n=1}^{\infty} \dfrac{1}{n^4+1}
\end{align}
is a complex number, I would be very glad.
 [/INST] Define $t=\pi\sqrt{i}$ and $f(z):=z\cot(z)$.
Now $f(-z)=f(z)$ for all $z$ so $f(z)=g(z^2).$
Your result is
$$ S:=\sum_{n=1}^\infty\frac1{n^4+1} = \frac14\big[-2+f(t)+f(it)\big]
 = -1/2 + (g(i\pi^2)+g(-i\pi^2))/4.$$
Rewrite this as $ S = -1/2 + \Re g(i\pi^2)/2 \approx 0.57848 $ where
$\Re z$ is the real part of $z$.
</s>