Can $ \lim_{n \to \infty} \sum_{i=1}^{n} (1-\frac {x_i}{\sqrt{x_i^2+r^2}}) \cdot (x_{i+1}-x_{i})$ be written as a definite integral $$ \lim_{n \to \infty} \sum_{i=1}^{n} \left (1-\frac {x_i}{\sqrt{x_i^2+r^2}}\right) \cdot (x_{i+1}-x_{i})$$ 
$x_1=1$, $x_n=a+L$
I don't really see a way to manipulate this into a desirable form, but I have about zero experience doing this so I am probably wrong.
This sum came up when I was trying to find the electric field caused by a cylinder.
 A: Yes. The following general result helps to see why:
Let $\mathcal{P}=\lbrace a=x_1<x_2<x_3<\cdots<x_n=b\rbrace$ be a partition; and $f$ a function defined on $[a,b]$ for any choice of $s_i\in [x_i,x_{i+1}]$ the sum $$\mathcal{S}=\sum_{i=1}^{n} f(s_i) \cdot (x_{i+1}-x_{i})$$ is a Riemann sum of $f$ associated to the partition $\mathcal{P}$.
Let $f$ be integrable in the sense of Riemann on the interval $[a,b]$ and $\mathcal{P}_n$ be a sequence of partitions of $[a,b]$ such that $\displaystyle\lim_{n} \mid\mid P_n\mid\mid=0$. If for every $n$ we consider a Riemann sum associated to the partition $\mathcal{(P)}_n$ and to the function $f$, then
$$\displaystyle\lim_n \mathcal{S}_n=\int_a^{b} f$$

Then considering the partition $\mathcal{P}_n=\lbrace a=x_1<x_2<x_3<\cdots<x_n=a+L\rbrace$  and $f(x)=1-\frac{x}{\sqrt{x^2+r^2}}$, which is easy to see is continuous, hence integrable. Then we have,
$$\lim_{n \to \infty} \sum_{i=1}^{n} \left (1-\frac {x_i}{\sqrt{x_i^2+r^2}}\right) \cdot (x_{i+1}-x_{i})=\int_a^{a+L} {1-\frac{x}{\sqrt{x^2+r^2}}dx}$$
whenever the norm of the partition tends to zero, i.e. $\text{sup} \lbrace x_{i+1}-x_i \mid i=1,\ldots, n\rbrace \rightarrow 0$
