1.1.3 Pure diffusion. Both ends insulated

   1.1.3.1 Example 1

To add solution

1.1.3.1 Example 1

A bar length \(L\)\[ \frac{1}{\alpha ^{2}}\frac{\partial u}{\partial t}=\frac{\partial ^{2}u}{\partial x^{2}}\qquad 0<x<L,t>0 \] Boundary conditions, insulated\begin{align*} \left . \frac{\partial u}{\partial x}\right \vert _{x=0} & =0\\ \left . \frac{\partial u}{\partial x}\right \vert _{x=L} & =0 \end{align*}

Initial conditions\[ u\left ( x,0\right ) =x \] Solution, \(\lambda _{n}=\left ( \frac{n\pi }{L}\right ) ^{2}\)\[ u\left ( x,t\right ) =\frac{L}{2}-\frac{4L}{\pi ^{2}}\sum _{n=\text{odd}}^{\infty }\frac{1}{n^{2}}\exp \left ( -\alpha ^{2}\lambda _{n}t\right ) \cos \left ( \sqrt{\lambda _{n}}x\right ) \]

Source code is