Is $\int_0^\infty \frac{\cos(x)}{\sqrt{x}}$ lebesgue integrable and improper Riemann integrable? I know from complex analysis that $\int_0^\infty \frac{\cos(x)}{\sqrt{x}}dx = \sqrt{\frac{\pi}{2}}$, so the function is improper Riemann integrable, but I am having trouble showing it without using complex analysis. I think the function is not Lebesgue integrable, but I'm not sure about my proof.
$\int_{(n-1)\pi}^{n\pi} \frac{|\cos(x)|}{\sqrt{x}}>\sqrt{\frac{1}{n\pi}}\int_{(n-1)\pi}^{n\pi}|\cos(x)|>2\sqrt{\frac{1}{n\pi}}$, so $\sum_{n=1}^\infty\int_{(n-1)\pi}^{n\pi} \frac{|\cos(x)|}{\sqrt{x}}$ doesn't converge. Does that seem right? How would I show its improper Riemann integrable? Thanks a lot.
 A: To show that the integral $I=\int_0^\infty \frac{\cos(x)}{\sqrt{x}}\,dx$ exists as an improper Riemann integral, we proceed as follows.   We express the integral of interest as the sum
$$\int_0^L \frac{\cos(x)}{\sqrt x}\,dx=\int_0^1 \frac{\cos(x)}{\sqrt x}\,dx+\int_1^L \frac{\cos(x)}{\sqrt x}\,dx\tag 1$$
The first integral on the right-hand side of $(1)$ is absolutely integrable such that $2\cos(1)\le \int_0^1 \frac{\cos(x)}{\sqrt x}\,dx\le 2$.
For the second integral on the right-hand side of $(1)$, we integrate by parts with $u=x^{-1/2}$ and $v=\sin(x)$ to reveal
$$\int_1^L \frac{\cos(x)}{\sqrt x}\,dx=\left(\frac{\sin(L)}{\sqrt L}-\sin(1)\right)+\frac12\int_1^L \frac{\sin(x)}{x^{3/2}}\,dx\tag 2$$
Inasmuch as the second integral on the right-hand side of $(2)$ absolutely converges as $L\to \infty$, the integral on the left-hand side converges (it does not absolutely converge).
Putting it together, we have shown that the integral in $(1)$ converges and exists as an improper Riemann integral.
