From contour integration, we get: $$f(x,t) = \frac{1}{\pi}\int_{0}^{\infty} \exp(-ut) \sin(\sqrt\frac{u}{k} x) \frac{du}{u}$$ Then my instructor just wrote:
$$f(x,t) = \left(\text{erf} \left(\frac{x}{2\sqrt{kt}}\right)\right) $$
My instructor did a couple of confusing substitutions and then just wrote that the 1st equation is equal to the second equation. Could someone clarify how my instructor got from the 1st equation to the 2nd equation?
What I suppose your instructor did is the following.
He probably considered $$I=\Im \Bigg[ \int e^{- u t} \,e^{i x \sqrt{\frac{u}{k}}}\,\frac {du}u\Bigg]$$ combined the two exponentials together, make $tu=v^2$ to arrive at $$2\int \exp\left(-v^2+ \frac{ix}{\sqrt{k t}}v\right)\,\frac {dv}v$$ There is no antiderivative available (but the integral between $0$ and $\infty$ must exist.
In any manner, you see here all the elements required to arrive to the error function.
Sorry but I do not have the time to finish (may be later).