How to store values, when using Do?

I am trying to plot a DensityPlot of a following integral, but I don’t know how to store values generated using Do in a usable format. Following is the code that I have. Please suggest me a solution. Thanks a lot in advance!

    EQ1 = y1/((x1 - x)^2 + y1^2);

    Do[NIntegrate[EQ1, {x, 10^-10, 10}], {x1, 10^-10, 0.5, 5}, {y1, 10^-10, 0.5, 5}];

Hi Sid,

In Mathematica, there is almost always a better construct than Do or For. The attached notebook first uses Table to generate a table of values and ListDensityPlot to plot them. Then it defines a function of x1 and x2 to do the integration, and uses DensityPlot to plot that over a field of x1 and y1.

Best, David

Another, slightly different way:

f[x1_?NumericQ, y1_] := 
  NIntegrate[y1/((x1 - x)^2 + y1^2), {x, 10^-10, 10}];
DensityPlot[f[x1, y1], {x1, 0, 1}, {y1, 0, 1}]

Thanks a lot, this was really helpful! Looking at the plot, I am not sure though if the the solution is correct.

Thanks a lot!

Hi Sid, A couple of spot checks look reasonable. Maybe the function isn’t doing what you expect.