Example: The diffusion equation

In one spatial dimension, the equation reads

$$ \begin{equation*} \frac{\partial g(x,t)}{\partial t} = \frac{\partial^2 g(x,t)}{\partial x^2} \end{equation*} $$

where a possible choice of conditions are

$$ \begin{align*} g(0,t) &= 0 ,\qquad t \geq 0 \\ g(1,t) &= 0, \qquad t \geq 0 \\ g(x,0) &= u(x),\qquad x\in [0,1] \end{align*} $$

with \( u(x) \) being some given function.