Question: Check if a variable or his powers are present

Hi I'm trying to do something that looks very simple, but I don't find a simple way to do it. In my program I've a procedure which pass to another procedure a variable that can in one of these form: 1) A:= 5*f^a * ln(f) 2) A:= 5*ln(f with "a" real (his value change and I don't know it in advance) and a real coeff (5 in this exemple) The next procedure, that use this variable should be capable to understand if f^a is present with a<>0 or with a=0 (ie not present), and should make different choices in the two cases. I don't know how to make this test. I've tried a) has(A,f) but this answers yes even in the case 2) b) indets(A) the same c) has(..,A) the same The only thing I've founded that work is temp:=has(indets(remove(has,A,ln)),f); that verify if f^a is present and has_f,has_numbers:= selectremove(has,A,f); has_ln,has_f:=selectremove(has,expand(has_f),ln(f)) f_pow:=coeff(ln(has_f),ln(f)); to discover the value of the power of f; Is there a simpler way to do this kind of selection games? Thanks Salvo
Please Wait...