x(x+1)(x-1)=504
x^3-x-504=0
x^3-512-x+8=0
(x-8)(x^2+8x+64)-(x-8)=0
(x-8)(x^2+8x+63)=0
x^2+8x+63=0无解
所以x=8