In this paper a mathematical simulation of a simplified internal combustion engine is presented. To contribute engine kinematics and its geometry, simple relations are derived for constrained motions. The equation of motion for the piston forms a singular boundary value problem. The uniqueness of the solution was studied in the Banach space. For solving governing equations an iterative numerical algorithm was used and the numerical method has shown very fast convergency. With this simulation the thermodynamics of expansion process is coupled with piston dynamics. Simulating an engine working at constant torque and polytropic expansions has shown high frequency piston vibration under certain conditions.