2
$\begingroup$

I am trying to obtain a 3D plot of $z=x^2+2y^2$ that is bound by the region in the $z=0$ plane governed by the equations $y=x$ and $y=x^2$. Is it possible to do this with RegionFunction? or RegionPlot3D?

$\endgroup$

1 Answer 1

2
$\begingroup$

This should work, if I understood your question correctly:

Plot3D[
  x^2 + 2 y^2,
  {x, y} ∈ ImplicitRegion[x^2 <= y <= x, {x, y}]
]

3D plot of a slice

$\endgroup$
2
  • $\begingroup$ Thanks. That worked perfectly. I am new to this and was not aware of the Implicit Region. $\endgroup$
    – GeorgeE
    Jun 14 at 16:51
  • $\begingroup$ @GeorgeE Great, glad it helped! If you find my answer useful, you can upvote it for now and, eventually, accept is by clicking on the gray checkmark beside it. $\endgroup$
    – MarcoB
    Jun 14 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.