How to prevent the immediaetly evaluation after substitute a variable



Try using box:

(%i67) 2 * sqrt(box(h));
(%o67) 2*sqrt(h)

(%i68) subst(h=0.3,%);
(%o68) 2*sqrt(0.3)

(%i69) rembox(%);
(%o69) 1.095445115010332

To read the documentation for box, input ? box. There might be limitations 
on 
this method that I have not thought about.It might be possible to extend 
rembox 
to remove boxes bottom up one layer at a time.

--Barton

maxima-bounces at math.utexas.edu wrote on 01/23/2012 01:27:03 PM:

> From: Ralf Jung <ulumbelu at googlemail.com>
> To: Maxima at math.utexas.edu
> Date: 01/23/2012 01:26 PM
> Subject: How to prevent the immediaetly evaluation after 
> substitute a variable
> Sent by: maxima-bounces at math.utexas.edu
> 
> Dear maxima list members,
> 
> here a example what's happend
> 
> (%i1)    x : 2*sqrt(h)
> 
> (%o1)   2sqrt(h)
> 
> (%i2)    subst([h=0.3], x)
> 
> (%o2)   1.095445115010332
> 
> But I want this outcome
> 
> (%o2)   2sqrt(0.3)
> 
> is it possible to stop the immediaetly evaluation after subst, so I
> can see first my expression with all the variables changed?
> 
> ralf
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima