1-dimensional Heat Equation I have to solve the following differential equation:
$$ \partial _t u(x,t) = D \partial ^2_x u(x,t) $$
with the initial condition $$ u(x,0)=\exp \left( -100^2 \left( x-\frac{1}{2} \right) ^2 \right) .$$
The $x$ and the $t$ Interval is [0,1].
The Boundary Conditions are $$u(0,t) = u(1,t) = 0.$$
I tried to use Fourier Transformation but I dont know how to deal with the initial condition.
 A: This equation does not require the Fourier transform, as a linear, homogenous PDE with well behaved accessory conditions, it can be solved via the method of separation of variables.
Seek a solution of the form
U(x,t)=T(t)X(x)
and substitute this expression into the PDE
T'(t)=DX''(x)=λ (where λ is a constant)
from here you can get a regular Sturm-Louisville problem
X''+λX=0
with eigenvalues and functions λ=(nπ)^2, X(x)=sin(nπx)
and the solution will be a sum (Fourier series) of the eigenfunctions of that problem. (I haven't outlined the whole method here because it takes some time. However, if you Google "solution to homogenous one dimension heat equation with insulated endpoints" you should find the method pretty easily)
A: As others have already pointed out, there exist many methods for solving this equation (separation of variables, integral transforms, Green's function approach, etc.) One thing that is worth noting is that here we are dealing with a problem with initial conditions. Thus, if we pursue the solution using Fourier transform, then it makes sense to use this transform for both $u(x,t)$ and $u(x,0)$ in respect to $x$, but to use the Laplace transform in respect to $t$ - this way the initial condition is incorporated seamlessly.
