My question is from Apostol's Vol. 1: One-variable calculus with introduction to linear algebra textbook.
Page 70. Exercise 6.
a) If $n$ is a positive integer, prove that $\int_0^n\lfloor t\rfloor^2\mathrm dt=\frac{n(n-1)(2n-1)}{6}.$
b) If $f(x)=\int_0^x\lfloor t\rfloor^2\mathrm dt$ for $x\ge0$, draw the graph of $f$ over the interval $[0,3]$.
c) Find all $x>0$ for which $\int_0^x\lfloor t\rfloor^2\mathrm dt=2(x-1)$.
The attempt at a solution. I solved a), and I think my solution is correct, here it is:
We know that $$\int_0^n\lfloor t\rfloor^2\mathrm dt=1^2+2^2+\cdots+(n-1)^2$$ and $$1^2+2^2+\cdots+(n-1)^2=\frac{n(n-1)(2n-1)}{6}$$ therefore $$\int_0^n\lfloor t\rfloor^2\mathrm dt=\frac{n(n-1)(2n-1)}{6}.$$
For b), I am confused, I thought I should have graphed $f(x)=\frac{2x^3-3x^2+x}{6}=\frac{x(x-1)(2x-1)}{6}$, but that's silly, because the formula is for $\int_0^n\lfloor t\rfloor^2\mathrm dt$ where $n$ is integer. So I guess $f(x)=\int_0^x\lfloor t\rfloor^2\mathrm dt$ from $0$ to $3$ would be constant $5$, since $\int_0^3\lfloor t\rfloor^2\mathrm dt=5$, am I correct?
As for c), my attempt was to solve this equation: $$\frac{x(x-1)(2x-1)}{6}=2(x-1)$$ $$x=\frac{1}{4}(1-\sqrt{97}), x=\frac{1}{4}(1+\sqrt{97}).$$ This is not correct. So any hints would be appreciated on b) and c). Thank you in advance.
For b): You're not right in saying that $f(x)$ is constant. You know the value in $0, 1, 2$ and $3$ (from the formula you proved in a), try to think about what happens to $\lfloor t\rfloor^2$ between two integers and use that to find out how $f$ behaves on those intervals.
c) should be easy when you've figured out how $f$ behaves on the intervals between the integers.