2
$\begingroup$

I want to draw the region between two function curves (Sqrt[x], x^2):

Clear[R1, R2, R];
Plot[{Sqrt[x], x^2}, {x, -1, 2}, PlotRange -> { 0, 2}, 
 Filling -> {1 -> {{2}, {None, Automatic}}}]

If I use Region, the boundary is not smooth enough, what should I do?

R1 = ImplicitRegion[y^2 < x, {x, y}];
R2 = ImplicitRegion[y > x^2, {x, y}];
R = RegionIntersection[R1, R2]
Region[R, PlotRange -> {{-1, 2}, {-1, 2}}, Axes -> True, 
 Ticks -> Automatic]

(Version: 11.3)

$\endgroup$
2
  • 1
    $\begingroup$ Use RegionPlot[R, PlotRange -> {{-1, 2}, {-1, 2}}, Axes -> True] for visualization, instead of just Region. $\endgroup$
    – MarcoB
    Feb 1 at 13:03
  • $\begingroup$ Thanks! @MarcoB $\endgroup$
    – lotus2019
    Feb 1 at 13:16

1 Answer 1

1
$\begingroup$

The problem has been solved.

BoundaryDiscretizeRegion[R, MaxCellMeasure -> {"Length" -> 0.02}, 
 PlotRange -> {{-1, 2}, {-1, 2}}, Axes -> True, Ticks -> Automatic]
$\endgroup$

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.