I have the following problem: $$u_t=u_{xx}, x \in \mathbb{R}, t>0$$ $$u(x,0)=f(x)=e^{-\frac{x^2}{a^2}}, x \in \mathbb{R}$$
I have found that the solution is of the form:
$$u(x,t)=\frac{1}{2 \pi} \int_{-\infty}^{+\infty}{\widetilde{f}(k) e^{-k^2 t} e^{ikx}}dk$$
$$\widetilde{f}(k)=\int_{-\infty}^{+\infty}{f(x) e^{-ikx}}dx$$
$$\Rightarrow \widetilde{f}(k)=a \sqrt{\pi} e^{-\frac{k^2 a^2}{4}}$$
Then, $$u(x,t)=\frac{1}{2 \pi} \int_{-\infty}^{+\infty}{a \sqrt{\pi} e^{-\frac{k^2 a^2}{4}}e^{-k^2 t} e^{ikx}}dk=\frac{a}{2 \sqrt{\pi}} \int_{-\infty}^{+\infty}{e^{-(\frac{a^2}{4}+t)k^2} e^{ikx}}dk=\frac{a}{2 \sqrt{\pi}} e^{-\frac{x^2}{a^2+4t}}$$
Is this correct??
In my notes the result is $$u(x,t)=\sqrt{\frac{a^2}{4t+a^2}}e^{-\frac{x^2}{a^2+4t}}$$
Which of them is the correct solution?
By differentiating at Mathematica, the solution on the note is correct.
gives the result zero. but your solution gives the result $$\frac{a e^{-\frac{x^2}{a^2+4 t}}}{\sqrt{\pi } \left(a^2+4 t\right)}$$
You made error in integration, according to Mathematica the result should be $$ \frac{2 \sqrt{\pi } e^{-\frac{x^2}{a^2+4 t}}}{\sqrt{a^2+4 t}} $$ You need to complete the square here and use the substitution $k\sqrt{a^2/4+t} = y$ which will give you that factor. $$\frac{a}{2 \sqrt{\pi}} \int_{-\infty}^{+\infty}{e^{-(\frac{a^2}{4}+t)k^2} e^{ikx}}dk$$