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


Groups > comp.soft-sys.math.mathematica > #7024 > unrolled thread

Re: Evaluate[expr]

Started byMurray Eisenberg <murray@math.umass.edu>
First post2011-12-08 10:33 +0000
Last post2011-12-09 11:04 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Evaluate[expr] Murray Eisenberg <murray@math.umass.edu> - 2011-12-08 10:33 +0000
    Re: Evaluate[expr] "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-12-09 11:04 +0000

#7024 — Re: Evaluate[expr]

FromMurray Eisenberg <murray@math.umass.edu>
Date2011-12-08 10:33 +0000
SubjectRe: Evaluate[expr]
Message-ID<jbq3pv$ip9$1@smc.vnet.net>
Because if you leave it out, what you're sking to do is, among other
things, to calculate D[f[0],0], D[f[0.3], 0.3], D[f[0.6],0.6], etc.
That's why you'll get a series of error messages beginning with
"General::ivar: 0.` is not a valid variable".

The Evaluate expression -- here could be wrapped just around the part
D[f[x],x]] -- once and for all evaluates the symbolic derivative. Then
the iterator in the table substitutes x = 0, 0.3, 0.6, etc. into that
symbolic derivative.

On 12/7/11 6:14 AM, =E9=81=93 =E5=8E=9A 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?
>

--
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [next] | [standalone]


#7057

From"Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com>
Date2011-12-09 11:04 +0000
Message-ID<jbspvl$3ti$1@smc.vnet.net>
In reply to#7024
f[x_] = x^5 - 3 x^2 + 1;
tt = Table[{{x}, f[x], Evaluate@D[f[x], x]}, {x, 0, 2, 0.3}]

does not work. This is because Evaluate exists only to override Hold*  
attributes when it appears directly as an argument to a function that has  
such attributes. In the above case where Evaluate appears nested inside a  
List, this is a null operation (as List has no Hold* attributes to  
override) and Evaluate is not seen by Table.

On Thu, 08 Dec 2011 10:33:35 -0000, Murray Eisenberg  
<murray@math.umass.edu> wrote:

> The Evaluate expression -- here could be wrapped just around the part
> D[f[x],x]] -- once and for all evaluates the symbolic derivative.
>
> On 12/7/11 6:14 AM, =E9=81=93 =E5=8E=9A 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?
>>
>
> --
> Murray Eisenberg                     murray@math.umass.edu
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower      phone 413 549-1020 (H)
> University of Massachusetts                413 545-2859 (W)
> 710 North Pleasant Street            fax   413 545-1801
> Amherst, MA 01003-9305

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web