1.1.2 Pure diffusion. Left end at non zero temperature, right end zero temperature

   1.1.2.1 Example 1

To add analytical solution

1.1.2.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\begin{align*} u\left ( 0,t\right ) & =T_{0}=100^{0}\\ u\left ( L,t\right ) & =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 ) =T_{0}-\frac{T_{0}}{L}x-\frac{4T_{0}}{\pi }\sum _{n=\text{even}}^{\infty }\frac{1}{n}\exp \left ( -\alpha ^{2}\lambda _{n}t\right ) \sin \left ( \sqrt{\lambda _{n}}x\right ) \]

Source code is