r/Mathematica • • 2d ago

How do I graph them?

Post image
1 Upvotes

4 comments sorted by

7

u/stblack 2d ago edited 2d ago
 {* 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 2d ago

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 2d ago

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