$\int_{0}^{\infty}(-1)^{[x^2]}$ converge? I need to tell if $\int_{0}^{\infty}(-1)^{[x^2]}dx$ converge, diverge or absolutely converges.
I managed to say it does not absolutely converges.
for it's converges, diverges i tried substituting $t=x^2$ so i get $\int_{0}^{\infty}\frac{(-1)^{[t]}}{2\sqrt{t}}dt$ but I still can't get rid of the $[]$ (which stands for round)
How can i continue from here? or is it a wrong way to go?
 A: For integer $k\ge1$,
$$
\int_{\sqrt{k-\frac12}}^{\sqrt{k+\frac12}}(-1)^{\left[x^2\right]}\,\mathrm{d}x=(-1)^k\left(\sqrt{k+\frac12}-\sqrt{k-\frac12}\right)
$$
Summing yields
$$
\begin{align}
\int_0^{\sqrt{n+\frac12}}(-1)^{\left[x^2\right]}\,\mathrm{d}x
&=\sqrt{\frac12}+\sum_{k=1}^n(-1)^k\left(\sqrt{k+\frac12}-\sqrt{k-\frac12}\right)\\
&=\sqrt{\frac12}+\sum_{k=1}^n(-1)^k\frac1{\sqrt{k+\frac12}+\sqrt{k-\frac12}}
\end{align}
$$
which converges by the Alternating Series Test.
A: Hint
$$\int_{\sqrt{0.5}}^{\sqrt{0.5+M}}(-1)^{[x^2]}dx=\sum_{n=1}^M\int_{\sqrt{n-0.5}}^{\sqrt{n+0.5}}(-1)^{[x^2]}dx$$
A: Denote $f(x) = (-1)^{[x^2]}$. For sure $f$ is not Lebesgue integrable as $ \vert f \vert = 1$ on $(0, \infty)$.
Now, let see the convergence of the improper integrale.
You have:
$$f(x) = \begin{cases}
-1 & \text{for }\sqrt{2p + 1} \le x <  \sqrt{2p+2}\\
1 & \text{for }  \sqrt{2p} \le x < \sqrt{2p+1}
\end{cases}$$
where $p \in \mathbb N$. Therefore 
$$\begin{cases}u_{2p}&= \int_{\sqrt{2p}}^{\sqrt{2p+1}} f(x) \ dx = \sqrt{2p+1}-\sqrt{2p}=\frac{1}{\sqrt{2p+1}+\sqrt{2p}}\\
u_{2p+1} &= \int_{\sqrt{2p+1}}^{\sqrt{2p+2}} f(x) \ dx = -(\sqrt{2p+2}-\sqrt{2p+1})=-\frac{1}{\sqrt{2p+2}+\sqrt{2p+1}}
\end{cases}$$
and 
$$0 \le u_{2p}+u_{2p+1} = \frac{2}{(\sqrt{2p+1}+\sqrt{2p})(\sqrt{2p+2}+\sqrt{2p+1})(\sqrt{2p+2}+\sqrt{2p})} \le \frac{1}{p^{3/2}}$$
Finally, the integral $\int_0^\infty f(x) \ dx$ converges as:


*

*The series $\sum 1/p^{3/2}$ converges

*For $\sqrt{2p} \le x < \sqrt{2p+ 2}$, $\left\vert\int_{\sqrt{2p}}^x f(x) \ dx \right\vert \le 1/p^{1/2} \to 0$ as $p \to \infty$.

