I obtained the following two expressions for the same quantity (I will call them $f_1$ and $f_1$ below):
$f_1 = \frac{x}{\sqrt{4\pi k}} \int_0^t \frac{\sin(s w)}{(t-s)^{3/2}} e^{-\frac{x^2}{4k(t-s)}} ds$
and
$f_2 = \sqrt{\frac{2w}{\pi}} \int_0^t \frac{g(s,w)}{(t-s)^{1/2}} e^{-\frac{x^2}{4k(t-s)} }$ds
where
$g(s,w):= S(\sqrt{\frac{2 s w}{\pi}})\sin(s w) + C(\sqrt{\frac{2 s w}{\pi}}) cos(s w)$
with $S$ and $C$ Fresnel functions, i.e.
$S(x)= \int_0^x \sin(\pi y^2/2) dy, \ \ \ C(x)= \int_0^x \cos(\pi y^2/2) dy $
As stated, I have an indirect argument that $f_1=f_2$, but I cannot show it from these expressions for the integrals. I have numerical verified for a number of different choices of parameters that they give the same result. Note that the expression for $f_1$ is a bit misleading since, at $x=0$, it can be verified with a change of coordinates $\mu= x/\sqrt{4\pi (t-s)}$ that $f_1=\sin(\omega t)$, but at first glance from the expression written above, $f_1=0$. Anyway, any insight would be greatly appreciated. Thanks!
First note that $f_2$ can be rewritten as follows: \begin{align}\label{altTempRep2} f_2 = \frac{\omega}{\pi} \int_{0}^t \!\! ds \int_{0}^s \!\! ds' \frac{\cos(\omega s')}{\sqrt{s-s'}\sqrt{t-s}} e^{-\frac{x^2}{4\kappa(t-s)}} \end{align} Then, by exchanging the orders of integration and changing variables to $\mu = {x}/{\sqrt{4\kappa (t-s)}}$ we have: \begin{align} f_2&\sim \frac{\omega}{\pi\sqrt{\kappa}} \int_{0}^t \!\! ds' \cos(\omega s') \int_{\frac{x}{\sqrt{4\pi(t-s')}}}^\infty \!\! \!\! \!\! d\mu \ x\mu^{-2} \left(t-s'- \frac{x^2}{4\kappa \mu^2}\right)^{-1/2} e^{-\mu^2}\\ &= \frac{4 \omega\sqrt{\kappa} }{\pi} \frac{d}{dx} \int_{0}^t \!\! ds' \cos(\omega s') \int_{\frac{x}{\sqrt{4\pi(t-s')}}}^\infty \!\! \!\! \!\! d\mu \ \left(t-s'- \frac{x^2}{4\kappa \mu^2}\right)^{1/2} e^{-\mu^2}\\ &= \omega \int_{0}^t \!\! ds' \ \cos(\omega s') \ {\rm erfc}\left(\frac{x}{\sqrt{4\kappa(t-s')}}\right). \end{align} It is now straightforward to obtain the formula $f_1$ by changing variables and exchanging order of integrations.