coeff cmd for rational expressions.
Publié : 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
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