Convergence of $\sum_{n=1}^\infty\mu(n)\int_0^1\cos\left(\sqrt{\pi n z}\right)dz$, where $\mu(n)$ is the Möbius function I was interested from the MathWorld's article about the so-called Meijer G-Function to compute integrals of similar functions $$\int_0^1\cos\left(\sqrt{\pi n z}\right)dz.\tag{1}$$
And from this $(1)$ to compute using Wolfram Alpha online calculator partial sums of $$\sum_{n=1}^\infty\mu(n)\int_0^1\cos\left(\sqrt{\pi n z}\right)dz=\frac{2}{\pi}\sum_{n=1}^\infty\frac{\mu(n)}{n}\left(\sqrt{\pi n}\sin\left(\sqrt{\pi n }\right)+\cos\left(\sqrt{\pi n }\right)-1\right),\tag{2}$$
where $\mu(n)$ denotes the Möbius function, see this MathWorld.

Question. Is it possible to prove that $$\sum_{n=1}^\infty\mu(n)\int_0^1\cos\left(\sqrt{\pi n z}\right)dz$$ does converge? Thanks in advance.

If this question or similar was in the literature feel free to refer it, answering this question as a reference request. Then I can to search and read those statements.
 A: Well, the integral is fairly easy to do:
\begin{equation}
\int_0^1 \cos (\sqrt{\pi n z}) dz = 2\int_0^1 y \cos(\sqrt{\pi n} y) dy = 2 [\frac{1}{\sqrt{\pi n}} y \sin(\sqrt{\pi n} y) + \frac{1}{\pi n} \cos(\sqrt{\pi n} y)] |_0^1 = \frac{2}{\sqrt{\pi n}} \sin(\sqrt{\pi n}) + \frac{2}{\pi n} (\cos(\sqrt{\pi n}) -1)
\end{equation}
Now, the sum involving $\mu(n)/n$ might(?) converge, and the sum involving $\mu(n)/\sqrt{n}$ -- well, that may converge conditional on the Riemann Hypothesis.  But I can't see any easy way of proving either statement.  And I also don't see any reason there should be a cancellation between the two.
A: We want to calculate $S=\sum_{n=1}^\infty\mu(n)\int_0^1\cos\left(\sqrt{\pi n z}\right)dz$. First we try to calculate $\int_0^1\cos\left(\sqrt{\pi n z}\right)dz$ somehow. To do that we do the followings:
$$\int_0^1\cos\left(\sqrt{\pi n z}\right)dz=\int_0^1 2u\cos\left(\sqrt{\pi n }u\right)du=2(\frac{\sin \sqrt{\pi n}}{\sqrt{\pi n}}+\frac{\cos \sqrt{\pi n}-1}{\pi n})$$ Therefore the summation can be written as follows:
$$S=2\sum_{n=1}^\infty\mu(n)(\frac{\sin \sqrt{\pi n}}{\sqrt{\pi n}}+\frac{\cos \sqrt{\pi n}-1}{\pi n})$$ Now we prove that $X=\sum_{n=1}^\infty\frac{\sin \sqrt{\pi n}}{\sqrt{\pi n}}+\frac{\cos \sqrt{\pi n}-1}{\pi n}$ is convergent and then we conclude the same for $S$. By Cauchy root test we have:
$$L=lim_{n\to\infty}|\frac{\sin \sqrt{\pi n}}{\sqrt{\pi n}}+\frac{\cos \sqrt{\pi n}-1}{\pi n}|^{\frac{1}{n}}$$$$=lim_{u\to 0}|{u\sin {1\over u}}+u^2({\cos {1\over u}-1)}|^{\pi u^2}$$
By substituting using Taylor series we get:
$$L=lim_{u\to 0}|1-{1\over{6u^2}}+O(\frac{1}{u^4})-\frac{1}{2}+\frac{1}{24u^2}+O(\frac{1}{u^4})|^{\pi u^2}$$$$=lim_{u\to 0}|\frac{1}{2}-{1\over{8u^2}}+O(\frac{1}{u^4})|^{\pi u^2}$$$$=lim_{u\to 0}(\frac{1}{2})^{\pi u^2}|1-{1\over{4u^2}}+O(\frac{1}{u^4})|^{\pi u^2}$$$$=lim_{u\to 0}|1-{1\over{4u^2}}|^{\pi u^2}=lim_{u\to 0}|1-{1\over{4u^2}}|^{{4u^2}{\pi\over 4}}=1$$
which implies on $X$ being convergent. Since $\mu(n)$ is a function taking on values $-1,0,1$ therefore it keeps the limit of the general sequence $<1$ and also implies in convergence of S.
