Calculate $\sum_{n=2}^{\infty}\left (n^2 \ln (1-\frac{1}{n^2})+1\right)$ I am interested in evaluating
$$\sum_{n=2}^{\infty}\left (n^2 \ln\left(1-\frac{1}{n^2}\right)+1\right)$$
I am given the solution for the question is $\,\ln (\pi)-\frac{3}{2}\,.$
$$\sum_{n=2}^{\infty}\left(n^2\ln\left(\!1\!-\!\frac{1}{n^2}\!\right)+1\right)=4\ln\left(\!\frac{3}{4}\!\right)+1+9\ln\left(\!\frac{8}{9}\!\right)+1+\ldots$$
Any tricks to solve it?

(I have partially copied @Hamdiken's answer to make it more complete)
Define the sum
$$S(x):=\sum_{n=2}^{\infty}\left(n^2\ln\left(1-\frac{x^2}{n^2}\right)+x^2\right)$$
and differentiate with respect to $x$ to obtain
\begin{align*}
S'(x)=\sum_{n=2}^{\infty}\left(-2x{\frac{n^2}{n^2-x^2}}+2x\right)
&=2x\sum_{n=2}^{\infty}\left({\frac{n^2}{x^2-n^2}}+1\right)\\
&=2x\sum_{n=2}^{\infty}\left({\frac{n^2+x^2-n^2}{x^2-n^2}}\right)\\
&=x^2\left[2x \sum_{n=2}^{\infty}{\frac{1}{x^2-n^2}}\right]\\
&=\pi x^2\left[2\pi x \sum_{n=2}^{\infty}{\frac{1}{(\pi x)^2-(\pi n)^2}}\right]\\
&=\pi x^2\left[-\frac{2x}{\pi(x^2-1)}-\frac{1}{\pi x}+\underbrace{\frac{1}{\pi x}+2\pi x \sum_{n=1}^{\infty}{\frac{1}{(\pi x)^2-(\pi n)^2}}}_{\cot(\pi x)}{}\right]\\
\end{align*}
by the Mittag-Leffler pole expansion of $\cot(\pi x)$.
We finally get that
$$S'(x)=-x+\left(\pi x^2\cot(\pi x)-\frac{2x^3}{x^2-1}\right)$$
Upon integrating, we determine
$$S(x)=-\frac{x^2}2+\int_0^x\left(\pi t^2\cot(\pi t)-\frac{2t^3}{t^2-1}\right)\,dt$$
For $x=1$, we get
$$S(1)=-\frac{1}{2}+\int_0^1\left(\pi t^2\cot(\pi t)-\frac{2t^3}{t^2-1}\right)\,dt\stackrel{t\to 1-t}{=}-\frac{3}{2}-\ln(2)+\int_{0}^{1} \left(\frac{1}{t} -\pi (1-t)^2\cot(\pi t)\right)\, dt
$$
Now by the Laurent series for $\cot(\pi x)$, namely, $$\cot(\pi x) = \frac{1}{\pi x} - \frac{2}{\pi x} \sum_{k=1}^{\infty}\zeta(2k) x^{2k}$$
we have $$S(1)=-\ln(2)+\sum_{k=1}^{\infty}\frac{\zeta(2k)}{k(k+1)(2k+1)}$$
Now since for $\Re(s)>1$ we have the following Mellin transform $$\zeta(s)\Gamma(s)=\int_{0}^{\infty}\frac{x^{s-1}}{e^x-1}\,dx$$ we get $$S(1)=-\ln(2)+\int_{0}^{\infty}\frac{1}{e^x-1}\sum_{k=1}^{\infty}\frac{x^{2k-1}}{\Gamma(2k)k(k+1)(2k+1)}=-\ln(2)-2\int_{0}^{\infty}\frac{2+x^2-2\cosh(x)}{x^3(e^x-1)}\,dx$$
We shall now evaluate the integral $$I:=-2\int_{0}^{\infty}\frac{2+x^2-2\cosh(x)}{x^3(e^x-1)}\,dx$$
Write $$\frac{1}{e^x-1}=\sum_{n=1}^{\infty}e^{-nx}$$
so $$I=-2\sum_{n=1}^{\infty}\int_{0}^{\infty} \frac{e^{-n x}}{x^3}\left(2+x^2-2\cosh(x)\right)\,dx$$
Now using the convolution property of the Laplace Transform:
$$\int_{0}^{\infty} f(x)\cdot g(x)\, dx=\int_{0}^{\infty} (\mathcal{L}f)(s)\cdot (\mathcal{L}^{-1}g)(s)\, ds$$ with $f(x) = e^{-nx}\left(2+x^2-2\cosh(x)\right)$ and $g(x)=\frac{-2}{x^3}$ we have $$I=\sum_{n=1}^{\infty}\int_{0}^{\infty}\frac{2 s^2}{(n+s-1) (n+s)^3 (n+s+1)}\, ds=\int_{0}^{\infty}\frac{s^2+2 s+2}{s(s+1)}+s^2 \psi ^{(2)}(s)\, ds\stackrel{\text{IBP}}{=}\ln(2\pi)-\frac{3}{2}$$
where $\psi$ is the polygamma function. So $S(1)=\ln(\pi)-\frac{3}{2}$ as required. $\square$
