MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Shading the bounded area in a system of inequalities

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22010] Re: [mg21960] Shading the bounded area in a system of inequalities
  • From: BobHanlon at aol.com
  • Date: Thu, 10 Feb 2000 02:25:54 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Needs["Algebra`InequalitySolve`"];

Needs["Graphics`FilledPlot`"];

f[x_] := 7x + 5;

FilledPlot[f[x], {x, -2, 4}];

If you want to restrict the region such that y>3 and y < 30

soln = InequalitySolve[f[x] > 3 && f[x] < 30, x]

-(2/7) < x < 25/7

FilledPlot[{f[x]*(1 - UnitStep[x - First[soln]] + UnitStep[x - Last[soln]]), 
      f[x]}, {x, -2, 4}];

Bob Hanlon

In a message dated 2/7/2000 4:46:15 AM, skipper at worldnet.att.net writes:

>When you're given a linear equation subject to constraints how do you
>shade the bounded area, set the corner points and find the
>minimum/maximum value of the equation using Plot. I tried FilledPlot
>but couldn't get that to work( it just spit back my input, without a
>plot). Acually, I don't really need to plot, but I'd like to know how
>to get the shading to work.
>


  • Prev by Date: Re: Bracket Trouble with IT Keyb.
  • Next by Date: Re: Expectations
  • Previous by thread: Shading the bounded area in a system of inequalities
  • Next by thread: CombinatoricaPlots