Melnikov function and Poincaré map