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=0
case. 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?
Assumptions
orAssuming
? Also, $a<\min(b,c)$ is equivalent to $a<b$ and $a<c$ so you could also try this. $\endgroup$