Reading Schwartz's quantum field theory book p.220, I came across certain integral : he calculated commutator for a scalar field as
$$[\phi(x) , \phi(y)] = \frac{-i}{2\pi^{2}}\int^{\infty}_{0} q^{2}dq\frac{\operatorname{sin}(\sqrt{q^{2}+m^{2}}t)}{\sqrt{q^{2}+m^2}} \frac{\operatorname{sin}(qr)}{qr} =: iD(t,r)$$.
Whatever the physical content, let's focus on this integration. We are faced with the problem of representing the above integral in terms of the Besel function. He(the author) wrote that "For $m\neq 0$, we can find an exact expression for $D(t,r)$ in terms of the Bessel functions $\mathcal{J_0}(x)$ :
$$D(t,r)=\frac{1}{4\pi r} \frac{\partial}{\partial r} \begin{cases} \mathcal{J}_0(m\sqrt{t^2-r^2)}, & t >r \\ 0, & r >t >-r \\ -\mathcal{J}_0(m\sqrt{t^2-r^2)}, & t<-r \\ \end{cases} $$."
And how such expression can be deduced? I can't do computation at all. In fact I found a same question someone posted but I don't know how to continue calculation to next step : Rewrite integral in terms of Bessel functions. I think that I am begginer to integration involving trigonometric functions-combined as somewhat complex manner- and its expression as a Bessel function. Can anyone help?
My first attempt is as follows. In the linked question, I understood upto next step : i.e., Let $q=m\sinh u$ ,
Then $dq=(m\cosh u )du$. So,
$$-D(t,r) = \int_{0}^{\infty}\dfrac{q^2}{2\pi^2}\dfrac{\sin(\sqrt{q^2+m^2}t)}{\sqrt{q^2+m^2}}\dfrac{\sin (qr)}{qr}~dq$$
$$=\int_{0}^{\infty}\dfrac{m^2\sinh^2u}{2\pi^2}\dfrac{\sin\left(t\sqrt{m^2\sinh^2u+m^2}\right)}{\sqrt{m^2\sinh^2u+m^2}}\dfrac{\sin(rm\sinh u)}{rm\sinh u}~(m\cosh u)du$$
$$=\dfrac{m}{2\pi^2r}\int_{0}^{\infty}\sin(mr\sinh u)\sin(mt\cosh u)\sinh u~du$$
$$=\dfrac{m}{4\pi^2r}\int_{0}^{\infty}\cos(mr\sinh u-mt\cosh u)\sinh u~du-\dfrac{m}{4\pi^2r}\int_{0}^{\infty}\cos(mr\sinh u+mt\cosh u)\sinh u~du$$.
On the other hand, note that the Bessel function can be represented as :
$$\mathcal{J}_0(x) = \frac{2}{\pi}\int_{0}^{\infty}\operatorname{sin}(x\operatorname{cosh}t)dt $$ for $ x>0$. ( c.f. 10.9.9 in https://dlmf.nist.gov/10.9#i )
Let $t>r$. Then
$$ \frac{\partial}{\partial r}\mathcal{J}_0(m\sqrt{t^2-r^2})= \frac{2}{\pi}\int_{0}^{\infty}\frac{\partial}{\partial r}\operatorname{sin}(m\sqrt{t^2-r^2}\operatorname{cosh}t)dt$$
$$ = \frac{2}{\pi}\int_{0}^{\infty}\operatorname{cos}(m\sqrt{t^2-r^2}\operatorname{cosh}t) \frac{\partial}{\partial r}(m\sqrt{t^2-r^2}\operatorname{cosh}t) dt $$ $$ = \frac{2}{\pi}\int_{0}^{\infty}\operatorname{cos}(m\sqrt{t^2-r^2}\operatorname{cosh}t)(m\operatorname{cosh}t)\frac{1}{\sqrt{t^2-r^2}}(-2r) dt $$
(Correct calculation?) Then how can we connect two calculations about objects $D(t,r)$ and $\frac{1}{4\pi r} \frac{\partial}{\partial r}\mathcal{J}_0(m\sqrt{t^2-r^2})$ ? I don't know how to proceed to next step of calculation. Can anyone help?