1
$\begingroup$

I want to color the region and calculate the area between $$y^{2}=3x$$ and $$y=2x-6$$. I tried

Solve[y^2 == 3 x && y == 2 x - 6, {x, y}]
RegionPlot[{y^2 < 3*x && y > 2*x - 6}, {x, 0, 5}, {y, -3, 10}]

The area?

$\endgroup$
3
$\begingroup$
val = Values@Solve[y^2 == 3 x && y == 2 x - 6, {x, y}];
p1 = Plot[{Sqrt[3 x], -Sqrt[3 x], 2 x - 6}, {x, 0, 6}, 
   AspectRatio -> 1, PlotStyle -> Black];
p2 = Plot[{Sqrt[3 x], -Sqrt[3 x]}, {x, 0, val[[1, 1]]}, 
   AspectRatio -> 1, Filling -> {1 -> {2}}, FillingStyle -> LightBlue,
    PlotStyle -> Black];
p3 = Plot[{Sqrt[3 x], 2 x - 6}, {x, val[[1, 1]], val[[2, 1]]}, 
   AspectRatio -> 1, Filling -> {1 -> {2}}, FillingStyle -> LightBlue,
    PlotStyle -> Black];
Show[p1, p2, p3]

enter image description here

Integrate[((y + 6)/2 - y^2/3), {y, val[[1, 2]], val[[2, 2]]}]

$\displaystyle\int_{\frac{3}{4} \left(1-\sqrt{17}\right)}^{\frac{3}{4} \left(1+\sqrt{17}\right)} \left(\frac{y+6}{2}-\frac{y^2}{3}\right) \, dy$

$\frac{51 \sqrt{17}}{16}$

$\endgroup$
  • $\begingroup$ Great, thanks!! $\endgroup$ – Alicia Roberts Dec 7 '19 at 9:28
2
$\begingroup$
Area@ImplicitRegion[{y^2 < 3*x && y > 2*x - 6}, {{x, 0, 5}, {y, -3, 10}}]

-(3/16) (3 Sqrt[17] - Sqrt[2] (9 - Sqrt[17])^(3/2) - Sqrt[2] (9 + Sqrt[17])^(3/2))

and

BoundaryDiscretizeRegion[
 ImplicitRegion[{y^2 < 3*x && y > 2*x - 6}, {{x, 0, 5}, {y, -3, 10}}],
 MaxCellMeasure -> (1 -> 0.1)
 ]

enter image description here

Alternatively, you can set the PlotPoints or MaxRecursion options of RegionPlot to higher values.

$\endgroup$
  • $\begingroup$ Thanks. Can I have a better Plot? $\endgroup$ – Alicia Roberts Dec 6 '19 at 17:50

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.