Find $\lim_{n\rightarrow\infty} \frac{(n+1)^{2n^2+2n+1}}{(n+2)^{n^2+2n+1} n^{n^2}}$ Woflram gives $\frac{1}{e}$ as the limit, but I failed to obtain it. Please help.
$$\lim_{n\rightarrow\infty} \frac{(n+1)^{2n^2+2n+1}}{(n+2)^{n^2+2n+1}n^{n^2}}$$
 A: $$
\begin{align}
&\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{n^2+2n+1}n^{n^2}}\\[6pt]
&=\frac{\left(\color{#C00}{1+\frac1n}\right)^{2n^2+2n+1}}{\left(\color{#090}{1+\frac2n}\right)^{n^2+2n+1}}\\[3pt]
&=\left(\frac{\color{#C00}{1+\frac2n+\frac1{n^2}}}{\color{#090}{1+\frac2n}}\right)^{n^2+2n}\left(\color{#C00}{1+\frac1n}\right)^{-2n}\frac{\left(\color{#C00}{1+\frac1n}\right)}{\left(\color{#090}{1+\frac2n}\right)}\\[6pt]
&=\left(1+\frac1{n^2+2n}\right)^{n^2+2n}\left(1+\frac1n\right)^{-2n}\frac{\left(1+\frac1n\right)}{\left(1+\frac2n\right)}
\end{align}
$$
Take the limit of each of the $4$.
A: Consider $$A=\frac{(n+1)^{2n^2+2n+1}}{(n+2)^{n^2+2n+1}n^{n^2}}$$ and take logarithms
$$\log(A)=(2n^2+2n+1)\log(n+1)-(n^2+2n+1)\log(n+2)-n^2\log(n)$$ Now, rewrite
$$\log(n+1)=\log(n)+\log\left(1+\frac 1n \right)=\log(n)+\frac{1}{n}-\frac{1}{2 n^2}+O\left(\frac{1}{n^3}\right)$$
$$\log(n+2)=\log(n)+\log\left(1+\frac 2n \right)=\log(n)+\frac{2}{n}-\frac{2}{n^2}+O\left(\frac{1}{n^3}\right)$$ and replace. You should arrive to 
$$\log(A)=-1+\frac{2}{n}+\frac{3}{2 n^2}+O\left(\frac{1}{n^3}\right)$$ Now, using
$$A=e^{\log(A)}\implies A=\frac 1 e\left(1+\frac{2}{n}+\frac{7}{2 n^2}+O\left(\frac{1}{n^3}\right)\right)$$
A: \begin{align}
\lim_{n\rightarrow\infty} \frac{(n+1)^{2n^2+2n+1}}{(n+2)^{n^2+2n+1}n^{n^2}}
&=\lim_{n\rightarrow\infty} \frac{(n+1)^{2n^2}(n+1)^{2n+1}}{n^{n^2}(n+2)^{n^2}(n+2)^{2n+1}}\\
&=\lim_{n\rightarrow\infty} \frac{(n+1)^{2n^2}(n+1)^{2n}(n+1)}{\left[n(n+2)\right]^{n^2}(n+2)^{2n}(n+2)}\\
&=\lim_{n\rightarrow\infty} \left(\frac{(n+1)^2}{n(n+2)}\right)^{n^2}\cdot \lim_{n\rightarrow\infty} \left(\frac{n+1}{n+2}\right)^{2n}\cdot\lim_{n\rightarrow\infty}\frac{n+1}{n+2}\\
&=\lim_{n\rightarrow\infty} \left(\frac{n^2+2n+1}{n^2+2n}\right)^{n^2}\cdot
\left[\lim_{n\rightarrow\infty} \left(\frac{n+1}{n+2}\cdot\frac{\frac{1}{n}}{\frac{1}{n}}\right)^{n}\right]^2\cdot\lim_{n\rightarrow\infty}\left(\frac{n+1}{n+2}\cdot\frac{\frac{1}{n}}{\frac{1}{n}}\right)\\
&=\lim_{n\rightarrow\infty} \left(1+\frac{1}{n^2+2n}\right)^{n^2}\cdot
\left[\lim_{n\rightarrow\infty} \left(\frac{1+\frac{1}{n}}{1+\frac{2}{n}}\right)^{n}\right]^2\cdot\lim_{n\rightarrow\infty}\frac{1+\frac{1}{n}}{1+\frac{2}{n}}\\
&=\lim_{n\rightarrow\infty} \left(1+\frac{1}{n^2+2n}\right)^{n^2}\cdot
\left[\frac{\lim_\limits{n\rightarrow\infty} \left(1+\frac{1}{n}\right)^{n}}{\lim_\limits{n\rightarrow\infty} \left(1+\frac{2}{n}\right)^{n}}\right]^2\cdot\lim_{n\rightarrow\infty}\frac{1+0}{1+0}\\
&=\lim_{n\rightarrow\infty} \left(1+\frac{1}{n^2+2n}\right)^{n^2}\cdot
\left(\frac{e}{e^2}\right)^2\cdot 1
\end{align}
Now, as $n$ approaches infinity, the ratio of the quantities $n^2+2n$ and $n^2$ approaches $1$. What this means for us is that somewhere out there in infinity they want to become the same quantity and we can treat them as such:
$$
\lim_{x\rightarrow\infty} \left(1+\frac{1}{x}\right)^{x}\cdot\frac{1}{e^2}=
e\cdot\frac{1}{e^2}=\frac{1}{e}
$$
