TITLE: Real Analysis Methodologies to show $\gamma =2\int_0^\infty \frac{\cos(x^2)-\cos(x)}{x}\,dx$
QUESTION [9 upvotes]: In THIS ANSWER, I used straightforward complex analysis to show that 

$$\gamma =2\int_0^\infty \frac{\cos(x^2)-\cos(x)}{x}\,dx \tag 1$$

where $\gamma =-\int_0^\infty \log(x) e^{-x}\,dx$ is the Euler-Mascheroni Constant.
The key in the derivation of $(1)$ was to transform the cosine terms into real exponential ones.  
To date, I have been unable to use strictly real analysis, without appealing to tabulated results of special functions (e.g., use of the $\text{Cin}(x)$ and $\text{Ci}(x)$ functions), to prove $(1)$.  
I have tried introducing a parameter and using "Feynman's Trick to augment the integral into something manageable.  Or somewhat equivalently, rewriting the integral in $(1)$ as a double integral and proceeding by exploiting Fubini-Tonelli.  

QUESTION:  What are ways to prove $(1)$ without relying on complex analysis and without simply appealing to tabulated relationships of special functions.  For example, stating that the $Ci(x)$ function is defined as $\text{Ci}(x)\equiv -\int_x^\infty\frac{\cos(t)}{t}\,dt=\gamma +\log(x) +\int_0^x \frac{\cos(t)-1}{t}\,dt$ is unsatisfactory unless one proves the latter equality.

REPLY [3 votes]: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

A '$\ds{\color{#f00}{complex\ like}}$' answer can still be useful for other users. So, that is the reason I like to put forward the following answer:

\begin{align}
&2\int_{0}^{\infty}{\cos\pars{x^{2}} - \cos\pars{x} \over x}\,\dd x =
2\lim_{\Lambda \to \infty}\bracks{%
\int_{0}^{\Lambda}{1 - \cos\pars{x} \over x}\,\dd x -
\int_{0}^{\Lambda}{1 - \cos\pars{x^{2}} \over x}\,\dd x}
\\[5mm] = &\
2\lim_{\Lambda \to \infty}\bracks{%
\int_{0}^{\Lambda}{1 - \cos\pars{x} \over x}\,\dd x -
{1 \over 2}\int_{0}^{\Lambda^{2}}{1 - \cos\pars{x} \over x}\,\dd x}
\label{1}\tag{1}
\end{align}


With $\ds{R > 0}$:

\begin{align}
&\int_{0}^{R}{1 - \cos\pars{x} \over x}\,\dd x =
\Re\int_{0}^{R}{1 - \expo{\ic x} \over x}\,\dd x
\\[5mm] = &
-\Re\int_{0}^{\pi/2}\bracks{1 - \exp\pars{\ic R\expo{\ic\theta}}}\ic\,\dd\theta -
\Re\int_{R}^{0}{1 - \expo{-y} \over y}\,\dd y
\\[5mm] = &\
-\int_{0}^{\pi/2}\sin\pars{R\cos\pars{\theta}}
\expo{-R\sin\pars{\theta}}\,\dd\theta +
\ln\pars{R}\pars{1 - \expo{-R}} - \int_{0}^{R}\ln\pars{y}\expo{-y}\,\dd y
\\[5mm] \stackrel{\mrm{as}\ R\ \to\ \infty}{\sim}\,\,\, &\
\ln\pars{R} - \int_{0}^{\infty}\ln\pars{y}\expo{-y}\,\dd y =
\bbx{\ds{\ln\pars{R} + \gamma}}
\label{2}\tag{2}
\end{align}

because

$$
\left\{\begin{array}{l}
\ds{0 < \verts{\int_{0}^{\pi/2}\sin\pars{R\cos\pars{\theta}}
\expo{-R\sin\pars{\theta}}\,\dd\theta} < \int_{0}^{\pi/2}
\exp\pars{-\,{2R \over \pi}\,\theta}\,\dd\theta =
{\pi \over 2}\,{1 - \expo{-R} \over R}}
\\[5mm]
\mbox{and}\
\ds{\int_{0}^{\infty}\ln\pars{y}\expo{-y}\,\dd y =
\left.\totald{}{\mu}\int_{0}^{\infty}y^{\mu}\expo{-y}\,\dd y\,
\right\vert_{\ \mu\ =\ 0} =
\left.\totald{\Gamma\pars{\mu + 1}}{\mu}\right\vert_{\ \mu\ =\ 0} = \Psi\pars{1} = -\gamma}
\end{array}\right.
$$

With \eqref{1} and \eqref{2}:
\begin{align}
2\int_{0}^{\infty}{\cos\pars{x^{2}} - \cos\pars{x} \over x}\,\dd x & =
2\braces{\bracks{\ln\pars{\Lambda} + \gamma} -
{1 \over 2}\bracks{\ln\pars{\Lambda^{2}} + \gamma}} = \bbx{\ds{\gamma}}
\end{align}