Representation of potential energy surfaces by discrete polynomials: proton transfer in malonaldehyde