The differential equation on a compact Riemann surface