An asymptotic formula for the derivatives of orthogonal polynomials