MathGroup Archive 2011

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

Search the Archive

Re: Evaluate[expr]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123453] Re: Evaluate[expr]
  • From: Tomas Garza <tgarza10 at msn.com>
  • Date: Thu, 8 Dec 2011 05:22:11 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201112071114.GAA04233@smc.vnet.net>

The problem seems to be with the evaluation of the derivative. The iterator
 substitutes the value of x in each element of the list in order to produce
 the table. It is clear, then, what the values of x and f(x) are when x
 takes the successive values 0, 0.3, 0.6,... But when it comes to the
 derivative, it takes D[f[0],0], D[f[0.3],0.3], etc., which are
 meaningless. That is why the Evaluate is necessary, and you may get a clearer notion of what goes on if you write instead Table[{{x}, f[x], D[f[t], t] /. t -> x}, {x, 0, 2, 0.3}],which says "first obtain the derivative and then evaluate it for the successive values of x" . A more efficient procedure would be to set g[x_]=D[f[x],x], and computeTable[{{x},f[x],g[x]}, {x, 0, 2, 0.3}]
-Tomas

> Date: Wed, 7 Dec 2011 06:14:45 -0500
> From: shlwell1988 at gmail.com
> Subject: Evaluate[expr]
> To: mathgroup at smc.vnet.net
>
> 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]?
>
> Can you help me?
>


  • Prev by Date: Re: 100 rows and 100 columns random matrix
  • Next by Date: Re: Ploting a transformation of a set
  • Previous by thread: Re: Evaluate[expr]
  • Next by thread: Re: Evaluate[expr]