<s>[INST] Limit using Taylor expansion : which term do we expand? I want to check the limit $\displaystyle{\lim_{n\rightarrow +\infty}\text{exp}\left (\frac{n}{2}\ln\left (\frac{n^2-2n+1}{n^2+1}\right )\right )}$ using the Taylor expansion.
I have done the following:
$$\lim_{n\rightarrow +\infty}\text{exp}\left (\frac{n}{2}\ln\left (\frac{n^2-2n+1}{n^2+1}\right )\right )=\lim_{n\rightarrow +\infty}\text{exp}\left (\ln\left (\frac{n^2-2n+1}{n^2+1}\right )^{\frac{n}{2}}\right )=\lim_{n\rightarrow +\infty}\left (\frac{n^2-2n+1}{n^2+1}\right )^{\frac{n}{2}}=\lim_{n\rightarrow +\infty}\left (\frac{(n-1)^2}{n^2+1}\right )^{\frac{n}{2}}=\lim_{n\rightarrow +\infty}\frac{(n-1)^n}{\left (n^2+1\right )^{\frac{n}{2}}}$$
For which term do we have to write the Taylor expansion?
 [/INST] We have that
$$\frac{n^2-2n+1}{n^2+1}=1-\frac{2n}{n^2+1}$$
then we can start by by first order Taylor's expansion for $\log(1+x)$ to obtain
$$\ln\left (\frac{n^2-2n+1}{n^2+1}\right )=\ln\left (1-\frac{2n}{n^2+1}\right )=-\frac{2n}{n^2+1}+O\left(\frac1{n^2}\right)$$
then
$$\text{exp}\left (\frac{n}{2}\ln\left (\frac{n^2-2n+1}{n^2+1}\right )\right )=\text{exp}\left( -\frac{n^2}{n^2+1}+O\left(\frac1{n}\right)\right)\to e^{-1}$$
then in this case a first order expansion suffices.
In general there is not a method to determine a priori which order we need to expand to but after some practice it becomes relatively easy for standard limits.
</s>