# Heat equation with initial value

I have a 1-dimensional homogeneous heat equation: $$u''(x, t) = \dot u(x, t)$$

The initial value is $u(x, 0) = \exp\left(-x^2\right)$.

I plugged this into the solution formula: $$u(x, t) = \frac{1}{\sqrt{4 \pi t}} \int_{-\infty}^\infty \mathrm dy \, \exp\left(-\frac{(x-y)^2}{4t} - y^2\right)$$

Since I am not sure how to calculate this integral, I typed it into Mathematica and got:

1/Sqrt[4 Pi t] Integrate[
Exp[((y - x)^2)/(4 t) - y^2], {y, -Infinity, Infinity}]


$$\text{ConditionalExpression}\left[\frac{\exp\left(\frac{x^2}{4 t-1}\right)}{\sqrt{4-\frac{1}{t}} \sqrt{t}},\left(4 \Re(t)\neq 1\lor \Re\left(\frac{x}{t}\right)>0\right)\land \Re\left(\frac{1}{t}\right)<4\right]$$

Plotting this looks strange at best:

For $t=0$, it is not even close to the initial value.

• How do I solve this integral?

• Is what Mathematica gave me correct in some sort?

-

Setting $$\xi=\sqrt{\frac{1+4t}{4t}}\left(y-\frac{x}{1+4t}\right),$$ we have: \begin{eqnarray} \frac{(x-y)^2}{4t}+y^2&=&\frac{(1+4t)y^2-2xy+x^2}{4t}\\ &=&\frac{1+4t}{4t}\left[y^2-\frac{2x}{1+4t}y+\frac{x^2}{1+4t}\right]\\ &=&\frac{1+4t}{4t}\left[\left(y-\frac{x}{1+4t}\right)^2+\frac{x^2}{1+4t}-\frac{x^2}{(1+4t)^2}\right]\\ &=&\frac{1+4t}{4t}\left[\left(y-\frac{x}{1+4t}\right)^2+\frac{4x^2t}{(1+4t)^2}\right]\\ &=&\xi^2+\frac{x^2}{1+4t}. \end{eqnarray} It follows that \begin{eqnarray} u(x,t)&=&\frac{1}{\sqrt{4\pi t}}\int_{-\infty}^\infty\exp\left(-\frac{(x-y)^2}{4t}-y^2\right)\, dy\\ &=&\frac{1}{\sqrt{4\pi t}}\sqrt{\frac{4t}{1+4t}}\exp\left(-\frac{x^2}{1+4t}\right)\int_{-\infty}^\infty\exp(-\xi^2)\, d\xi\\ &=&\frac{1}{\sqrt{\pi(1+4t)}}\exp\left(-\frac{x^2}{1+4t}\right)\int_{-\infty}^\infty\exp(-\xi^2)\, d\xi. \end{eqnarray} Using the fact that $$\int_{-\infty}^\infty\exp(-\xi^2)\, d\xi=\sqrt{\pi},$$ we get $$u(x,t)=\frac{1}{\sqrt{1+4t}}\exp\left(-\frac{x^2}{1+4t}\right).$$

-
Thank you! Is there any way I could have come up with this by myself? Is that $\xi$ something like parabolic coordinates? –  queueoverflow Nov 10 '12 at 16:45