Re: How to take an expr from Hold[expr] wrap without evaluate it?
- To: mathgroup at smc.vnet.net
- Subject: [mg19349] Re: How to take an expr from Hold[expr] wrap without evaluate it?
- From: "David Bailey" <db at salford-software.com>
- Date: Fri, 20 Aug 1999 23:09:32 -0400
- Sender: owner-wri-mathgroup at wolfram.com
X. Jing Li <xingjing at calvin.math.vt.edu> wrote in message news:7ouvoa$osf$8 at dragonfly.wolfram.com... > Hi, > > I have an expression variable wrapped in the Hold or HoldComplete > function such as > > expr = HoldComplete[ºSin[x]\[DifferentialD]x]] > > where Sin[x]\[DifferentialD]x is a sympolic expression variable. How > can I take the it out without evaluate it? I have tried the > > Expr = ReleaseHold[Unevaluated[ expr]] > or > Expr = FullSimplify[ expr] > and so on without success. All I wanted is the simple symbolic > expression. > Manipulating held expressions is quite tricky because if you remove the Hold function Mathematica will by definition evaluate the result. It really depends what you want to do with the expression. For example, here is a function that will give you something printable: boxhold[Hold[x_]] := DisplayForm[MakeBoxes[x]] Now you can use this in a Print call (but since it has been converted to boxes you cannot directly use it in another expression). Print["something=", boxhold[expr]] If this is not what you want to do perhaps you should post with details of what you want to do with your unevaluated expression. David Bailey Salford Software (Mathematica consulting)