Re: Numerical Evaluation

*To*: mathgroup at smc.vnet.net*Subject*: [mg85646] Re: Numerical Evaluation*From*: David Moran <dmoran21 at cox.net>*Date*: Sun, 17 Feb 2008 07:19:51 -0500 (EST)*References*: <fp6724$58p$1@smc.vnet.net>

Bill Rowe wrote: > On 2/14/08 at 6:51 PM, dmoran21 at cox.net (David Moran) wrote: > >> Hi, I need to know what the best way to do this is. I have a >> function and I want to evaluate a derivative (not necessarily the >> first derivative) of the function. What is the best way to do this? > > Is there a problem with using the built in operator D? > > For example, a second derivative is computed as follows: > > In[1]:= D[x^3 + x Sin[x], {x, 2}] > > Out[1]= -sin(x) x+6 x+2 cos(x) > > And this can be used to give a numerical result by simply using > a replacement rule, i.e., for x = 2.5 the result is: > > In[2]:= D[x^3 + x Sin[x], {x, 2}] /. x -> 2.5 > > Out[2]= 11.9015 > > -- > To reply via email subtract one hundred and four > Thanks. Dave