Some context: over the past two weeks, I have been solving an integral. I completed it last night. However, I just realized that I have essentially shown $$\sum_{k=0}^nf(n,k) = \int_{\mathbf{R}}f(n,x) \, \mathrm{d}x$$ Where $n$ is a fixed non-negative integer.
My question: let $f(t,x)$ be an everywhere-differentiable real-valued function of $x$ where $t$ is a non-negative integer. Further, let it be such that $f(t,x)$ cannot be written as $g(t)h(x)$. Is there any general way to go about determining whether $$\sum_{k=0}^nf(n,k) = \int_{\mathbf{R}}f(n,x) \, \mathrm{d}x$$ For all $n=0,1,2 \dots$? I ask because I can find quite a few functions which both do and do not satisfy the above, and am wondering whether the the work I just did was unnecessary.
Your formula looks to encompass arithmetic formulas like this one :
$$\sum_{k=1}^n f(k)=\dfrac{n(n+1)}{2}=\int_{\tfrac12}^{n+\tfrac12} f(x)\mathrm{d}x \ \ \ \ \text{where} \ \ \ \ f(x):=x. \tag{1}$$
(more exactly $f(x)=x$ for $\tfrac12 \leq x \leq n+\tfrac12$ and $f(x)=0$ elsewhere).
More generally formulas like (1) can be found by adapting formulas using Bernoulli polynomials $B_n(x)$ (like one can find in this reference):
$$\sum_{k=1}^{n} k^{p}=\int_0^{n+1} B_{p}(x)\mathrm{d}x$$
Besides, could you say which function $f$ you have found fulfilling your equation ?