Can any one tell me what am I doing wrong in the following expression in Maple?
subs(a*b*c=A, e*f/d=B, a*b*c*e*f/d)
I am getting the output $\frac{abcef}{d}$ and not $AB$
Update : after the suggestion of @String which wored just fine, I am now posting my real expression, because it seems that the algsubs gives an error. The actual expression looks like:
algsub(b*((f/d)^t-1)/e = A, algsubs((m-1)*i*g*h*c*sqrt(2)*sqrt(1/(j*g))*s = B, a-(b*((f/d)^t-1)/e+(m-1)*i*g*h*c*sqrt(2)*sqrt(1/(j*g))*s*sqrt((2*(1-(b+a)/c))/a-(1-(b+a)/c)^2/a^2)/d)*e))
Which you can simply copy and past to Maple to get it properly. However, with the algsubs, I get the error Error, (in algsubs) cannot compute degree of pattern in g
You should use algsubs instead of subs. Unfortunately algsubs can only handle one substitution at the time so you will need a command like:
for it to work.
Update
Regarding your update it appears that applyrule does a better job and is easier to use anyway:
Also, I stored the parts of the code in variables, namely
and then applied the command
which worked just fine!