I'm trying to prove that the following improper integral converges (conditionally): $$\int_0^\infty(-1)^{\lfloor x^2 \rfloor }dx$$
I figured that: $$\int_0^\infty(-1)^{\lfloor x^2 \rfloor }dx = \sum_{k=0}^\infty (-1)^k(\sqrt{k+1}-\sqrt k)$$
I know the series above conditionally converges, but is it enough to conclude that the integral converges as well?
Edit: I understand it's not enough, any idea as to how to finish the proof?