Spectral synthesis calculations in stellar (magnetized) atmospheres are bas
ed on the solution of the radiative transfer equation (RTE) for polarized l
ight. The thermodynamic and magnetic properties of the atmospheres, along w
ith the radiation field, completely specify the basic ingredients of the RT
E, after which numerical methods have to be employed to calculate the emerg
ent Stokes spectra. The advent of powerful analysis techniques for the inve
rsion of Stokes spectra has evidenced the need for accurate and fast soluti
ons of the RTE. In this paper we describe a novel Hermitian strategy to int
egrate the polarized RTE that is based on the Taylor expansion of the Stoke
s parameter vector to fourth order in depth. Our technique makes use of the
first derivatives of the absorption matrix and source vector with respect
to the coordinate measured along the ray path. Both analytical and numerica
l results indicate that the new strategy is superior to other methods in te
rms of speed and accuracy. It also gives an approximation to the evolution
operator at no extra cost, which is of interest for inversion algorithms ba
sed on response functions. The Hermitian technique can be straightforwardly
particularized to the scalar case, providing a very efficient solution of
the RTE in the absence of magnetic fields. We investigate in detail the con
sequences of the oscillations that appear in the evolution operator for lar
ge values of line strength eta(o). The problems they pose are shared by all
integration schemes, but can be minimized by adopting nonequally spaced gr
ids.