coeff cmd for rational expressions.

Messages in english

Modérateur : xcasadmin

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

coeff cmd for rational expressions.

Message par compsystems » sam. oct. 12, 2024 12:41 am

hello

Great if you could extend certain functions to rational expressions.

coeff(5*x^-3 + 2*x^-2 + -6*x^-1 + -8, x^-3) -> 5

coeff(5*x^-3 + 2*x^-2 + -6*x^-1 + -8, -3) -> 5

coeff(5*x^-3 + 2*x^-2 + -6*x^-1 + -8, x^-1) -> -6

coeff(5*x^-3 + 2*x^-2 + -6*x^-1 + -8, -1) -> -6

Also in a monomial an argument to extract the alphabetic coefficient and numerical coefficient.

coeff(-6*x^2, 'alpha' )-> x^2

coeff(-6*x^2, 'num' ) -> -6

Répondre