Can anyone help with seeing if this integral definition can be algebraically proven

functionsintegrationproof-explanation

Recently, I was messing around in Desmos and wanted to see if I could recreate $x^2$ by using an integral.

I came across the following integral:
$$\int_{0}^{x}\left\lfloor \frac{t}{x}+x \right\rfloor dt$$

When I plug the integral into WolframAlpha with a given $x$ value, it seems to return $x^2$, and when graphed in Desmos it overlaps the graph of $x^2$.

Geometrically, it makes sense, as the space under the floor function to the $x$-axis
with those parameters and bounds would just be a square with side lengths $x$. But I wonder what the algebraic reasoning would look like. I currently can't solve it, but if anyone could help that would be amazing.

Thank you!

Best Answer

Simply use the brute force substitution $s=\frac{t}{x}+x$

$$f(x) = x\int_x^{x+1} \lfloor s\rfloor\:ds$$

$$ = x\int_x^{\lceil x\rceil}\lfloor x\rfloor \:ds + x\int_{\lceil x\rceil}^{x+1} \lceil x \rceil \:ds$$

$$= x\Bigr((\lceil x\rceil - 1)(\lceil x\rceil-x)+\lceil x\rceil(x+1-\lceil x\rceil)\Bigr)=x^2$$

Related Question