Fourier sine transform problem I would just like to check that the following is correct. I am given the Fourier equation:
$$\frac{\partial\phi}{\partial t}=\alpha\frac{\partial^2\phi}{\partial x^2}\,\,\,\,\,\,\,x,t\ge0$$
subject to:
$$\phi(x,0)=g(x),\,\,\phi(0,t)=0$$
where:
$$g(x)=\begin{cases}1&0\le x<1\\0&1\le x<\infty\end{cases}$$
I have firstly defined the following things:
$$\mathcal{F}_s[g(x)]=G_s(\omega)=\int_0^\infty g(x)\sin(\omega x)\,dx=\int_0^1 \sin(\omega x)\,dx=\frac{1-\cos\omega}{\omega}$$
$$\mathcal{F}_s[\phi(x,t)]=\varphi_s(\omega,t)$$
Now taking the transform of the PDE I got:
$$\partial_t\varphi_s+\alpha\omega^2\varphi_s=0$$
$$\varphi_s=\Omega(\omega)e^{\lambda t}\Rightarrow \lambda=-\alpha\omega^2$$
$$\therefore \varphi_s=\Omega e^{-\alpha\omega^2 t}$$

Then:
$$\phi(x,0)=g(x)\Rightarrow \varphi_s(\omega,0)=G_s(\omega)\therefore \Omega(\omega)=G_s(\omega)$$
and finally:
$$\phi(x,t)=\mathcal{F}_s^{-1}\left[\frac{1-\cos\omega}{\omega}e^{-\alpha\omega^2 t}\right]=\frac{2}{\pi}\int_0^\infty\frac{1-\cos\omega}{\omega}e^{-\alpha\omega^2 t}\sin(\omega x)\,d\omega$$
And I was asked to leave it in the form of an integral. However, I am concerned that all of the integral calculators don't seem to be able to even approximate this which makes me think I've made a mistake.
Thanks :)
 A: Your calculation is correct. As noted by mattos in the comments, you can check this without evaluating the integral. The initial condition and the boundary condition are clearly satisfied and for $t>0$ the exponential term allows you to differentiate under the integral sign to see that your result is indeed a solution to the heat equation.
However, it is also possible to compute the integral in terms of the error function $\operatorname{erf}$. Consider the function $\psi \colon \mathbb{R} \to \mathbb{R}$ defined by
$$ \psi (u) = \int \limits_0^\infty \frac{\sin(u s)}{s} \, \mathrm{e}^{-s^2} \, \mathrm{d} s \, .$$
We have $\psi(0)=0$ and we can differentiate under the integral sign to find
\begin{align}
\psi' (u) &= \int \limits_0^\infty \cos(u s) \, \mathrm{e}^{-s^2} \, \mathrm{d} s = \frac{1}{2} \int \limits_{-\infty}^{\infty} \mathrm{e}^{\mathrm{i} u s - s^2} \, \mathrm{d} s = \frac{1}{2} \mathrm{e}^{-u^2/4} \int \limits_{-\infty}^{\infty} \mathrm{e}^{- (s - \mathrm{i} u/2)^2} \, \mathrm{d} s \\
&\stackrel{(\ast)}{=} \frac{1}{2} \mathrm{e}^{-u^2/4} \int \limits_{-\infty}^{\infty} \mathrm{e}^{- s^2} \, \mathrm{d} s = \frac{\sqrt{\pi}}{2} \, \mathrm{e}^{-u^2/4}
\end{align}
for $u \in \mathbb{R}$. $(\ast)$ follows from Cauchy's integral theorem. This implies
$$ \psi (u) = \int \limits_0^u \frac{\sqrt{\pi}}{2} \, \mathrm{e}^{-v^2/4} \, \mathrm{d} v = \sqrt{\pi} \int \limits_0^{u/2} \mathrm{e}^{- w^2} \, \mathrm{d} w = \frac{\pi}{2} \operatorname{erf} \left(\frac{u}{2}\right) $$
for $u \in \mathbb{R}$. Your integral is
\begin{align}
\phi (x,t) &= \frac{2}{\pi} \int \limits_0^\infty \frac{(1 - \cos(\omega)) \sin(x \omega)}{\omega} \, \mathrm{e}^{- \alpha t \omega^2} \, \mathrm{d} \omega \\
&= \frac{2}{\pi} \int \limits_0^\infty \frac{\sin(x \omega) - \frac{1}{2}[\sin((x-1)\omega) + \sin((x+1)\omega)]}{\omega} \, \mathrm{e}^{- \alpha t \omega^2} \, \mathrm{d} \omega \\
&\!\!\!\!\!\!\stackrel{s = \sqrt{\alpha t} \omega}{=} \frac{2}{\pi} \int \limits_0^\infty \frac{\sin\left(\frac{x}{\sqrt{\alpha t}} s\right) - \frac{1}{2}\left[\sin\left(\frac{x-1}{\sqrt{\alpha t}} s\right) + \sin\left(\frac{x+1}{\sqrt{\alpha t}} s\right)\right]}{s} \, \mathrm{e}^{- s^2} \, \mathrm{d} s \\
&= \frac{2}{\pi} \left[\psi \left(\frac{x}{\sqrt{\alpha t}}\right) - \frac{1}{2} \psi \left(\frac{x-1}{\sqrt{\alpha t}}\right) - \frac{1}{2} \psi \left(\frac{x+1}{\sqrt{\alpha t}}\right)\right] \\
&= \operatorname{erf} \left(\frac{x}{2\sqrt{\alpha t}}\right) - \frac{1}{2} \operatorname{erf} \left(\frac{x-1}{2\sqrt{\alpha t}}\right) - \frac{1}{2} \operatorname{erf} \left(\frac{x+1}{2\sqrt{\alpha t}}\right) \, .
\end{align}
While WolframAlpha does seem unable to do this integral (with standard computation time), there is a simple trick you can use to get the desired result: Replace the external variables in your integral (here: $x$ and $\alpha t$) by mathematical constants (from the domain of the variables). They should be somewhat obscure; do not use constants that you expect to appear naturally in the result ($\pi$ is a bad idea in our example). Then see if WA can compute the integral with the constants and, if so, replace them with the variables in the end. This does not always work of course, but it does in this case.
