\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt

QUESTION

Use the cosine transform to solve the heat equation
$$U_{xx}=cU_t,\ x>0,\ 0<t<\infty,$$ with the boundary conditions
$$U_x(0,t)=0,\ U(x,0)=e^{-\frac{x^2}{2}},\ U,U_x\to 0\textrm{ as }
x\to \infty.$$

\bigskip

ANSWER

$U_{xx}=cU_t,\ x>0,\ 0<t<\infty,\ U_x(0,t)=0,\\
U(x,0)=e^{-\frac{X^2}{2}},\ U,U_x\to 0$ as $x\to \infty$\\ Fourier
cosine transform with respect to $x$ gives $U(\xi,t)$\\
$-U_x(0,t)-\xi^2u=-\xi^2u=cu_t\\ \Rightarrow
u(\xi,t)=u(\xi,0)e^{-\frac{\xi^2}{c}t}$
\begin{eqnarray*}
u(\xi,0)&=&\int_0^\infty e^{-\frac{x^2}{2}}\cos \xi x\,dx\\
&=&\frac{1}{2}\int_{-\infty}^\infty e^{-\frac{x^2}{2}}\cos \xi
x\,dx\\ &=&\frac{1}{2}\textrm{Re}\int_{-\infty}^\infty
e^{-\frac{x^2}{2}}e^{-i\xi x}\,dx\\
&=&\frac{1}{2}\int_{-\infty}^\infty
e^{-\frac{1}{2}(x+i\xi)^2-\frac{\xi^2}{2}}\,dx \\
&=&\frac{1}{2}e^{-\frac{\xi^2}{2}}\int_{-\infty}^\infty
e^{-\frac{1}{2}y^2}\,dy\ \ (\textrm{taking }y=x+i\xi)\\
&=&\frac{1}{2}\frac{1}{\sqrt{2\pi}}e^{-\frac{-\xi^2}{2}}\\
\Rightarrow
u(\xi,t)&=&\frac{1}{2}\frac{1}{\sqrt{2}\pi}e^{-\frac{\xi^2}{2}\left(1+2\frac{t}{c}\right)}
\end{eqnarray*}
$U(x,t)=\frac{2}{\pi}\frac{1}{2}\frac{1}{\sqrt{2}\pi}\int_0^\infty
e^{-\frac{\xi^2}{2}(1+2\frac{t}{c})}\cos\xi x\, d\xi$\\ Change of
variable $\overline{\xi}=\sqrt{1+2\frac{t}{c}}\xi,\
\overline{x}=\frac{x}{\sqrt{1+2\frac{t}{c}}}$

\begin{eqnarray*}
U(x,t)&=&\frac{1}{\sqrt{1+2\frac{t}{c}}}
\frac{2}{\pi}\frac{1}{2}\frac{1}{\sqrt{2}\pi}\int_0^\infty
e^{-\frac{\xi^{-2}}{2}}\cos
\overline{\xi}\overline{x}\,d\overline{\xi}\\
&=&\frac{1}{\sqrt{1+2\frac{t}{c}}}e^{-\frac{\overline{x}^2}{2}}\\
&=&\frac{1}{\sqrt{1+2\frac{t}{c}}}e^{-\frac{x^2}{2}\left(1+2\frac{t}{c}\right)}
\end{eqnarray*}

\end{document}
