MathGroup Archive 2012

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

Search the Archive

Re: Color according to concavity

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128843] Re: Color according to concavity
  • From: Sergio Miguel Terrazas Porras <sterraza at uacj.mx>
  • Date: Fri, 30 Nov 2012 05:55:05 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121129110446.BF9AD688F@smc.vnet.net>,<CAEtRDSeUG1KxS_Zog=1r+w8jDuY1_CDhZKHVTO9jDQ-5ypgJ7Q@mail.gmail.com>

Thank you, Bob and Murray.

________________________________________
Desde: Bob Hanlon [hanlonr357 at gmail.com]
Enviado el: jueves, 29 de noviembre de 2012 09:52 a.m.
Hasta: Sergio Miguel Terrazas Porras
CC: mathgroup at smc.vnet.net
Asunto: Re: Color according to concavity

f[x_] = Sin[x] Cos[2 x];

Plot[f[x], {x, 0, 4 Pi},
 ColorFunction -> Function[{x, y},
   If[f''[x] < 0, Red, Blue]],
 ColorFunctionScaling -> False]


Bob Hanlon


On Thu, Nov 29, 2012 at 6:04 AM, Sergio Miguel Terrazas Porras
<sterraza at uacj.mx> wrote:
>
> Dear fellows at mathgroup:
>
>
>
> I want to plot a function with the color of the parts of the curve accord=
ing to concavity, say Red when concve down an blue when concave up.
>
>
>
> I can do it by brute force, finding whwn the second derivative is cero, a=
nd then finding the sign of it in the different intervals, etc. This for pa=
rticular examples.
>
>
>
> But, is there a way to use the second derivative as part of a ColorFuncti=
on, or something like that?
>
>
>
> Thanks
>
>=



  • Prev by Date: R: Re: Difficult antiderivative
  • Next by Date: Improvements to Mathematica 9 Frontend?
  • Previous by thread: Color according to concavity
  • Next by thread: Re: Color according to concavity