Re: Anomaly? or at least a surprise.

*To*: mathgroup at smc.vnet.net*Subject*: [mg90296] Re: Anomaly? or at least a surprise.*From*: "David W.Cantrell" <DWCantrell at sigmaxi.net>*Date*: Fri, 4 Jul 2008 04:01:49 -0400 (EDT)*References*: <g4i942$3cr$1@smc.vnet.net>

Steve Gray <stevebg at roadrunner.com> wrote: > Doing D[ArcTan[x], x] gives 1/(x^2+1) as expected. > Doing Plot[D[ArcTan[x]],{x,-10,10},PlotRange->Full] with no variable > to differentiate by gives a correct plot (!) This is surprising - Help > says nothing about leaving out the independent variable even when the > function is of only one variable. Now, doing > Plot[D[ArcTan[x], x], {x, -10, 10}, PlotRange -> Full] > gives error messages such as > > General::ivar: -9.18326 is not a valid variable. >> > General::ivar: -9.59143 is not a valid variable. >>, etc. > > I thought that D[ArcTan[x], x] and 1/(x^2+1) should behave identically > in the Plot statement. If you Evaluate D[ArcTan[x] first, then you do get identical behavior: Plot[Evaluate[D[ArcTan[x], x]], {x, -10, 10}, PlotRange -> Full] Look at the first few items of "More Information" in the documentation for Plot. David