Computing a derivative from a function that involves an integral
$\newcommand{\bbx}[1]{\,\bbox[15px,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}$ \begin{align} \left.\rule{0pt}{4mm}\mrm{f}\pars{t}\,\right\vert_{\ t\ >\ 0} & \equiv \int_{0}^{\infty}\sin\pars{x^{2}}\expo{-tx^{2}}\,\dd x \,\,\,\stackrel{x^{2}\ \mapsto\ x}{=}\,\,\, {1 \over 2}\int_{0}^{\infty}{\sin\pars{x}\expo{-tx} \over x^{1/2}}\,\dd x \\ & = {1 \over 2}\int_{0}^{\infty}x^{1/2}\expo{-tx}\ \overbrace{\pars{{1 \over 2}\int_{-1}^{1}\expo{-\ic kx}\dd k}} ^{\ds{\sin\pars{x} \over x}}\ \,\dd x = {1 \over 4}\int_{-1}^{1}\int_{0}^{\infty}x^{1/2}\expo{-\pars{t + \ic k}x} \,\dd x\,\dd k \end{align}
Under the change $\ds{\pars{t + \ic k}x \mapsto x}$, the integral over $\ds{x}$ is performed along the 'ray' $\ds{t + \ic k}$ where $\ds{z^{1/2}}$ is its principal branch. A 'closed contour' is built by adding an integration along an arc and along $\ds{\mathbb{R}_{>0}}$. The integral , along the arc vanishes out as its radius $\ds{\to \infty}$ such that
\begin{align} \left.\rule{0pt}{4mm}\mrm{f}\pars{t}\,\right\vert_{\ t\ >\ 0} & = {1 \over 4}\int_{-1}^{1}\pars{t + \ic k}^{-3/2}\ \underbrace{\int_{0}^{\infty}x^{1/2}\expo{-x}\,\dd x} _{\ds{\Gamma\pars{3 \over 2} = {\root{\pi} \over 2}}}\ \,\dd k = {\root{\pi} \over 4} \Re\bracks{\pars{-\,{2 \over \ic}}\pars{t + \ic k}^{-1/2}}_{0}^{1} \\[2mm] & = -\,{\root{\pi} \over 2}\Im\pars{t + \ic}^{-1/2} = -\,{\root{\pi} \over 2}\Im\bracks{\root{t^{2} + 1}\exp\pars{\ic\arctan\pars{1 \over t}}}^{-1/2} \\[5mm] & = {\root{\pi} \over 2}\pars{t^{2} + 1}^{-1/4} \,\sin\pars{\arctan\pars{1/t} \over 2} \\[5mm] & = {\root{\pi} \over 2}\pars{t^{2} + 1}^{-1/4} \root{1 - \cos\pars{\arctan\pars{1/t}} \over 2} \\[5mm] & = {\root{2\pi} \over 4}\pars{t^{2} + 1}^{-1/4} \root{\sec\pars{\arctan\pars{1/t}} - 1 \over \sec\pars{\arctan\pars{1/t}}} \\[5mm] & = {\root{2\pi} \over 4}\pars{t^{2} + 1}^{-1/4} \root{\root{1/t^{2} + 1} - 1 \over \root{1/t^{2} + 1}} \\[2mm] & = {\root{2\pi} \over 4}{1 \over \root{\root{t^{2} + 1}}} \root{\root{t^{2} + 1} - t \over \root{t^{2} + 1}} = \bbx{{\root{2\pi} \over 4}\, {\root{\root{t^{2} + 1} - t} \over \root{t^{2} + 1}}} \end{align}