3

I'm trying to plot the region enclosed by the curves

$$\begin{cases}y^2=x\\y^2=4-x\\z=0\\z=3\end{cases}$$

using the command RegionPlot (I'm not sure if Plot3D or ParametricPlot3D are more appropriate). The desired region looks like a cylinder but with a parabolic-intersection cross section:

My bad drawing

Now I'm running the command

RegionPlot3D[y^2 < x && y^2 < 4 - x && z > 0 && z < 3, {x, 0, 4}, {y, -3,  3}, {z, -3, 3}]

But I get the following weird-looking region instead.

Resulting Region

Can anyone help me plot the desired region? and is there perhaps a better/more suitable command for such a thing?

Luke Collins
  • 440
  • 2
  • 11

2 Answers2

4

In version 11 just simply confining argument to x,y dependence yields a satisfactory result:

 RegionPlot3D[y^2 < x && y^2 < 4 - x, {x, 0, 4}, {y, -3, 3}, {z, 0, 3},
  Mesh -> None, PlotPoints -> 40]

enter image description here

ubpdqn
  • 60,617
  • 3
  • 59
  • 148
3

Increasing the number of PlotPoints results in a more satisfactory plot.

RegionPlot3D[y^2 < x && y^2 < 4 - x && z > 0 && z < 3,
 {x, 0, 4},
 {y, -3, 3},
 {z, -3, 3},
 PlotPoints -> 100
 ]

Mathematica graphics

Jack LaVigne
  • 14,462
  • 2
  • 25
  • 37