def f(E, T):
    """To be integrated over T."""
temp = np.sqrt(E * E + T * T)
return np.tanh(1477.92 * temp) / temp

def gap(T):
    """Integration result: \\Delta(T)"""
return quad(f, 0, 1, args=(T,))[0]
Find root of numerical integration