An integral involving Fresnel integrals $\int_0^\infty \left(\left(2\ S(x)-1\right)^2+\left(2\ C(x)-1\right)^2\right)^2 x\ \mathrm dx,$ I need to calculate the following integral:
$$\int_0^\infty \left(\left(2\ S(x)-1\right)^2+\left(2\ C(x)-1\right)^2\right)^2 x\ \mathrm dx,$$
where 
$$S(x)=\int_0^x\sin\frac{\pi z^2}{2}\mathrm dz,$$
$$C(x)=\int_0^x\cos\frac{\pi z^2}{2}\mathrm dz$$
are the Fresnel integrals. 
Numerical integration gives an approximate result $0.31311841522422385...$ that is close to $\frac{16\log2-8}{\pi^2}$, so it might be the answer.
 A: Following on from Ron...
Make the substitutions: $x=\sqrt{y}$, $p=1/2+1/2\,\sqrt {1+4\,r}$, to get:
$\displaystyle \dfrac{64}{{\pi }^{2}}\,\int _{0}^{\infty }\!x \left( \int _{1}^{\infty }\!{\frac {\sin
 \left( 2\,\pi \,{x}^{2}p \left( p-1 \right)  \right) }{p}}{dp}
 \right) ^{2}{dx}$,
$\displaystyle=\dfrac{32}{{\pi }^{2}}\,\int _{0}^{\infty }\! \left( \int _{0
}^{\infty }\!{\frac {2\,\sin \left( 2\,\pi\, y\, r \right) }{\sqrt {1+4\,
r} \left( 1+\sqrt {1+4\,r} \right) }}{dr} \right) ^{2}{dy}
$,  see Appendix,

