We study the generalized Kompaneets equation ( kinetic equation for the photon distribution function taking into account the Compton scattering by electrons ) using a relativistically covariant formalism . Using the generalized Kompaneets equation , we derive an analytic expression for the Sunyaev-Zel ’ dovich effect , which takes into account up to O ( \theta _ { e } ^ { 5 } ) terms , where \theta _ { e } = k _ { B } T _ { e } / mc ^ { 2 } is the relativistic expansion parameter and T _ { e } is the electron temperature . We carefully study the applicable region of the obtained analytic expression by comparing with the result of the direct numerical integration . We conclude that the present analytic expression can be reliably applied to the calculation of the Sunyaev-Zel ’ dovich effect for k _ { B } T _ { e } \leq 15 { keV } , which is the highest electron temperature in the presently known clusters of galaxies . Therefore , the present analytic expression can be applied to all known clusters of galaxies .