0
$\begingroup$

I have the following function that numerically integrates a function on the interval $\left[ 2, 100 \right]$

Int[b_] := 
  NIntegrate[((1 - 2/Sqrt[r^2])^(3/2) Sqrt[r^4/(
    r^4 - 2 (r^2)^(3/2) + b^2 (-4 - r^2 + 4 Sqrt[r^2]))])/
   r^2, {r, 2, 100}, Method -> "LocalAdaptive"];

The result only depends on $b$, so I intend to make the change $b = \sqrt{x^2 + y^2}$. I thought of something like

Int[b_] := f[b] /. b -> Sqrt[x^2 + y^2];

But it's not working. My goal is to make the variable change to plot the intensity profile with DensityPlot and get something like this (Figure 4 in this article)

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ You could try ListDensityPlot ! But have a look at your integrand, FunctionDomain[...] gives the restriction r > 2 && b^2 (-2 + r) < r^3 $\endgroup$ Nov 4, 2023 at 7:16
  • 1
    $\begingroup$ Int[x] for x>=6 becomes complex. $\endgroup$ Nov 4, 2023 at 16:45

1 Answer 1

3
$\begingroup$

Perhaps onedimensional plot is sufficient?

Plot[Int[b], {b, 0, 5}, ColorFunction -> Hue,PlotStyle -> Thickness[Large]] 

enter image description here

or using ListDensityPlot

zw = Table[{b Cos[phi], b Sin[phi], Int[b]}, {b, Subdivide[0, 5, 25]}, {phi, Subdivide[0, 2 Pi, 50]}];
ListDensityPlot[Flatten[zw, 1] , ColorFunctionScaling -> True,ColorFunction -> Hue ]

enter image description here

or using DensityPlot

DensityPlot[int[Sqrt[x^2 + y^2]], Element[{x, y}, Disk[{0, 0}, 5]], 
ColorFunctionScaling -> True, ColorFunction -> Hue, 
PlotLegends -> Automatic]

enter image description here

Hope it helps!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.