numerical coefficient of a term & literal part
Publié : ven. nov. 16, 2018 3:45 pm
Hi, BP
I want to extract the symbolic factors of a term (literal part)
I also want to extract the numerical coefficient of a term
For the following case, it works because there is no multiplicity in the variables
coeff(5*a*x*y,lname(5*a*x*y)); ↲ 5
coeff(3*a^(x+5) ,lname(3*a^(x+5))) ↲ [3*a^(x+5)] => 3
factors(3*a^(x+5)) ↲ [ 3, 1, a^(x+5),1] => [ a^(x+5),1]
I want to extract the symbolic factors of a term (literal part)
I also want to extract the numerical coefficient of a term
For the following case, it works because there is no multiplicity in the variables
coeff(5*a*x*y,lname(5*a*x*y)); ↲ 5
coeff(3*a^(x+5) ,lname(3*a^(x+5))) ↲ [3*a^(x+5)] => 3
factors(3*a^(x+5)) ↲ [ 3, 1, a^(x+5),1] => [ a^(x+5),1]