What is the correct idiom in Maple to do subexpression replacement?
Suppose I want to replace each occurance of ln(anything) by ln(abs(anything)) in an expression.
Currently I call indets and then loop over each entry and use patmatch to do the replacement.
Is there a better method than what I doing now? Here is an example
expr := 7*ln(arcsin(x))-(1/2)*ln(x-1)*sin(x)-(1/2)*ln(x+1)+f;
for z in lis do
if patmatch(z,a::anything*ln(b::anything)*c::anything,'la') then
expr:=subs(z = a*ln(abs(b))*c, expr);
I do not know if this will fails on some other cases yet.