How can I show that the following statement is true:
$$\lim_{n\to\infty}\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{(n+1)^2}n^{n^2}} = \frac{1}{e}$$
This rather messy looking limit is the result of a ratio-test for convergence I am working on. I can get all the way to the left side of the equation, and when a solution wasn't forthcoming I used Mathematica to get the limit just to see where I should be headed and it said that it was equal to $\frac{1}{e}$ but despite over an hour of trial and error I can't figure out what I need to do to cause things to cancel or simplify down to a form whose limit I can show to be the aforementioned value.
Switching to logarithms, we have to deal with
$$\left[(n+1)^2+n^2\right]\log(n+1)-(n+1)^2\log(n+2)-n^2\log n $$ that can be written as $$ n^2\int_{n}^{n+1}\frac{dx}{x}- (n+1)^2 \int_{n+1}^{n+2}\frac{dx}{x} $$ or as $$ \int_{0}^{1}\left(\frac{n^2}{n+x}-\frac{(n+1)^2}{n+1+x}\right)\,dx =-\int_{0}^{1}\frac{n^2+n+(2n+1)x}{(n+x)(n+1+x)}\,dx.$$ If we define $f_n(x)$ as $\frac{n^2+n+(2n+1)x}{(n+x)(n+1+x)}$, for any $x\in(0,1)$ we have $\lim_{n\to +\infty}f_n(x)=1$, hence the claim follows from the dominated convergence theorem: $$ \lim_{n\to +\infty}\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{(n+1)^2}n^{n^2}}=\exp\left(-\int_{0}^{1}1\,dx\right) = \color{red}{\frac{1}{e}}.$$