I'm asked to show that $f(x)=\frac{1}{1+x^2}$ is Lebesgue integrable over the real line and that its integral is $\pi$.
I can bound this function by the measurable function $\phi=\sum_{n=0}^{\infty}\frac{1}{1+n^2}\chi_{I_n}$ where $I_n = (n-1,n]\cup [n,n+1)$ and $\chi$ means characteristic function. This function $\phi$ can be written as the limit of its increasing sequence of partial sums, so I know that its integral is $2\sum_{n=0}^{\infty}\frac{1}{1+n^2}$ which converges. This ensures that the integral of $f$ is bounded, and hence $f$ is Lebesgue integrable.
I'm a bit stuck on how to show that $\int f$ is $\pi$ however. I suspect that I'm intended to write $\int f$ as a limit of series like that above. By cutting up those characteristic functions ever more finely, I can express the integral of $f$ as $$\lim_{k\to \infty} \frac{2}{k} \sum_{n=0}^{\infty} \frac{1}{1+(n/k)^2}$$ but I don't at all know how to evaluate that limit (though apparently it does evaluate to $\pi$).
So, I suppose my question is whether this is a good way to go about this (the overall point is to use the theory of Lebesgue measure and Lebesgue integration), and whether this last limit I've written is somehow easily seen to converge to $\pi$? Or, should I try to express the function as a limit of some other functions?