Calculate $\lim_{n\rightarrow \infty }\left(\frac{n^{2}+1}{n+1}\right)^{\tfrac{n+1}{n^{2}+1}}$ 
$$\lim_{n\rightarrow \infty }\left(\frac{n^{2}+1}{n+1}\right)^{\tfrac{n+1}{n^{2}+1}}$$

I tried to use $f^{g}=e^{g \ln f}$ and I got $e^{\tfrac{n+1}{n^{2}+1}\ln \left(\tfrac{n^2+1}{n+1} \right)}$. How to continue ?
 A: Write $m=\frac{n^2+1}{n+1}$, so $m\to\infty$ as $n\to\infty$. Your limit is $$\lim_{m\to\infty}\exp\frac{\ln m}{m}=\exp\lim_{m\to\infty}\frac{\ln m}{m}=\exp 0=1.$$
A: Hint. Use substitution: set $x=\dfrac{n^2+1}{n+1}$. What is the limit of $x$ when $n$ tends to $\infty$?
A: Making the problem more general, consider
$$a_n=\left(\frac{n^{2}+a}{n+b}\right)^{\tfrac{n+c}{n^{2}+d}}\implies \log(a_n)={\tfrac{n+c}{n^{2}+d}}\log\left(\frac{n^{2}+a}{n+b}\right)$$ Now, use Taylor expansions for large $n$
$$\log\left(\frac{n^{2}+a}{n+b}\right)=\log
   \left({n}\right)-\frac{b}{n}+\frac{a+\frac{b^2}{2}}{n^2}+O\left(\frac{1}{n^3}\right)$$
$${\tfrac{n+c}{n^{2}+d}}=\frac{1}{n}+\frac{c}{n^2}+O\left(\frac{1}{n^3}\right)$$
$$\log(a_n)=\frac{\log \left({n}\right)}{n}+\frac{-b+c \log
   \left({n}\right)}{n^2}+O\left(\frac{1}{n^3}\right)$$ Continuing with Taylor
$$a_n=e^{\log(a_n)}=1+\frac{\log \left({n}\right)}{n}+\frac{2 \left(-b+c \log
   \left({n}\right)\right)+\log ^2\left({n}\right)}{2
   n^2}+O\left(\frac{1}{n^3}\right)$$
Then $\cdots$ $\text{  ???}$ $\forall \{a,b,c,d\}$
A: $\begin{array}{l}
\displaystyle\lim_{n \to \infty}\left({n^{2} + 1 \over n + 1}\right)^{\large\left(n + 1\right)/\left(n^{2} + 1\right)} =
\lim_{n \to \infty}n^{1/n} =
\exp\left(\lim_{n \to \infty}{\ln\left(n\right) \over n}\right) \\[5mm] =
\displaystyle
\exp\left(\lim_{n \to \infty}
{\ln\left(n + 1\right) - \ln\left(n \right) \over \left[n + 1\right] - n}\right) =
\exp\left(\lim_{n \to \infty}
\ln\left(1 + {1 \over n}\right)\right) = \exp\left(0\right)\ =\
\bbox[10px,#ffd,border:1px groove navy]{1}
\end{array}
$
