A variational formulation of the Nagumo reaction–diffusion equation and the Nagumo telegraph equation