Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8329 > unrolled thread

Re: Filling area between curves

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-02-04 11:30 +0000
Last post2012-02-05 11:03 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Filling area between curves Bob Hanlon <hanlonr357@gmail.com> - 2012-02-04 11:30 +0000
    Re: Filling area between curves David Reiss <dbreiss@gmail.com> - 2012-02-05 11:03 +0000

#8329 — Re: Filling area between curves

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-02-04 11:30 +0000
SubjectRe: Filling area between curves
Message-ID<jgj4tf$mup$1@smc.vnet.net>
f[x_] = -1 + 4 x - x^2;
g[x_] := x - 2;
h[x_] := 2 - x;

Show[
 RegionPlot[
  h[x] < y < f[x] && x < 2 ||
   g[x] < y < f[x] && x > 2,
  {x, 0, 5}, {y, 0, 3}],
 Plot[{f[x], g[x], h[x]}, {x, 0, 5},
  PlotRange -> {0, 3}]]


Bob Hanlon


On Fri, Feb 3, 2012 at 2:11 AM, Elaine Ritter <eyeninei9@gmail.com> wrote:
> I have 3 curves, and I want to fill one of the areas that they bound.
> The equations are
> F[x] = -1 + 4 x - x^2
> G[x] := x - 2
> H[x] := 2 - x
> and I want to fill the region that I shaded in this picture:
> http://i.imgur.com/X2urH.png
>
> I've been trying to figure this out on my own, but to no avail. How do
> I do this?

[toc] | [next] | [standalone]


#8351

FromDavid Reiss <dbreiss@gmail.com>
Date2012-02-05 11:03 +0000
Message-ID<jglnlv$2cb$1@smc.vnet.net>
In reply to#8329
Of course Bob Hanlon will give the simplest answer...  :-)


On Feb 4, 6:30 am, Bob Hanlon <hanlonr...@gmail.com> wrote:
> f[x_] = -1 + 4 x - x^2;
> g[x_] := x - 2;
> h[x_] := 2 - x;
>
> Show[
>  RegionPlot[
>   h[x] < y < f[x] && x < 2 ||
>    g[x] < y < f[x] && x > 2,
>   {x, 0, 5}, {y, 0, 3}],
>  Plot[{f[x], g[x], h[x]}, {x, 0, 5},
>   PlotRange -> {0, 3}]]
>
> Bob Hanlon
>
>
>
>
>
>
>
> On Fri, Feb 3, 2012 at 2:11 AM, Elaine Ritter <eyenin...@gmail.com> wrote:
> > I have 3 curves, and I want to fill one of the areas that they bound.
> > The equations are
> > F[x] = -1 + 4 x - x^2
> > G[x] := x - 2
> > H[x] := 2 - x
> > and I want to fill the region that I shaded in this picture:
> >http://i.imgur.com/X2urH.png
>
> > I've been trying to figure this out on my own, but to no avail. How do
> > I do this?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web