operations with terms
Publié : lun. déc. 02, 2019 3:43 am
Hello BP
1: Is there an included function that returns the terms of expression?
subst(a*x^2+b*x+c,'+', nop) enter [a*x^2, b*x, c]
possible name of the command
terms(a*x^2+b*x+c) -> [a*x^2, b*x, c]
2: to get the coefficient of a term
increasing_power(0)
coeff(a*x^2)[0] enter a
coeff(x^2)[0] enter 1
coeff(a*x^2, degree(a*x^2)) enter a
possible name of the command
coeffterm(a*x^2) -> a
coeffterm(x^2) -> 1
or
coeff(a*x^2, 'term') -> a
Thanks
1: Is there an included function that returns the terms of expression?
subst(a*x^2+b*x+c,'+', nop) enter [a*x^2, b*x, c]
possible name of the command
terms(a*x^2+b*x+c) -> [a*x^2, b*x, c]
2: to get the coefficient of a term
increasing_power(0)
coeff(a*x^2)[0] enter a
coeff(x^2)[0] enter 1
coeff(a*x^2, degree(a*x^2)) enter a
possible name of the command
coeffterm(a*x^2) -> a
coeffterm(x^2) -> 1
or
coeff(a*x^2, 'term') -> a
Thanks