MathGroup Archive 2007

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

Search the Archive

Re: HoldForm


On 14 May 2007, at 16:39, 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
>
>

I think the simplest solution (which probably is not what you want) is:

1) a simple substitution

o /. f[x] -> x*Log[x]



2) Alternatively, you can use this;

o = Integrate[TraditionalForm[f[x]], {x, lowerLim, upperLim}]

Of course I am assuming you are using TraditionalForm for output! If  
not, replace TraditionalForm with StandardForm.

Note  that to "release" TraditionalForm you can use:

o /. TraditionalForm -> Identity

Andrzej Kozlowski



  • Prev by Date: Re: Left-to-Right bipartite graph drawing in version 6
  • Next by Date: Re: HoldForm
  • Previous by thread: HoldForm
  • Next by thread: Re: HoldForm