# Why don't I get the correct answer when I set these two equations =

rxh140630
Homework Statement:
Find all x>0 for which $$\int_0^x [t]^{2} dt = 2(x-1)$$
Relevant Equations:
The notation [x] denotes the greatest integer less than or equal to x
In the question above it, the author (Apostol) states: $$\int_0^n [t]^{2} dt = \frac{n(n-1)(2n-1)}{6}$$

Why can't I set the two equations = and get the result?

2(x-1) = x(x-1)(2x-1)/6 => 12 = 2x^2 - x => 0 = x^2-(x/2) -6

Gold Member
Apostol's formula is true when ##n## is a natural number. You aren't assuming that ##x## is a natural number, though.

rxh140630
Apostol's formula is true when ##n## is a natural number. You aren't assuming that ##x## is a natural number, though.
Ahh I see I see. Well how would you go about solving this problem without plug and chugging? Seems really hard

Gold Member
Let ##n## be the floor of ##x##. I would try breaking up the integral over the intervals ##[0,n]## and ##[n,x]## (for example, ##\int_0^{7/2}=\int_0^3+\int_3^{7/2}##). You can use apostol's formula on the first piece, and directly evaluate the second.

rxh140630
rxh140630
Let ##n## be the floor of ##x##. I would try breaking up the integral over the intervals ##[0,n]## and ##[n,x]## (for example, ##\int_0^{7/2}=\int_0^3+\int_3^{7/2}##). You can use apostol's formula on the first piece, and directly evaluate the second.

Still seems like it would involve plug and chugging, I think I'm just going to have to skip this problem sadly.