subst problems



Subst only substitutes for exact matches of expression subtrees.  In your
example, the subtree is 2*m*k = "*"(2,m,k), so m*k or 2*m or 2*k will not
match it.

ratsubst is probably what you want.

             -s

On Tue, Sep 2, 2008 at 9:03 PM, Richard Hennessy <rvh2007 at comcast.net>wrote:

> Does anyone know a better command than subst for changing variables in
> expressions not containing integrate?  I can't get subst to work right
> sometimes.
>
> (%i1) 2*p+2*m*k=y$
> (%i2) subst(p, m*k);
> (%o2) 2*p+2*m*k=y
>
> It has no affect.
>
> Rich
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>