In this paper a simple pendulum equation with damping term is found for a free-electron laser. The equation is solved by using iteration in small signal regime and the formula of the gain function obtained corresponds to the iteration solution. Particularly, the simplified formulae are also derived of the gain function in both weak damping and overdamping regimes in free-electron lasers, and the origin and the physical meaning of the damping term in the simple pendulum equation are discussed in detail.