I have the following function $f$ for NEGATIVE $x$ and I want to use RegionPlot to see the domain of $x$ for which the given function lies between the lines $-1$ and $1$.
f= (((1 + x) Cosh[5 Sqrt[-x]])/(1 - x)) ;
I use this code for Plot:
Plot[ { - 1, ((1 + x) Cosh[5 Sqrt[-x]])/(1 - x), 1 } , {x, 0, -2}, PlotPoints -> 30, PlotRange -> {-10, 10}]
and I get this picture which shows that on a small interval around $x=-1$ the function $f$ lies between the lines $-1$ and $1$.
But then I use RegionPlot by this code
RegionPlot[ - 1 <= ((1 + x) Cosh[5 Sqrt[-x]])/(1 - x) <= 1 , {y, -3, 3}, {x, 0, -2}, PlotPoints -> 30]
but the resulting plot is empty!
Can someone please explain where I am going wrong? Why does RegionPlot not give the real result?







yin the predicate toRegionPlot, so I don't think you can get a 2D region. But why are you switching toRegionPlot? What are you trying to do? If you want to see more detail, you can just adjust the x-range in yourPlot. $\endgroup$xrange smaller, or increasePlotPoints:RegionPlot[-1 <= f <= 1, {x, -1.5, -0.5}, {y, -2, 0}]...RegionPlot[-1 <= f <= 1, {y, -3, 3}, {x, 0, -2}, PlotPoints -> 100]. $\endgroup$RegionPlot can in general only find regions of positive measure; it cannot find regions that are just lines or points.UseRegionFunctionoption inPlot$\endgroup$