Estimating a sum Good morning everyone,
I would like to make a question about estimating a sum.
Consider the following sum 
$$S_n:=\sum_{k=0}^{n-1} \frac{k^2}{(n-k)^2 (n+k)^2}  $$
 It is easy to see that  this sum is bounded by $\sum_{k=0}^{n-1} \frac{1}{(n-k)^2} \leq \frac{\pi^2}{6}$ for all $n$. But i would like to know more precisely about the behavior of $S_n$ as a function in $n$?
In this case, apparently, the Riemann sum method does not work. Indeed, if we rewrite $S_n$ as follows 
\begin{align}
S_n& = \frac{1}{n^2} \sum_{k=0}^{n-1} \dfrac{(\frac{k}{n})^2}{\left(1-\left(\frac{k}{n}\right)^2\right)^2} \\
& \leq \frac{1}{n}\int_0^1 \frac{x^2}{(1-x^2)^2} dx
\end{align}
Then, we will get stuck with a divergent integral which blows up near $1$.
 A: Actually the sum can be done in "closed form", and its asymptotics follow from the known asymptotics of the Digamma function and its derivatives.  According to Maple
$$\eqalign{S_n &= 1/24\,{\pi }^{2}-1/4\,{\frac {\gamma}{n}}-1/4\,\Psi \left( 1,2\,n
 \right) -1/4\,{\frac {\Psi \left( 2\,n \right) }{n}}-1/4\,\Psi
 \left( 1,n+1 \right) -1/4\,{\frac {\Psi \left( n+1 \right) }{n}}+1/4
\,\Psi \left( 1,n \right) +1/4\,{\frac {\Psi \left( n \right) }{n}}\cr
&= 1/24\,{\pi }^{2}+{\frac {-\gamma/4-1/8-1/4\,\ln  \left( 2 \right) -1/4
\,\ln  \left( n \right) }{n}}+1/32\,{n}^{-2}+{\frac {1}{7680\,{n}^{5}}
}-{\frac {1}{32256\,{n}^{7}}}+O \left( {n}^{-8} \right) 
\cr}$$
EDIT:  Letting $j = n-k$, the sum becomes
$$ S_n = \sum_{j=1}^n \dfrac{(n-j)^2}{j^2 (2n-j)^2} = \sum_{j=1}^n \left(\dfrac{1}{4j^2} - \dfrac{4n-3j}{4j(2n-j)^2}\right) < \sum_{j=1}^n \dfrac{1}{4j^2}$$ 
so we immediately have $S_n < \frac{1}{4} \sum_{j=1}^\infty \frac{1}{j^2} = \frac{\pi^2}{24}$.  On the other hand, since
$$ \dfrac{4n-3j}{4j(2n-j)^2} < \dfrac{1}{4jn}$$
we get $$S_n > \dfrac{1}{4} \sum_{j=1}^n \dfrac{1}{j^2} - \dfrac{1}{4n} \sum_{j=1}^n \dfrac{1}{j} = \dfrac{\pi^2}{24} - \dfrac{\ln (n)}{4 n} + O(1/n)$$
A: There is a more elementary way of getting the answer. The partial fraction expansion of the summand is:
$$
\frac{1}{4 k (k+n)}+\frac{1}{4 (k+n)^2}-\frac{1}{4 k (n-k)}+\frac{1}{4 (n-k)^2}
$$
The last term clearly converges to $\zeta(2)/4 = \frac{\pi^2}{24}.$ The second term sum clearly converges to zero. The sum of the first and third terms equals
$$-\frac12 \frac{1}{n^2-k^2},$$ which, by changing the variable to $k = n-l$ (or just directly integrating) is seen to go to zero.
A: The Riemann sum method works fine, if you realize that you are integrating from $0$ to $1-1/n.$ The indefinite integral (according to Mathematica) is:
$$
\frac{1}{4} \left(-\frac{2 x}{x^2-1}+\log (1-x)-\log (x+1)\right),
$$
so vanishes at $0,$ which makes the definite integral
$$
\frac{(n-1) n}{4 n-2}-\frac{1}{4} \log (2 n-1)
$$