$\displaystyle=\dfrac{16}{{\pi }^{2}}\,\int _{-\infty}^{\infty }\! \left( \int _{0
}^{\infty }\!{\frac {2\,\sin \left( 2\,\pi \,y \,r \right) }{\sqrt {1+4\,
r} \left( 1+\sqrt {1+4\,r} \right) }}{dr} \right) ^{2}{dy}
$,
$\displaystyle=\dfrac{16}{{\pi }^{2}}\,\int _{-\infty}^{\infty }\! \left( \int _{-\infty
}^{\infty }\!{\frac {H(r)\,\sin \left( 2\,\pi \,\,y\,r \right) }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right) ^{2}{dy}
$ :  $H \left( r \right) =\cases{1&$0\leq x$\cr -1&$x<0$\cr}$.
Note then that:
$\displaystyle\left(\int _{-\infty
}^{\infty }\!{\frac {H(r)\,\sin \left( 2\,\pi \,\,y\,r \right) }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right) ^{2}=\displaystyle\left|-\dfrac{i}{2}\int _{-\infty
}^{\infty }\!{\frac {H(r)\,e^{ -i2\pi \,y\,r } }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr}+\dfrac{i}{2}\int _{-\infty
}^{\infty }\!{\frac {H(r)\,e^{ i2\pi\, y\,r } }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right| ^{2}$
$=\displaystyle\left|\int _{\infty
}^{\infty }\!{\frac {\left(H(r)-H(-r)\right)\,e^{ i2\pi \,y\,r } }{2\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right| ^{2}=\displaystyle\left|\int _{\infty
}^{\infty }\!{\frac {\,e^{ i2\pi \,y\,r } }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right| ^{2}.$
We can now use Plancherel's theorem which states:
$\displaystyle \int _{-\infty }^{\infty }\!  \left| f \left( y \right) 
 \right|   ^{2}{dy}=\int _{-\infty }^{\infty }\!  
 \left| F \left( r \right)  \right|   ^{2}{dr}
$ : $ \displaystyle F \left( r \right) =\int _{-\infty }^{\infty }\!f \left( y \right) {
e^{-i2\pi r y}}{dy}
$,
and thus:
$\displaystyle\dfrac{16}{{\pi }^{2}}\,\int _{-\infty}^{\infty }\! \displaystyle\left|\int _{\infty
}^{\infty }\!{\frac {\,e^{ i2\pi \,y\,r } }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }}{dr} \right| ^{2}{dy}$
$=\displaystyle\dfrac{16}{{\pi }^{2}}\,\int _{-\infty}^{\infty }\! \displaystyle\left|{\frac {1 }{\sqrt {1+4\,
|r|} \left( 1+\sqrt {1+4\,|r|} \right) }} \right| ^{2}{dr}$, 
$=\dfrac{16}{{\pi }^{2}}\displaystyle\int _{0}^{\infty }\!{\frac {2}{ \left( 1+4\,r \right)  \left( 1+
\sqrt {1+4\,r} \right) ^{2}}}{dr}$.
Now if we undo the substitution made earlier by letting $r = p^2-p$:
$\dfrac{16}{{\pi }^{2}}\displaystyle\int _{0}^{\infty }\!{\frac {2}{ \left( 1+4\,r \right)  \left( 1+
\sqrt {1+4\,r} \right) ^{2}}}{dr}=\dfrac{16}{{\pi }^{2}}\int _{1}^{\infty }\!{
\frac {1}{2{p}^{2} \left( 2\,p-1 \right) }}{dp}$,
and then make one final substitution $p=\dfrac{1}{q+2}$ we get:
$\displaystyle\dfrac{16}{{\pi }^{2}}\int _{1}^{\infty }\!{
\frac {1}{2{p}^{2} \left( 2\,p-1 \right) }}{dp}=-\dfrac{16}{{\pi }^{2}}\int_{-2}^{-1}\dfrac{1}{2}+\dfrac{1}{q}{dq}=\dfrac{16\ln(2)-8}{\pi^2}$.
Appendix:
Note that the integral: $$\int _{0
}^{\infty }\!{\frac {2\,\sin \left( 2\,\pi \,y \,r \right) }{\sqrt {1+4\,
r} \left( 1+\sqrt {1+4\,r} \right) }}{dr} $$
converges by the Chartier-Dirichlet test because: $$f(r)={\frac {2\, }{\sqrt {1+4\,
r} \left( 1+\sqrt {1+4\,r} \right) }}$$ 
is monotonic and continuous on $ \mathbb R^+ $ and $f(r)\rightarrow0$ as $r\rightarrow \infty$, and because:
$$\left|\int_{0}^{b}\sin\left(2\pi\,y\,r\right){dr}\right|$$
is bounded as $b\rightarrow\infty$.
A: This is not a solution yet, but I think it is a way forward.
Define
$$f(x) = \left (\frac12 - S(x)\right) \cos{\left (\frac{\pi}{2} x^2\right)} - \left (\frac12 - C(x)\right) \sin{\left (\frac{\pi}{2} x^2\right)} $$
$$g(x) = \left (\frac12 - C(x)\right) \cos{\left (\frac{\pi}{2} x^2\right)} + \left (\frac12 - S(x)\right) \sin{\left (\frac{\pi}{2} x^2\right)} $$
Then it is a straightforward exercise to show that
$$g(x) + i f(x) = e^{-i \pi x^2/2} \int_x^{\infty} dt \, e^{i \pi t^2/2}$$
and that
$$(2 S(x)-1)^2 + (2 C(x)-1)^2 = 4 [g(x)^2+f(x)^2] = 4 x^2 \int_1^{\infty} du \, \int_1^{\infty} dv \, e^{i \pi x^2 (u^2-v^2)/2}$$
I can convert the double integral to a single integral by changing coordinates to $p=u+v$, $q=u-v$, $p \in [2,\infty)$, $q \in [-(p-2),p-2]$.  The Jacobian is $1/2$ and we have
$$(2 S(x)-1)^2 + (2 C(x)-1)^2 = 2 x^2 \int_2^{\infty} dp \, \int_{-(p-2)}^{p-2} dq \, e^{i \pi x^2 p q/2}$$
which after evaluation of the inner integral and some rescaling, we get
$$(2 S(x)-1)^2 + (2 C(x)-1)^2 = \frac{8}{\pi} \int_1^{\infty} dp \, \frac{\sin{[2 \pi x^2 p (p-1)]}}{p}$$
I am not sure how to evaluate this integral analytically, nor am I sure that that would be the best move here.  The desired integral is therefore
$$\int_0^{\infty} dx \, x\, [(2 S(x)-1)^2 + (2 C(x)-1)^2]^2 =\\ \frac{64}{\pi^2} \int_0^{\infty} dx \, x\, \int_1^{\infty} dp \, \frac{\sin{[2 \pi x^2 p (p-1)]}}{p} \int_1^{\infty} dq \, \frac{\sin{[2 \pi x^2 q (q-1)]}}{q}$$
From here, I am not quite sure what to do.  Naturally, I would like to reverse the order of integration so that the integral over $x$ is interior, but I am not sure how to justify that, given that the integrals are not absolutely convergent.  Further, even if I can justify that, I think the resulting integral is some delta functions which do not look promising.  I am continuing to look at this, but I figure that maybe someone else can also contribute from here, or just tell me if I am off the mark.
