Re: Evaluate[expr]
- To: mathgroup at smc.vnet.net
- Subject: [mg123478] Re: Evaluate[expr]
- From: "Oleksandr Rasputinov" <oleksandr_rasputinov at hmamail.com>
- Date: Thu, 8 Dec 2011 05:27:04 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jbni7r$48k$1@smc.vnet.net>
On Wed, 07 Dec 2011 11:21:31 -0000, =E9=81=93 =E5=8E=9A <shlwell1988@gma= il.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]? > > Can you help me? > Without Evaluate, the third element of the vector is rewritten as e.g. D[f[0.3], 0.3]. The error arises because of the attempt to differentiate with respect to the value 0.3. It will work without requiring Evaluate if you instead write: tt = Table[{{x}, f[x], f'[x]}, {x, 0, 2, 0.3}]