I've been doing some research on this and I saw that a bounded integration over reals evaluates to infinity. This makes total sense, such as in the case:
$$ y = x $$
If we take the typical integral with bounds [0, 1], we obtain:
$$ \int_{0}^{1} x dx = \frac{1}{2} x^2 |_{0}^{1} = \frac{1}{2} - 0 = \frac{1}{2} $$
However, we are taking dx to mean an infinitesimal amount. If we allowed dx = 1, then we would be summing over reals [0, 1] and the value would be infinity.
I can think of cases where this value would be finite. Suppose now we have:
$$ y = 0 $$
where there are discontinuities at certain values for x. In other words, there are random values of x (not all reals) where:
$$ y \neq 0 $$
For example:
$$ y = \left\{ \begin{array}{ll} 1 & x = \frac{1}{3} \\ 2 & x = \frac{1}{2} \\ 3 & x = \frac{\sqrt{2}}{2} \\ \end{array} \right. $$
Thus, the sum would be finite (S = 6) and we could sum over reals. Is there a way to do this like integration (sum up all values of y)? Any help would be appreciated.
Update:
I have been doing more research on this topic and I actually figured out that a good way to do this is substitute the floor of x for x in the function you are trying to integrate. But this brings up another question: what is the integral of the floor of x? Furthermore, what is the integral of a power of the floor of x? I saw in one of the answers here that:
$$ \int \;\lfloor x \rfloor dx = x\lfloor x \rfloor - \frac12 \lfloor x \rfloor(\lfloor x \rfloor + 1)\; $$
But the person did not provide a proof. I do not quite understand how they arrived at that answer. I tried Googling it, but I can't seem to find a proof. Can anyone provide one please? Additionally, can you provide how you would take the integral of a power of the floor of x, such as:
$$ \int \;\lfloor x \rfloor^n dx $$
where n is a natural number. I'd appreciate it.