I am trying to prove that the function $\frac{\sin}{\sqrt{x}}$ is not Lebesgue integrable on $[0, \infty]$. The proof I have seen seems to use a comparison test: \begin{align*} \int_0^{\infty} \left \lvert \frac{\sin x}{\sqrt{x}} \right \rvert = \sum\limits_{k = 0}^{\infty} \int_{k\pi}^{(k+1)\pi} \left \lvert \frac{\sin x}{\sqrt{x}} \right \rvert \ dx \geq \sum\limits_{k=0}^{\infty} \frac{2\pi}{\sqrt{k}}. \end{align*} I am having trouble justifying this equalities. The first step seems to involve defining $\sin x$ as a sequence of functions that is equal to $\frac{\sin x}{\sqrt{x}}$ for $x \in [k \pi, (k+1) \pi]$ and $0$ otherwise. I do not know how to justify the second equality. From there, the last series can either be directly compared to a harmonic series or we can draw on the $p$-series test to conclude that it does not diverge, and therefore our integral of $\frac{\sin x}{x}$ must diverge by the comparison test.
Any help on this would be greatly appreciated.
Note that for $x \in [k\pi, (k+1)\pi]$, $\sin x$ has the same sign and by periodicity
$$\int_{k\pi}^{(k+1)\pi} |\sin x| \, dx = \int_0^\pi \sin x \, dx = 2$$
Thus,
$$\int_{k\pi}^{(k+1)\pi} \frac{|\sin x|}{\sqrt{x}} \, dx \geqslant \frac{1}{\sqrt{(k+1)\pi}}\int_{k\pi}^{(k+1)\pi} |\sin x| \, dx = \frac{2}{\sqrt{\pi}}\frac{1}{\sqrt{k+1}} $$
This corrects your inequality and is enough to show divergence of the integral as we have divergence of the series
$$\sum_{k=1}^\infty \frac{1}{\sqrt{k+1}} = + \infty$$