How should I understand $\displaystyle\sum_k f(k) \approx \int dk \ f(k)$? I am trying to understand the statement: $$\sum_{k\geq 0} f(k) \approx \int dk\  f(k).$$ When we do an integral, $dk$ is an infinitesimal and so we are roughly speaking, summing over all values of $f(k)$?
 A: That's not entirely true, it is true for monotone functions, at least up to a bounded constant term found by using the LRAM and RRAM approximations, but this is usually what they mean by the $\approx$ symbol. However, take the function $f(x) = |\sin(\pi x)|$ for example, then
$$\sum_{k\in\Bbb Z}f(k) = 0\not\approx \int_{\Bbb R}f(x) \,dx =\infty$$
because the latter integral diverges, and diverges at least linearly by drawing a positive triangular wave function below the sine wave, so even
$$\sum_{k=1}^n f(x) = 0\not\approx {n\over 2}x\le \int_1^nf(x)\,dx.$$
A: The statement 
$$\sum_{k\geq 0} f(k) \approx \int dk\  f(k)\tag{1}$$ 
is not a well-defined mathematical statement. The symbol $\approx$ is usually used in a heuristic argument. The left hand side of the identity, if it converges at all, is a number.  Also, the right hand side of the equality is an ambiguous notation:


*

*it could mean an indefinite integral of $f$;  

*it could denote the Lebesgue integral over $\mathbb{R}$;  

*or in a seldom used case, it means the improper Riemann integral
$$
\int_0^\infty f(x)\ dx
$$
according to an analogy of the left hand side.

*or you could even achieve Sophomore's dream:


\begin{align}
\int_0^1 x^{-x}\,\mathrm{d}x &= \sum_{k=1}^\infty k^{-k}\\
\int_0^1 x^x   \,\mathrm{d}x &= \sum_{k=1}^\infty (-1)^{k+1}k^{-k} = - \sum_{k=1}^\infty (-k)^{-k}.
\end{align}

A precise statement could be as follows (thanks to the article mentioned by Winther)
Consider an integer $N$ and a non-negative, continuous function $f$ defined on the unbounded interval $[N, \infty)$, on which it is monotone decreasing. Then the infinite series
$$\sum_{n=N}^\infty f(n)$$
converges to a real number if and only if the improper integral
$$\int_N^\infty f(x)\,dx$$
is finite. In other words, if the integral diverges, then the series diverges as well.
If the improper integral is finite, one has the lower and upper bounds
$$
\int_N^\infty f(x)\,dx\le\sum_{n=N}^\infty f(n)\le f(N)+\int_N^\infty f(x)\,dx\tag{2}
 $$
for the infinite series. Now, $(2)$ gives a sense of (1)
