Skip to main content
added 17 characters in body
Source Link
Schrodinger
  • 984
  • 4
  • 15

Try this:

a = 5; b = .1; f = (1 + Exp[(k - a)]);
g[x_] := f*(1/(z - (q^2 + k*q*x) + I*b) + 1/(z - (q^2 - k*q*x) + I*b));
ListContourPlot[Table[NIntegrate[Re[g[x]], {x, -1, 1}, {k, -a, a}], {z, 0, 5, 1},{q,0, 5, 1}]]

It seems your function is singular at the origin and other points of (z,q), so you may get to see warnings.

Try this:

a = 5; b = .1; f = (1 + Exp[(k - a)]);
g[x_] := f*(1/(z - (q^2 + k*q*x) + I*b) + 1/(z - (q^2 - k*q*x) + I*b));
ListContourPlot[Table[NIntegrate[Re[g[x]], {x, -1, 1}, {k, -a, a}], {z, 0, 5, 1},{q,0, 5, 1}]]

It seems your function is singular at the origin of (z,q), so you may get to see warnings.

Try this:

a = 5; b = .1; f = (1 + Exp[(k - a)]);
g[x_] := f*(1/(z - (q^2 + k*q*x) + I*b) + 1/(z - (q^2 - k*q*x) + I*b));
ListContourPlot[Table[NIntegrate[Re[g[x]], {x, -1, 1}, {k, -a, a}], {z, 0, 5, 1},{q,0, 5, 1}]]

It seems your function is singular at the origin and other points of (z,q), so you may get to see warnings.

Source Link
Schrodinger
  • 984
  • 4
  • 15

Try this:

a = 5; b = .1; f = (1 + Exp[(k - a)]);
g[x_] := f*(1/(z - (q^2 + k*q*x) + I*b) + 1/(z - (q^2 - k*q*x) + I*b));
ListContourPlot[Table[NIntegrate[Re[g[x]], {x, -1, 1}, {k, -a, a}], {z, 0, 5, 1},{q,0, 5, 1}]]

It seems your function is singular at the origin of (z,q), so you may get to see warnings.