ev, subst, or at?



On 7/5/2012 2:13 PM, Jorge Calvo wrote:
> Hi there:
>
> What is the difference between the commands ev, subst, and at?
1. You should not use ev unless you must.  It involves other activities 
like evaluation of noun
forms, in addition to substitution, so adds to the cost and mystery...

2. subst is better in that it probably does what you want done.

3. try  ev(integrate(f(x),x,r,s), x=a)     vs at, to see how they differ.

In your examples they do result in the same answers though.



>    If I need to substitute a numerical value for a free variable in a simple formula, can they be used interchangeably?

>    This appears to be the case in the examples below, but I want to make sure I am not missing something subtle.
>
> (%i14) ev(x^2 + 7*y, x=6);
> (%o14) 7y+36
>
> (%i15) subst(x=6, x^2 + 7*y);
> (%o15) 7y+36
>
> (%i16) at(x^2 + 7*y, x=6);
> (%o16) 7y+36
>
> Thanks for your help!
>
> Jorge
>
> --
> Dr. Jorge Alberto Calvo
> Associate Professor of Mathematics
> Department of Mathematics and Physics
> Ave Maria University
>
> Phone: (239) 280-1608
> Email: jorge.calvo at avemaria.edu
> Web: http://sites.google.com/site/jorgealbertocalvo
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima