$\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?

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$.

