Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: HoldForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76093] Re: HoldForm
  • From: Albert <awnl at arcor.net>
  • Date: Wed, 16 May 2007 05:27:52 -0400 (EDT)
  • Organization: Arcor
  • References: <f294ia$mpg$1@smc.vnet.net>

Hi,

> 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???
> 

as usual, there are plenty of possibilities, and some have been 
mentioned by others. As also has been mentioned, you want to partially 
evaluate only certain symbols/subexpressions. In my opinion the least 
obscure way to do this is:

With[{lowerLim=lowerLim,upperLim=upperLim},
    HoldForm[Integrate[Log[x]*x,{x,lowerLim,upperLim}]]
]

of course you might want to use different names but it is noteworthy 
that it works like this, too (and I think that is by design...).

hth,

albert


  • Prev by Date: Graphics3D of the official "arbitrary surface"
  • Next by Date: Re: About UnitStep and ZeroValue
  • Previous by thread: Re: HoldForm
  • Next by thread: Launching Mathematica kernel with Windows 'start' command in order to customise the priority of the kernel process