As mentioned in the comments (@Hristo Iliev and @Pavel Annosov), quad returns a tuple of things . If you assume that integration does not have problems, as you seem to do in Mathematica (which is not so good for an idea), from this tuple you need only the first element, which should be the result of integration,
But this will give you only one number, not a T function. To get the latter, you will need to define the corresponding function yourself, as in Mathematica using \Delta[T_]:=...
Here are a few bits to get you started:
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]
Note that you need to use the args=(T,) syntax to send the parameter T to an integrable function: quad integrated by the first argument of the function and it needs other arguments to be able to evaluate f(E, T) .
Now you can send this gap(T) to fsolve , which also expects a function (a callable , more precisely).
On a slightly more general level, you should not use the numerical values โโof the Boltzmann constant, hbar, etc. (even Mathematica complains!). Instead, you should write your formulas in dimensionless form: measure temperature in units of energy (therefore, k_B = 1), etc., make appropriate replacements in the integrals, so that you are dealing with dimensionless functions of dimensionless arguments --- and then get the computer to process them.