We present an extension of the Kompaneets equation which allows relativistic effects to be included to any desired order. Using this, we are able to obtain simple analytic forms for the spectral changes due to the Sunyaev-Zeldovich effect in hot clusters, correct to first and second order in the expansion parameter theta(e) = k(B)T(e)/mc(2). These analytic forms agree with previous numerical calculations of the effect based upon the multiple scattering formalism and are expected to be very accurate over all regions of the cosmic microwave background spectrum for k(B)T(e) up to similar to 10 keV. Our results confirm previous conclusions that the result of including relativistic corrections in the Sunyaev-Zeldovich effect is a small I eduction in the amplitude of the effect over the majority of the spectrum: specifically, we find Delta T/T = -2y(1 -17/10 theta(e) + 123/40 theta(e)(2)) (correct to second order) in the Rayleigh-Jeans region, where y is the usual Comptonization parameter. For atypical cluster temperature of 8 keV, this amounts to a correction downward to the value of the Hubble constant derived using combined X-ray and Rayleigh-Jeans Sunyaev-Zeldovich information by about 5%.