       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:= D[x^3 + x Sin[x], {x, 2}]

Out= -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:= D[x^3 + x Sin[x], {x, 2}] /. x -> 2.5

Out= 11.9015

--
To reply via email subtract one hundred and four

• Prev by Date: Re: Lowest Common Multiple programming
• Next by Date: Re: Archimedes' Spiral
• Previous by thread: Re: Numerical Evaluation
• Next by thread: Re: Numerical Evaluation