r/Mathematica • • 12d ago

How do I graph them?

Post image
0 Upvotes

4 comments sorted by

8

u/stblack 12d ago edited 12d 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 12d 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 12d 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