I have the following integrals that I am trying to calculate:
a[q_, E_, K_, y_] = 1 + q/(2*K)*Log[(q^2 - K*q - E)/(q^2 + K*q - E)];
f[Epol_?NumericQ, K_?NumericQ, y_?NumericQ] := NIntegrate[a[q, Epol, K, y],{q, y, Infinity}, Method -> "GlobalAdaptive", WorkingPrecision -> 20, MaxPoints -> 100];
rhs[x_?NumericQ, y_?NumericQ, Epol_?NumericQ] := 4/Pi *NIntegrate[K^2/(x - 2/Pi *y + K^2/4 + Epol - 2/Pi*f[Epol, K, y]), {K, 0,y},Method -> "GlobalAdaptive", MaxPoints -> 100];
Then I want to use that to solve an equation as the following:
FindRoot[E == rhs[0.2, 1, E], {E, -0.01}]
I'm getting always the convergence error in the integral:
NIntegrate::maxp: The integral failed to converge after 121 integrand evaluations. NIntegrate obtained 0.0818604 +0.0435709 I and 0.0005506179310998352` for the integral and error estimates.
I tried to change the maximum number of evaluation points allowed, the working precision, and the accuracy/precision goals, nothing has worked out well for values of x more than 0.1, any other solutions to try are welcome.

ffunction really struggles to return a value when I plug in some random input. Are you confident that these integrals are convergent? Can you provide a set of values for the parameters for whichfreturns without errors or warnings? – MarcoB Dec 02 '19 at 23:24FindRoot[E == rhs[-0.5, 0.1, E], {E, -0.01}]for example – Dec 03 '19 at 12:56E(base of the natural logarithm) andK(dummy summation/integration variable). – Michael E2 Dec 03 '19 at 14:11