# Computing a derivative from a function that involves an integral

Let $f$ be a function such that $$f(t)=\int_0^\infty \frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx,\;t>0:$$ find $f'(t)$.

My attempt: \begin{align} f(t)&=\int_0^\infty\frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx\\ \frac{df}{dt}&=\frac{d}{dt}\int_0^\infty\frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx\\ &=\int_0^\infty\frac{d}{dt}\frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx\\ &=\int_0^\infty\frac{\sin(x^2)}{x^2}\frac{d(e^{-tx^2})}{dt}\,dx\\ &=-\int_0^\infty\sin(x^2)\,e^{-tx^2}\,dx. \end{align} Then I used that $2i\sin(x)=e^{ix}-e^{-ix}$ and $\displaystyle\int_{-\infty}^{+\infty}e^{-ax^2}\,dx=\sqrt{\frac{\pi}{a}}$ to achieve \begin{align} \int_0^\infty\sin(x^2)\,e^{-tx^2}\,dx&=\int_0^\infty\frac{e^{ix^2}-e^{-ix^2}}{2i}\,e^{-tx^2}\,dx\\ &=\frac{1}{2i}\int_0^\infty\left[e^{(i-t)x^2}-e^{-(i+t)x^2}\right]\,dx\\ &=\frac{1}{2i}\left[\int_0^\infty e^{(i-t)x^2}\,dx-\int_{0}^{\infty}e^{-(i+t)x^2}\,dx\right]\\ &=\frac{\sqrt{\pi}}{4i}\left(\sqrt{\frac{1}{t-i}}-\sqrt{\frac{1}{t+i}}\right). \end{align} Is my answer correct? And how can I approach this problem?

• Certainly if the derivative exists, it is real, so if your answer is correct, there is still some simplification that can be done. – Simply Beautiful Art Apr 30 '18 at 16:39
• WolframAlpha agrees with your final result on the last two integrals. – Simply Beautiful Art Apr 30 '18 at 16:41
• You are correct , but one suggestion is that you should write $\int_{0}^{\infty}\frac{d}{dt}\frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx$ as $\int_{0}^{\infty}\partial_t\frac{\sin(x^2)e^{-tx^2}}{x^2}\,dx$ where $\partial_t$ is the partial derivative wrt $t$. – The Integrator Apr 30 '18 at 16:45


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}

• The step where $e^{-(t+ik)x}$ becomes $e^{-x}$, that is $x\mapsto(t+ik)^{-1}x$, requires justification via contour integration. The two integrals differ by a piece at extreme distance that vanishes; however, the fact that it vanishes needs to be mentioned. – robjohn May 1 '18 at 13:17
• @robjohn Thanks. Fixed. It became so common that 'sometimes' we think it doesn't need to be mentioned. – Felix Marin May 1 '18 at 17:38

Since $$(t\pm i)^{1/2}=\sqrt{\frac{t+\sqrt{t^2+1}}2}\pm i\sqrt{\frac{-t+\sqrt{t^2+1}}2}\tag1$$ we can simplify the integral using contour integration as \newcommand{\Im}{\operatorname{Im}} \begin{align} \int_0^\infty\sin\left(x^2\right)\,e^{-tx^2}\,\mathrm{d}x &=\Im\left((t-i)^{-1/2}\int_0^\infty e^{-(t-i)x^2}\,\mathrm{d}(t-i)^{1/2}x\right)\tag2\\ &=\Im\left((t-i)^{-1/2}\int_0^{(t-i)^{1/2}\infty} e^{-x^2}\,\mathrm{d}x\right)\tag3\\ &=\Im\left((t-i)^{-1/2}\int_\gamma e^{-z^2}\,\mathrm{d}z\right)\tag4\\ &=\Im\left((t-i)^{-1/2}\int_0^\infty e^{-z^2}\,\mathrm{d}z\right)\tag5\\ &=\frac{\sqrt{-t+\sqrt{t^2+1}}}{\sqrt{t^2+1}}\frac{\sqrt\pi}{2\sqrt2}\tag6 \end{align} Explanation:
$(2)$: $\sin\left(x^2\right)=\Im\left(e^{ix^2}\right)$
$(3)$: Substitute $x\mapsto(t-i)^{-1/2}x$
$(4)$: no singularities between $\left[0,(t-i)^{1/2}R\right]$
$\phantom{(4)\text{:}}$ and $\gamma=\left[0,R\right]\cup\left[R,(t-i)^{1/2}R\right]$
$(5)$: integral along $\left[R,(t-i)^{1/2}R\right]$ vanishes
$(6)$: apply $(1)$

The complex change of variables needs justification by contour integration.