MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Numerical Evaluation

  • To: mathgroup at
  • Subject: [mg85630] Re: Numerical Evaluation
  • From: Bill Rowe <readnewsciv at>
  • Date: Sat, 16 Feb 2008 03:28:59 -0500 (EST)

On 2/14/08 at 6:51 PM, dmoran21 at (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

  • 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