Can I approximate a series as an integral to find its limit and determine convergence? Find $\lim \limits_{n \to \infty} (a_n)$, where $a_n=\frac{1}{n^2}+\frac{2}{n^2}+\frac{3}{n^2}+...+\frac{n}{n^2}$.
So I can solve it like that $a_n=\frac{1+2+3+...n}{n^2}=\frac{\frac{1}{2}n(n+1)}{n^2}=\frac{1}{2}(1+\frac{1}{n})$. Clearly $\lim \limits_{n \to \infty} (a_n)=\frac{1}{2}$ so the sequence converges to $\frac{1}{2}$.
But can I approximate the series as an integral? 
$$a_n=\sum_{i=1}^n \frac{i}{n^2} \approx\int_{1}^n \frac{x}{n^2}dx=\frac{1}{n^2}\int_{1}^n x \,dx=\frac{1}{2}-\frac{1}{2n^2}$$
Now, when $n$ tends to infinity, $a_n$ tends to $\frac{1}{2}$ so the sequence converges to $\frac{1}{2}$. This produced the same result as using the first method. The only thing I am unsure of is that the final sums are different despite the fact that they both converge to the same number. This is because in the first method we sum only integers but in the second we sum all real $x$'s in the given interval, right?
Is this approach also valid? 
 A: That approach is valid IF instead of approximating, you write either
$$
a_n=\sum_{i=1}^n \frac{i}{n^2} \le \int_{A_1}^{A_2} \frac{x}{n^2}dx=\ldots
$$or
$$
a_n=\sum_{i=1}^n \frac{i}{n^2} \ge \int_{B_1}^{B_2} \frac{x}{n^2}dx=\ldots
$$
where you have to choose the limits carefully. In the first case, you'd choose 
$A_1 = 1, A_2 = n+1$, so that on each interval, you've have
$$
\frac{i}{n^2} \le \int_i^{i+1} \frac{x}{n^2} dx
$$
i.e.
$$
i \le \int_i^{i+1} x~ dx
$$
which is valid because on the interval from $i \le x \le i+1$, the number $i$ really is no more than $x$. 
In the second case (which you'd use if you were trying to prove divergence), you'd have to pick $B_1 = 0, B_2 = n$, and then observe that for
$$ i-1 \le x \le i,$$ you have $x \le i$, and hence
$$
i \ge \int_{i-1}^i x ~dx.
$$
In both cases, it really helps that the function you're integrating ($x$ in this case) is monotone on each interval, so that its integral over the interval can be estimated (either a lower or upper bound estimate) by its value at one of the interval's endpoints.
You might try to perform a similar estimate to check the convergence/divergence of $a_n = \sin n$; you'll find that without the monotone-ness, you really can't get anywhere. 
General note: saying that something is "approximately" something else is generally a risky business. For instance, in the sequences $a_n = 1/n$ and $b_n = 1/n^2$, the later terms are approximately zero...but one diverges and the other converges. Far better to have definitive upper or lower bounds whenever possible. 
A: This can be written as 
$$\lim_{n \to \infty}\frac{1}{n} \sum_{r=1}^n {r\over n}$$
This is of the form 
$$\lim_{n \to \infty}\frac{1}{n} \sum_{r=1}^n f\left ({r\over n} \right) $$
So it can be written as
$$\int_0^1 f(x)dx$$ 
$$=\int_0^1x dx$$
$$=\frac{1}{2}$$
A: The integral approach is valid because
(1) The function $\;f(x)=x\;$ is integrable in any finite interval (for example, because it is everywhere continuous), and 
(2) The sum is a very specific Riemann sum of the above function in the interval $\;[0,1]\;$ with respect to a very specific partition of this interval and choosing very specific points within each subinterval in that partition..
By (1), any Riemann sum with respect to any partition will converge to the integral $\;\int_0^1 x\,dx\;$ .
This is just like choosing a very specific subsequence of a sequence that we know beforehand that it is convergent: the subsequence is going to converge and to the same limit that the whole function.
