Closed rtoy closed 1 week ago
Imported from SourceForge on 2024-07-07 13:40:34 Created by robert_dodier on 2008-08-15 00:02:58 Original: https://sourceforge.net/p/maxima/bugs/1477/#65d2
Logged In: YES user_id=501686 Originator: NO
I think subst([y + 2*x = a], h) works as expected (i.e. with the equation turned around).
When the subst argument is a list of equations, the left-hand side of each equation is the term to be replaced --- that is different from the form subst(foo, bar, baz) in which bar is to be replaced. Sorry that this is confusing.
Closing this report as "won't fix" since it is only a case of confusion, and I don't think it is serious enough to warrant changing subst.
Imported from SourceForge on 2024-07-07 13:40:37 Created by robert_dodier on 2008-08-15 00:02:58 Original: https://sourceforge.net/p/maxima/bugs/1477/#dec2
Imported from SourceForge on 2024-07-07 13:40:33 Created by xorx on 2008-08-14 12:37:40 Original: https://sourceforge.net/p/maxima/bugs/1477
The subst command does not work the same way with a list of substitution equations as with a directly specified substitution.
Example: (%i1) h:sin( y + 2*x)*cos(y+2*x)-(y+2*x)*3; (%o1) cos(y+2*x)*sin(y+2*x)-3*(y+2*x)(%i2)
(%i2) subst(a,y+2*x,h); (%o2) cos(a)*sin(a)-3*a(%i3)
(%i3) subs:[a=y+2*x]; (%o3) [a=y+2*x]
(%i4) subst(subs,h); (%o4) cos(y+2*x)*sin(y+2*x)-3*(y+2*x)
(%i5) subst([a=y+2*x],h); (%o5) cos(y+2*x)*sin(y+2*x)-3*(y+2*x)
Expression 2 does work fine, while expression 3,5 and 5 do not produce the expected result.