Solution.
Let f(z)=eiz2 so that if t∈R, then Imf(t)=sint2. For R>0, let γR be the contour
[0,R]∪{Reiθ∣0≤θ≤4π}∪[0,Reiπ/4].
On the arc CR, we have
∣∣∫CRf(z)dz∣∣≤∫0π/4∣∣iReiθeiR2ei2θ∣∣dθ=∫0π/4Re−R2sin2θdθ≤∫0π/4Re−4R2θ/πdθ=−4R2πR(e−R2−1)R→∞0.(concavity of sinθ)
On the segment LR=[0,Reiπ/4],
∫LRf(z)dz=−eiπ/4∫0Reit2eiπ/2dt=−eiπ/4∫0Re−t2dtR→∞−2eiπ/4π.
Thus, by Cauchy's theorem, sending R→∞, and taking imaginary parts,
∫0∞f(x)dx=2eiπ/4π⟹∫0∞sint2dt=42π.