anka1 shared this question 3 years ago

Potrzebna jest mi lista

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

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

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})`

2

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

it is wroten in english

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}

2

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

1

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

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

Zamiast "4" jest "4*1"

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

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"

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})`

1

Bardzo, bardzo dziękuję.

:)