Chaotic motion of a pendulum