Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: "UnFullForm"ing an Expression?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13260] Re: [mg13151] "UnFullForm"ing an Expression?
  • From: Wouter Meeussen <eu000949 at pophost.eunet.be>
  • Date: Fri, 17 Jul 1998 03:17:52 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

hi Siegman,

my interpretation is:
1/
you used SetDelayed or ":=" in defining f2 this stores:
In[12]:=
?f2
"Global`f2"
f2[a_, x_] := D[f1[a, x], x]

2/
when you put f2 in a table, and pass numeric values num1 and num2 values
for a and x, then this is substituded in the RHS of the definition,
resulting in : D[f1[num1, num2], num2] , causing your CPU to ache
badly.

3/
curcumvent it with "Evaluate" :
In[13]:= Evaluate at f2[a,x]
Out[13]=a^2*Cos[x] - a*Sin[x]
and so:
Table[ Evaluate at f2[a,x],{x,3},{a,3}]

or else use a simple "Set" in the definition of f2.

wouter.

At 07:42 13-07-98 -0400, AES wrote:
>I recently posted a query noting that if you enter the following
>
>   f1[a_,x_] :=a Cos[x] + a^2 Sin[x]
>
>   f2[a_,x_] := D[f1[a,x],x]
>
>you can make a Table[ ] of f1[a,x] but not of f2[a,x].  
>
>If I look at the FullForms for these, e.g.
>
>   f1[a,x] //  FullForm
>
>   f2[a,x] // FullForm
>
>they both look like simple functions to me (i.e., f2[a,x] shows no
>visible memory of having originated from a derivative), except the f2
>is inside a "FullForm[ ]" wrapper and f1 isn't.
>
>Is there a way to "UnFillForm" f2 ? If so, would f2 from then on act
>like f1 ?  Does this query make any sense?
>
>I'd like to understand the situation here.
>
>Thanks   siegman at ee.stanford.edu
>
>
Dr. Wouter L. J. MEEUSSEN
w.meeussen.vdmcc at vandemoortele.be
eu000949 at pophost.eunet.be



  • Prev by Date: Comparison of Mathematica on Various Computers
  • Next by Date: Re: Can it be done - easily?
  • Previous by thread: "UnFullForm"ing an Expression?
  • Next by thread: Re: "UnFullForm"ing an Expression?