## operations with terms

Messages in english

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

### operations with terms

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) enter a
coeff(x^2) 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

parisse
Messages : 5082
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

### Re: operations with terms

[op(a*x^2+b*x+c)]
coeff(a*x^2+b*x+c,x,2)

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

### Re: operations with terms

coeff(a*x^2+b*x+c,x,2) ok, but you have to know what degree of the polynomial is, sometimes it is very important to determine if the coefficient of the highest degree is 1, so it would be very useful to add a word to identify it

coeff(a*x^2+b*x+c,`>`) -> a

parisse
Messages : 5082
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

### Re: operations with terms

The leading coefficient command is lcoeff