symbol evaluation order



Am 22 May 2007 um 6:01 hat Brian W. geschrieben:

> 
> Hello,
> I am a maxima beginner

Hello Brian,
welcome to Maxima.

, and I don't quite understand how expressions are
> evaluated. In the example session below (calculating the volumen V of a
> sphere with radius r, diameter d), the final evaluation ''V results in an
> expression containing d, although d is defined.

The evaluation operator '' (two single quotes) only does one step backwards. If you need 
more than one step, in your example you need two, you can use the flag infeval:

(%i1) V:4/3*%pi*r^3$
(%i2) r:d/2$
(%i3) d:20$
(%i4) V,infeval;
				   4000 %pi
(%o4) 				   --------
				      3


HTH
Volker van Nek


> What should I have typed, so that the value of d is substituted in the
> evaluation? Of course I could write ''V,d=d; but I would like to have all
> known symbols substituded recursively (for more complicated examples).
> 
> Thanks
> Brian
> 
> (%i1) V:4/3*%pi*r^3;
>                                           3
>                                    4 %pi r
> (%o1)                              --------
>                                       3
> (%i2) r:d/2;
>                                        d
> (%o2)                                  -
>                                        2
> (%i3) d:20;
> (%o3)                                 20
> (%i4) ''V;
>                                          3
>                                     %pi d
> (%o4)                               ------
>                                       6
> (%i5)  
> -- 
> View this message in context: http://www.nabble.com/symbol-evaluation-order-tf3796196.html#a10737392
> Sent from the Maxima mailing list archive at Nabble.com.
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima