I’m not sure that is the only issue but IIRC quadgk returns a tuple of outputs: the integral and the error estimate. You are only interested in the first one
2 Likes
I’m not sure that is the only issue but IIRC quadgk returns a tuple of outputs: the integral and the error estimate. You are only interested in the first one