I am trying to find the discrepancy between an integral and a discrete approximation.
The "ideal" inner product between two signals $f(x)$ and $g(x)$ is an integral, $$ \langle f, g \rangle_\text{continuous} \equiv \int\limits_{-\infty}^{\infty} f(x) g(x) dx.$$
However, in my application, $f$ and $g$ are somehow discretized, for example, by averaging within windows of width $\Delta$ centered on the points $x=x_k\equiv k\Delta$, for $k = 0, \pm1, \pm2 ,\ldots$: $$ f_k \equiv \frac{1}{\Delta}\int\limits_{x_k-\Delta/2}^{x_k+\Delta/2} f(x) dx, $$ and similarly for $g$.
A discrete version of the inner product is then $$ \langle f , g \rangle_\text{discrete} \equiv \sum\limits_{k=-\infty}^\infty f_k g_k \Delta. $$
When $\Delta \to 0$ the discrete version should converge to the continuous version. I would like to find the error when the bins are small but not zero-width. I imagine there should be some kind of expansion like $$ \langle f , g \rangle_\text{discrete} = \langle f , g \rangle_\text{continuous} + (\text{something}) \Delta + (\text{something}) \Delta^2 + \cdots. $$
How can I find the (something)'s?
Thoughts about how proceed: My gut feeling is that the expansion should be independent of the functions $f$ and $g$ and comes from something like the Taylor expansion of a kernel operator around the Dirac delta function.
I'm not sure the best way to formulate the above statement concretely in "linear operator language". Discretizing from $f(x)$ to $f_k$ can be thought of as applying a window operator to the original $f$. The operator uses a kernel $W_\Delta$ to map a function on $\mathbb{R}$ to a function on $\mathbb{Z}$, $$ (W_\Delta f)_k = f_k = \int\limits_{-\infty}^\infty W_\Delta(x_k - x) f(x) dx, $$ where $W_\Delta(x)$ is a top hat kernel equal to $1/\Delta$ between $-\Delta/2$ and $\Delta/2$ and zero otherwise.
The two inner products can be written as kernels as well. Something like, \begin{align} \langle f, g \rangle_\text{continuous} &= f^\dagger \, K_c \, g \\ \langle f, g \rangle_\text{discrete} &= (W_\Delta f)^\dagger \, K_\Delta \, (W_\Delta g), \end{align} where the continuous inner product kernel $K_c$ is the delta function $\delta(x-y)$.
Then my question is asking how expand the "discretizing inner product operator", $$ W_\Delta ^\dagger K_\Delta W_\Delta $$ in powers of $\Delta$. I think the lowest order term should be the Dirac delta function. And the ${O}(\Delta^n)$ term will be some new kernel I can apply to the continuous $f(x)$ and $g(x)$.