# How do I solve floor function integral equation?

This equations comes from my other question, and I thought it was ok to create another question about the same exercise. So I have to solve the equation: $$\int_0^{\lfloor x\rfloor}\lfloor t\rfloor^2\mathrm dt+\lfloor x\rfloor^2(x-\lfloor x\rfloor)=2(x-1),$$which is the same as $$\frac{(\lfloor x\rfloor^2-\lfloor x\rfloor)(2\lfloor x\rfloor-1)}{6}+\lfloor x\rfloor^2(x-\lfloor x\rfloor)=2(x-1),$$ here’s the graph of $f(x)=\int_0^{\lfloor x\rfloor}\lfloor t\rfloor^2\mathrm dt+\lfloor x\rfloor^2(x-\lfloor x\rfloor)$:

One solution is obviously $1$, which is easy, but I don’t know how to find other solutions.

Thanks for @Ross Millikan’s answer, here’s the graph of both functions:

They cross each other at points $(1,0)$ and $(\frac{5}{2},3)$, so solutions are $x=1, x=\frac{5}{2}$.

#### Solutions Collecting From Web of "How do I solve floor function integral equation?"

To use the graph, you can just overplot $2(x-1)$ on it, which passes through $(1,0)$ with a slope of $2$. It also passes through $(5/2,3)$, which is another solution, then stays below the curve forever. You can plug in $x=5/2$ to verify the solution.

Here is an algebraically solution. Put $n=\lfloor x\rfloor$; hence we get $\displaystyle x=\frac{4n^3+3n^2-n-12}{6(n^2-2)}$. Now we have $x=n+a$ with $a\in [0,1[$. We have:
$$a=-\frac{2n^3-3n^2-11n+12}{6(n^2-2)}=-c_n$$
We have $c_n\geq n(2n^2-3n-11)$, it is easy to see that $2n^2-3n-11>0$, hence $c_n>0$ if $n\geq 4$, and that $c_3>0$ by direct computation. Hence for $n\geq 3$, we get $a<0$, this show that we must have $n\leq 2$. It is easy to finish.