Enviar por SMS: The spectral function and principal eigenvalues for Schrodinger operators