Lista składników

anka1 shared this question 3 years ago
Answered

Potrzebna jest mi lista

{-2x^3,0x^2,-3x,4}

Czy jest na to krótszy sposób niż tworzenie list w1,w2,w3?

Best Answer
photo

Ok, you are moaning about the exponents in x^1 and x^0 ...

Then try this ...

Coefficients(w) Union(Sequence(x^k, k, Degree(w), 2, -1), {x, 1})

Comments (8)

photo
2

not shorter but one instruction Coefficients(w) Sequence(x^n, n, Degree(w) , 0, -1)


it is wroten in english

photo
1

Dziękuję bardzo.

Jest prawie dobrze, ale zamiast "4" mam "4x^0"


Z kolei

Współczynniki(w) Ciąg(Uprość(x^n), n, Stopień(w), 0, -1)

daje mi

{-2x^3,0x^2,-3x,4*1}

photo
2

then perhaps Coefficients(w) Sequence(Polynomial(x^n), n, Degree(w), 0, -1)

photo
1

Coefficients(w) Sequence(Polynomial(x^n), n, Degree(w), 0, -1)


{-2x^3,0x^2,-3x,4*1}

Zamiast "4" jest "4*1"

photo
2

Hmm, have you also try out the suggested commands in CAS instead of Algebra?

If that doesn't help, a workaround might be manipulating the Sequence-List by hand knowing that degree 0 seems to cause the problem for you.


Coefficients(w) Append(Sequence(x^n, n, Degree(w), 1, -1), 1)

Greetings

mire2

photo
1

Coefficients(w) Append(Sequence(x^n, n, Degree(w), 1, -1), 1)


{{-2x^3,0x^2,-3x^1,4}}


Zamiast "-3x" mam "-3x^1"

photo
2

Ok, you are moaning about the exponents in x^1 and x^0 ...

Then try this ...

Coefficients(w) Union(Sequence(x^k, k, Degree(w), 2, -1), {x, 1})

photo
1

Bardzo, bardzo dziękuję.

:)

© 2021 International GeoGebra Institute