Re: HoldForm
- To: mathgroup at smc.vnet.net
- Subject: [mg76007] Re: HoldForm
- From: Szabolcs <szhorvat at gmail.com>
- Date: Mon, 14 May 2007 05:52:07 -0400 (EDT)
- Organization: University of Bergen
- References: <f294ia$mpg$1@smc.vnet.net>
dimitris wrote: > May be I will annoy a little Roman (I am just kiddin'!) > but I have one question about HoldForm (and yes I am > obsessed with it! No kiddin'! It's amazing!) > > I have > > In[19]:= > f[x_] = Log[x]*x; > lowerLim = 0; upperLim = Pi; > > Then > > In[20]:= > o = HoldForm[Integrate[f[x], {x, lowerLim, upperLim}]] > > Out[20]= > HoldForm[Integrate[f[x], {x, lowerLim, upperLim}]] > > However I want the output of Input[20] to be as Out[28]... > > In[28]:= > HoldForm[Integrate[Log[x]*x, {x, 0, Pi}]] > > Out[28]= > HoldForm[Integrate[Log[x]*x, {x, 0, Pi}]] > > Any ideas??? > > Thanks a lot! > > Dimitris You can use replace rules to change a held expression: o /. DownValues[f] /. OwnValues[upperLim] /. OwnValues[lowerLim] You cannot make this happen automatically because you want to treat symbols differently: evaluate f, upperLim and lowerLim, but not Integrate. You have to tell Mathematica which are those symbols that you want to change.