Euler–Maclaurin formula: Mismatched dimensions

76 Views Asked by At

To quote Wikipedia:

If ${\displaystyle m}$ and ${\displaystyle n}$ are natural numbers and ${\displaystyle f(x)}$ is a real or complex valued continuous function for real numbers ${\displaystyle x}$ in the interval ${\displaystyle [m,n]}$, then the integral $$ I = \int_m^n f(x)\,dx$$ can be approximated by the sum (or vice versa) $$ S = f(m + 1) + \cdots + f(n - 1) + f(n) $$

My problem is, that I don't see how this can be a correct approximation. I stumbled across this doing dimensional analysis: $I$ has dimension $[f]\cdot[x]$ while $S$ has dimension $[f]$.

Is there something missing from the summation formula?

A more elaborate example from physics: If $\rho=\frac{dq}{dV}$ is the charge density, then the complete charge is given by $Q= \int dq = \int dV \rho(r)$. But the approximation $\sum_i\rho(x_i)$ will only be of dimension of the charge density, not the charge.

How to resolve this?

Edit

As @Randall has pointed out in the comment, the sum should probably be

$$ S = \Delta x \sum_i f(x_i) \tag{1}$$

But what about the opposite direction? Let's say I start from this sum $$ S = \sum_i f(x_i) \tag{2}$$ (without the $\Delta x$) and want to make an approximation by treating $x$ as a continuous variable. How would the integral look? I have seen some books and papers use $1/L$ where $L=\int_D dx$ over the domain of interest $D$.