MathGroup Archive 2011

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

Search the Archive

Re: Evaluate[expr]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123456] Re: Evaluate[expr]
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Thu, 8 Dec 2011 05:22:47 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

On 12/7/11 at 6:14 AM, shlwell1988 at gmail.com wrote:

>f[x_] = x^5 - 3 x^2 + 1; tt =
>Table[Evaluate[{{x}, f[x], D[f[x], x]}], {x, 0, 2, 0.3}]

>In the above expression , what's the function of Evaluate[expr]?

>Why doesn't it work without Evaluate[expr]?

Evaluate forces immediate evaluation of any expression it is
given. Without Evaluate, a value is assigned to x then the
derivative you want is computed. That is, when x is zero,
D[f[x],x] evaluates to D[f[0],0] which makes no sense.

With Evaluate D[f[x],x] is evaluated to 5x^4-6x and this is
evaluated after x is assigned a value which is what you want.




  • Prev by Date: Re: Complex diagram
  • Next by Date: Re: Evaluate[expr]
  • Previous by thread: Evaluate[expr]
  • Next by thread: Re: Evaluate[expr]