Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7004

Re: Evaluate[expr]

From Tomas Garza <tgarza10@msn.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Evaluate[expr]
Date 2011-12-08 10:24 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbq398$iga$1@smc.vnet.net> (permalink)
References <201112071114.GAA04233@smc.vnet.net>

Show all headers | View raw


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@gmail.com
> Subject: Evaluate[expr]
> To: mathgroup@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?
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Evaluate[expr] Tomas Garza <tgarza10@msn.com> - 2011-12-08 10:24 +0000

csiph-web