Evaluate $\lim_{n\rightarrow \infty }\frac{1}{n}\int_{1}^{n}\frac{x-1}{x+1}dx$ $$\lim_{n\rightarrow \infty }\frac{1}{n}\int_{1}^{n}\frac{x-1}{x+1}dx$$
My approach is not correct, I think.
I took $f(x)=(x-1)/(x+1)$ which is continuous so there is a $F(x)$ a primitive of f(x) such that $F'(x)=f(x)$
So I used L'Hospital but when I derived, I derived for n which is number, not for x and I think it's not correct.
I obtained $\lim_{n \to \infty }\frac{F(n)-F(1)}{n}=\lim_{n \to \infty }f(n)=1$ which is the correct answer but I'm not sure if this is the right method.There's another way to solve this?
 A: Usethat $$\frac{x-1}{x+1}=1-\frac{2}{x+1}$$
A: Yes, your approach is correct. You applied L'Hôpital's rule to
$$
\lim_{x\to \infty } \frac{F(x) - F(1)}{x} =  \lim_{x\to \infty } \frac{F'(x)}{1} = 1 
$$
which is valid because the denominator $g(x) = x $ on the left-hand side diverges to $ \infty$, satisfies $g'(x) \ne 0$, and the limit on the right-hand side exists.
Then $ \frac{F(x_n) - F(1)}{x_n} \to 1$ for all sequences $(x_n)$ with $x_n \to \infty$, and in particular 
$$
\lim_{n\to \infty } \frac{F(n) - F(1)}{n} = 1 \, .
$$

As mentioned in L'Hôpital's rule: General proof (case 2) this is actually a consequence of the Stolz–Cesàro theorem: In your case,
$$
 a_n = \int_1^n f(x) \, dx  \, , \, b_n = n 
$$
satisfy the hypotheses of the Stolz–Cesàro theorem with
$$
\begin{align}
 \frac{a_{n+1} - a_n}{b_{n+1} - b_n} &= \int_n^{n+1} f(x) \, dx \\
&= f(\xi_n) \text{ for some } \xi_n \in (n, n+1) \\
&\to 1 \text{ for }n \to \infty \, ,
\end{align}
$$
using the mean value theorems for integrals. It follows that
$$
 \frac 1n \int_1^n f(x) \, dx  = \frac{a_n}{b_n} \to 1
$$
for $n \to \infty$.
