I have the following function that is dependent on three parameters ω, κ2, and x:
f[ω_, κ2_,
x_] := (384000.` x κ2 Sqrt[κ2^2])/(1600000000 x^2 \
κ2^2 (1/100000000 + 4 ω^2) + (κ2^2 +
4 ω^2) (16 +
8 (1/10000 - 4 ω^2) + (1/100000000 +
4 ω^2) (1 + 4 ω^2)) +
80000 x κ2 ((κ2 - 4 ω^2) (1/100000000 +
4 ω^2) +
4 (κ2/10000 + 4 ω^2))) + (9.6` (κ2^2 +
4 ω^2))/(1600000000 x^2 κ2^2 (1/100000000 +
4 ω^2) + (κ2^2 + 4 ω^2) (16 +
8 (1/10000 - 4 ω^2) + (1/100000000 +
4 ω^2) (1 + 4 ω^2)) +
80000 x κ2 ((κ2 - 4 ω^2) (1/100000000 +
4 ω^2) +
4 (κ2/10000 +
4 ω^2))) + (0.0122` (1600000000 x^2 κ2^2 +
80000 x κ2 (κ2 - 4 ω^2) + (1 +
4 ω^2) (κ2^2 +
4 ω^2)))/(1600000000 x^2 κ2^2 (1/100000000 +
4 ω^2) + (κ2^2 + 4 ω^2) (16 +
8 (1/10000 - 4 ω^2) + (1/100000000 +
4 ω^2) (1 + 4 ω^2)) +
80000 x κ2 ((κ2 - 4 ω^2) (1/100000000 +
4 ω^2) + 4 (κ2/10000 + 4 ω^2)))
I intend to plot a density plot such that the x-axis takes on κ2, the y-axis takes on x, and the z-axis gives the difference in the maxima of the function at each κ2 and x value as a function of ω. I proceed to construct a double loop like so:
ωarr =
Table[{i, j,
Max[ω /.
NSolve[(D[f[ω, i, j], ω]) == 0 &&
D[f[ω, i, j], {ω, 2}] < 0, Reals]] -
Min[ω /.
NSolve[(D[f[ω, i, j], ω]) == 0 &&
D[f[ω, i, j], {ω, 2}] < 0, Reals]]}, {i, 0,
100, 1}, {j, 0, 10^-3, 10^-5}];
and then proceeding to plot:
ListDensityPlot[Flatten[ωarr,1], PlotRange->All, PlotRangeClipping -> False]
What I get is some density plot with mostly blue gradient. My problem is of the white spaces that shows up: Should the maxima difference be 0, wouldn't that be represented by a blue colored gradient rather than empty white spaces? What is the problem here?
I could use any help that I can get. Thank you in advance!