# Contour plot within upper and lower bounds

I have a mathematical function $$f(p,q)=10^{-10}\frac{p^4}{q^2}$$. I want to make a contour plot within the region where $$10^{-3}. I have tried the following three codes (one is similar to this one), but their outputs are different. Could you suggest me a better way to draw the contour plot of that function?

ContourPlot[{If[
10^-3 < (10^-10* (x^4)/y^2) < 10^3, (10^-10* (x^4)/y^2)]}, {x,
10^-3, 10^3}, {y, -1, 1}, FrameLabel -> {"p", "q"},
ContourLabels -> True, PlotLegends -> Automatic]

ContourPlot[{ConditionalExpression[(10^-10* (x^4)/y^2),
10^-3 < (10^-10* (x^4)/y^2) < 10^3]}, {x, 10^-3, 10^3}, {y, -1, 1},
FrameLabel -> {"p", "q"}, ContourLabels -> True,
PlotLegends -> Automatic]

RegionPlot[{10^-3 < (10^-10* (x^4)/y^2) < 10^3}, {x, 10^-3,
10^3}, {y, -1, 1}, FrameLabel -> {"p", "q"},
PlotLegends -> Automatic]

• Try the option RegionFunction Sep 1, 2022 at 13:59
• RegionPlot[{10^-3 <= (10^-10*(x^4)/y^2) <= 10^3}, {x, 10^-3, 10^3}, {y, -1, 1}, PlotPoints -> 150, MaxRecursion -> 4, FrameLabel -> {"p", "q"}, PlotLegends -> Automatic] Sep 1, 2022 at 14:04
• @ulrich-neumann  ContourPlot[(10^-10*(x^4)/y^2), {x, 1, 100}, {y, -1, 1}, RegionFunction -> Function[{x, y, z}, 10^-3 < (10^-10*(x^4)/y^2) < 10^3]]  But, I have found a point {{"57.45", "-0.07952"}} which is not within the region. However, at {{"57.45", "-0.07952"}}, the value of the function is 0.172269. Sep 1, 2022 at 14:19
• @cvgmt I need contour plot. Thanks. Sep 1, 2022 at 14:24
• @PoreyS I t looks like a scaling problem. Sep 1, 2022 at 14:29

Something happens near y==0...

As a workaround try

 Show[{ContourPlot[(10^-10*(x^4)/y^2), {x, 10^-3, 1000}, {y, 10^-3, 1},
PlotPoints -> 100 ,
RegionFunction ->
Function[{x, y, z}, 10^-3 < (10^-10*(x^4)/y^2) < 10^3]],
ContourPlot[(10^-10*(x^4)/y^2), {x, 10^-3, 1000}, {y, -1, -10^-3 },
PlotPoints -> 100 ,
RegionFunction ->
Function[{x, y, z}, 10^-3 < (10^-10*(x^4)/y^2) < 10^3]]},
PlotRange -> All]


Hope it helps!