Previous Up Next

8.1.16  Substituting a subexpression by another expression

The algsubs command replaces subexpressions of an expression, rather than just replace variables.

Examples

algsubs(x^2=u,1+x^2+x^4)
     
u2+u+1           
algsubs(a*b/c=d,2*a*b^2/c)
     
2*b*d           
algsubs(2a=p^2-q^2,algsubs(2c=p^2+q^2, c^2-a^2))
     
p2q2           

Previous Up Next