A general numerical solution of the dispersion integral relation between th
e real and the imaginary parts of the nuclear optical potential is presente
d. Fast convergence is achieved by means of the Gauss-Legendre integration
method, which offers accuracy, ease of implementation and generality for di
spersive optical model calculations. The use of this numerical integration
method in the optical model parameter search codes allows for a fast and ac
curate dispersive analysis.