r/Mathematica • • Oct 06 '26

How do I graph them?

Post image
1 Upvotes

4 comments sorted by

8

u/stblack Oct 06 '26 edited Oct 07 '26
 {* solution plane only *}
 RegionPlot[  
   {y > (1/2)x + 1 && y < (3/2)x - 1}  
   , {x, -5, 5}  
   , {y, -5, 5}  
   , GridLines -> Automatic  
   , Axes -> True  
   , AxesOrigin -> {0,0}  
   , AxesStyle ->Thick  
   , ImageSize -> Large  
   , Frame -> False  
 ]

Or alternately

 {* Both regions and intersection with ',' rather than '&&' *}
 RegionPlot[  
   {y > (1/2)x + 1 , y < (3/2)x - 1}  
   , {x, -5, 5}  
   , {y, -5, 5}  
   , GridLines -> Automatic  
   , Axes -> True  
   , AxesOrigin -> {0,0}  
   , AxesStyle ->Thick  
   , ImageSize -> Large  
   , Frame -> False  
 ]

5

u/Imanton1 Oct 06 '26

I'd say use the RegionPlot function, since it has inequality support. It might be possible with Plot and messing with the filling parameters, but RegionPlot makes sense here.

2

u/checpe Oct 06 '26

https://www.wolframalpha.com/input?i=+plot+y%3E+-1%2F2*x%2B1 wolfram alpha has a plain text button, there you can see how to make the plot in wolfram language code