Re: Numerical Evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg85630] Re: Numerical Evaluation
- From: Bill Rowe <readnewsciv at sbcglobal.net>
- Date: Sat, 16 Feb 2008 03:28:59 -0500 (EST)
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