<s>[INST] Limit of a product I need to find the value of $$L=\lim_{n \rightarrow \infty}\displaystyle\prod_{r=1}^{n} \left(1+\dfrac{r^2}{n^2}\right)^{1/n}$$
Is doing this OK?--
$$\begin{align} L &=\lim_{n \rightarrow \infty}\left(1+\dfrac{1^2}{n^2}\right)^{1/n}\left(1+\dfrac{2^2}{n^2}\right)^{1/n} \ ... \ \left(1+\dfrac{n^2}{n^2}\right)^{1/n} \\ &=\lim_{n \rightarrow \infty} e^{1^2/n^3} e^{2^2/n^3} \ ... \ e^{n^2/n^3} \\ &= \lim_{n \rightarrow \infty} e^{n (n+1)(2n+1)/6n^3}\\ &=e^{1/3}
\end{align}$$
I get $L=e^{1/3}$ but the answer is $2e^{\pi/2-2}$.
Where have I gone wrong? How to arrive at the correct answer $2e^{\pi/2-2}$?
Thank you.
 [/INST] $$L=\lim_{n \rightarrow \infty}\displaystyle\prod_{r=1}^{n} \left(1+\dfrac{r^2}{n^2}\right)^{1/n}$$
$$\ln L=\lim_{n \rightarrow \infty}\frac1n\sum_{r=1}^n\ln\left(1+\dfrac{r^2}{n^2}\right)=\int_0^1\ln(1+x^2)dx$$
$$\int\ln(1+x^2)dx=\ln(1+x^2)\int dx-\int\left(\frac{d[\ln(1+x^2)]}{dx}\int dx\right)dx$$
$$=x\ln(1+x^2)-\int\frac{2x^2}{1+x^2}dx$$
$$=x\ln(1+x^2)-\int\frac{2(x^2+1)-2}{1+x^2}dx$$
$$=x\ln(1+x^2)-2\int dx+2\int\frac1{1+x^2}dx$$
</s>