Heat equation ============= Problem setup ------------- We will solve a heat equation: .. math:: \frac{\partial u}{\partial t}=\alpha \frac{\partial^2u}{\partial x^2}, \qquad x \in [0, 1], \quad t \in [0, 1] where :math:`\alpha=0.4` is the thermal diffusivity constant. With Dirichlet boundary conditions: .. math:: u(0,t) = u(1,t)=0, and periodic(sinusoidal) inital condition: .. math:: u(x,0) = \sin (\frac{n\pi x}{L}),\qquad 0