Analysis and evaluation of spherical harmonics are important for Earth scie
nces and potential theory. Depending on the functional of the harmonic seri
es, Legendre functions, their derivatives or their integrals must be comput
ed numerically which in general is based on recurrence relations. Numerical
stability and optimization of such recurrence relations become more and mo
re important with increasing degree and order. In this paper, a simple rela
tion is recovered to obtain first and higher order derivatives of Legendre
functions. The relation is shown to be numerical stable, it does not cause
a singularity at the poles, and can be applied recursively to obtain second
and higher order derivatives. Moreover, it can be applied to compute integ
rals over derivatives of Legendre functions, quantities required if, for ex
ample, mean values of deflections of the vertical are to be analyzed or eva
luated. A sample FORTRAN code is given and a few additional formulas used t
o verify the code and to investigate round-off errors for degree and order
up to 360. (C) 2000 Elsevier Science Ltd. All rights reserved.