# Unable to correctly Region Plot 3D

I have to plot the region shown in the image below. Although it's very simple, Mathematica is not able to plot it when I put the code

RegionPlot3D[{t < Min[1, (1 - r - s + Sqrt[(1 - r - s)^(2) - 4 s r])/(2 r)] &&
Sqrt[r] + Sqrt[s] < 1}, {r, 0, 10}, {s, 0, 10}, {t, 0, 10}]


$$\left\{\sqrt{r} + \sqrt{s} < 1\,\land\,t<\min\left\{1,\frac{1-r-s+\sqrt{(1-r-s)^2-4rs}}{2r}\right\}\right\}$$

One of the reasons is that it says it cannot compare 1 with a complex number to find Min[]. In fact, I found that if the first condition is satisfied then (1 - r - s)^(2) - 4 s r is always greater than zero so a complex number won't arise inside Min[]. So I tried the following code to tell Mathematica to evaluate only when Sqrt[r] + Sqrt[s] < 1 is satisfied.

RegionPlot3D[If[Sqrt[r] + Sqrt[s] < 1,
t < Min[1, (1 - r - s + Sqrt[(1 - r - s)^(2) - 4 s r])/(2 r)]],
{r,0,10},{s,0,10},{t,0,10}]


Even then there are some problems with r=0case. Mathematica says it leads to infinity inside Min[] but when r=0 the numerator of (1-r-s+Sqrt[(1-r-s)^(2)-4s r])/(2 r) is also zero so there is no infinity. Any idea of how to plot these kinds of regions?

• Have you checked Assumptions or Assuming? Also, $a<\min(b,c)$ is equivalent to $a<b$ and $a<c$ so you could also try this. May 16, 2020 at 21:27

Clear["Global*"]

FunctionDomain[{(1 - r - s + Sqrt[(1 - r - s)^(2) - 4 s r])/(2 r),
r >= 0, s >= 0}, {r, s}]

(* r > 0 && s >= 0 && -2 r + r^2 - 2 s - 2 r s + s^2 >= -1 *)

RegionPlot3D[{
t < Min[1, (1 - r - s + Sqrt[(1 - r - s)^(2) - 4 s r])/(2 r)] &&
Sqrt[r] + Sqrt[s] < 1},
{r, 10^-9, 1.1}, {s, 0, 1.1}, {t, 0, 1.1},
AxesLabel -> Automatic,
PlotPoints -> 50,
MaxRecursion -> 2] //
Quiet


• Thanks for your answer. But when you define FunctionDomain[] won't it affect other regions? Because I have many other regions that will be plotted along with this in a single 3D plot? So won't FunctionDomain[] affect the other plots? May 16, 2020 at 21:48
• The calculation of FunctionDomain doesn't affect anything. Its output merely highlights that r must be greater than zero and resulted in setting the plot range to {r, 10^-9, 1.1}` May 16, 2020 at 22:06