I am interested in the plot of a function in terms of hypergeometric and Bessel function with complex arguments, Here, it is my code, but the result is incorrect, the solution must be defined every in the interval x,y [-30,30]. Where is the problem? How can I fix it?

Clear["Global`*"];  Remove["Global`*"]; 
   L = 30;

   sx[x_, y_] = 
 1/Abs[x + I y] (0. + 
    0.45 I) (BesselJ[-(1/4), 0.45  Re[Sqrt[x + I y]]^2] BesselJ[3/4, 
      0.45  Im[Sqrt[x + I y]]^2] - 
    1.` BesselJ[-(1/4), 0.45  Im[Sqrt[x + I y]]^2] BesselJ[3/4, 
      0.4  Re[Sqrt[x + I y]]^2]) Hypergeometric0F1[3/
   4, -0.051 Im[Sqrt[x + I y]]^4] Hypergeometric0F1[3/
   4, -0.051  Re[Sqrt[x + I y]]^4] (Im[Sqrt[x + I y]] Re[Sqrt[
     x + I y]])^(3/2)

outplot = 
 DensityPlot[Abs[Im[sx[x, y]]], {x, -L, L}, {y, -L, L}, 
  PlotRange -> Full, PlotPoints -> 150, ColorFunction -> "Rainbow", 
  Axes -> True, AxesLabel -> {x, y}, FrameTicks -> True, 
  Exclusions -> None]  
  • $\begingroup$ Where is the result incorrect? Where is the result undefined and what should it be? Just guessing, compare Table[x=RandomReal[{-30,30}];y=RandomReal[{0,30}];Abs[Im[sx[x,y]]],{10}] and Table[x=RandomReal[{-30,30}];y=RandomReal[{-30,0}];Abs[Im[sx[x,y]]],{10}] $\endgroup$ – Bill Feb 6 '20 at 18:46
  • $\begingroup$ @Bill, I tried your comment, but I do not expect a plot similar I show above, this behavior is unexpected I have zero region ( see the figure above) $\endgroup$ – irondonio Feb 14 '20 at 1:37
  • 1
    $\begingroup$ Try DensityPlot[If[y<0,Abs[Re[sx[x,y]]],Abs[Im[sx[x,y]]]],{x,-L,L},{y,-L,L},PlotRange->Full,PlotPoints->150,ColorFunction->"Rainbow",Axes->True,AxesLabel->{x,y},FrameTicks->True,Exclusions->None] and then very carefully look at Table[sx[x,y],{x,-L,L,6},{y,-L,L,6}]//TableForm to understand why your original top and bottom half of your plot looks different. Perhaps that will tell you what you really need to plot $\endgroup$ – Bill Feb 15 '20 at 22:06

Using the code presented above, I obtained the following results. It seems that for negative values the function is zero or does not exit enter image description here. I expect to have similar behavior as a depict a positive region.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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