1

When I try to illustrate a region by filling it, Mathematica (v11) seems to miss a the corner.

Here are my commands.

f1[x_] := x/2 + 5
f2[x_] := 5 - x^2
f3[x_] := 4 x

x1 = x /. Solve[f2[x] == f3[x], x][[2]]
x2 = x /. Solve[f1[x] == f3[x], x][[1]]

Show[
  RegionPlot[
   f2[x] <= y <= f1[x] && 0 <= x <= x1 ||
   f3[x] <= y <= f1[x] && x1 <= x <= x2 ,
   {x, 0, x1 + 0.5}, {y, 0, f1[x1 + 1]}
  ], 
  Plot[{f1[x], f2[x], f3[x]}, {x, 0, 2}]
]

This is what it looks like:

The upper left corner is not filled

MarcoB
  • 67,153
  • 18
  • 91
  • 189
MF92
  • 41
  • 1

0 Answers0