Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Color according to concavity
Replies: 1   Last Post: Dec 3, 2012 3:30 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Sergio Miguel Terrazas Porras

Posts: 42
Registered: 6/16/05
Re: Color according to concavity
Posted: Dec 3, 2012 3:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Thank you, Bob and Murray.

________________________________________
Desde: Bob Hanlon [hanlonr357@gmail.com]
Enviado el: jueves, 29 de noviembre de 2012 09:52 a.m.
Hasta: Sergio Miguel Terrazas Porras
CC: mathgroup@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@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
>
>=





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.