Galerkin methods for a forward-backward heat equation