I would like to know if someone knows of a software where I can plot the following region
$$ D = \{ (x,y,z) \in \mathbb{R}^3: 0 \leq x \leq 1 , \; x^2 \leq y \leq x, \; \; 0 \leq z \leq x \} $$
thanks
I would like to know if someone knows of a software where I can plot the following region
$$ D = \{ (x,y,z) \in \mathbb{R}^3: 0 \leq x \leq 1 , \; x^2 \leq y \leq x, \; \; 0 \leq z \leq x \} $$
thanks
On
Here's the Mathematica code:
RegionPlot3D[
0 <= x && x <= 1 && x^2 <= y && y <= x && 0 <= z && z <= x,
{x, 0, 1}, {y, 0, 1}, {z, 0, 1},
AxesLabel -> {x, y, z}, PlotPoints -> 35
]
and the output:

On
In Maple this can be done with plots:-implicitplot3d, but a sharper result is obtained more easily by simply using the plot3d command with its filled option.
The upper z-surface is simply z=x, and the lower surface is z=0, and filling between them corresponds to your constraints z>=0 and z<=x.
plot3d(x, y = x .. x^2, x = 0 .. 1,
filled=[color=blue,style=patchnogrid,transparency=0.5]);

If I had used plots:-implicitplot3d instead then I would have had to specify some ranges explicitly for each of x, y, and z. In the above call to plot3d I did not have to deduce in advance (by hand, or by using other commands) or specify in the call to the command that the y-range was 0..1 and that the z-range was 0..1. I was able to avoid that step (and use plot3d directly) because the constraints are simple enough. I feel that the distinction is important enough to warrant a mention.
In Mathematica you get a plot of the region using
The first argument you'll easily identify as your region specification. The following arguments give the variables and the range which should be shown (you generally want the complete region to be inside, but not too much space around it).
Now, this command gives only a quite approximate image of the shape, because it uses too few points. The following gives a much better image:
The extra argument tells Mathematica to calculate 100 points in each direction, which gives a better image.
Also note that if you only get a black blob (which happens for me with those commands, although it theoretically shouldn't), you'll have to add
PlotStyle->Whiteto the command, like this:Instead of
Whiteyou can use another colour (which is mainly useful if you want to show several regions in the same picture).Also if you want your axes to be labelled, you can use the
AxesLabeloption, like this:The
HoldFormprotects against any assignments you may have done to those variables prior to the statement (otherwise, if you had assignedx=3previously, your x axis would be labelled3instead ofx).The result of the last command looks like this:
Note that inside Mathematica, you can interactively rotate that image.