Polynomials displayed in variables other than x

Alex shared this question 4 months ago
Answered

Suppose I have a polynomial defined by RandomPolynomial(3, -9, 9), say f(x)=-x^3+x+9.

Is there an easy way to display the same polynomial but using another variable, say, f(k)=-k^3+k+9 ?

Thanks,

Alex

Comments (7)

photo
1

why should the variable name be relevant?


In CAS you can read the L:=Coefficients( <Polynomial> ) in a list and generate a variable list of P= sequence(k^i, i,0,lenght(L)) and rebuild the polynom as p(k)

photo
1

Thank you for your reply.

I plan to design some randomized exercises on polynomials, say, asking students to add two random polynomials. So I want some variations, using different variables other than x.

Your method is not perfect for me, because if some coefficients of the polynomial f(x) is 0,1 or -1, sequence(k^i, i,0,lenght(L)) CANNOT give the exact same look as f(x).

photo
1

Hm,


L:=Coefficients(RandomPolynomial(3, -9, 9))

h(k):=Sum(L Sequence(k^j, j, Length(L) - 1, 0, -1))

/oZNGo9FocibC4TDuTT9cENbW1pbvTJ8QskihmBJCiAIopoQQogCKKSGEKIBiSgghCqCYEkKIAv4fbD5qXWHJa5QAAAAASUVORK5CYII=

what about to change variable by call

h(x):=RandomPolynomial(3, -9, 9)

f(k):=h(k)

this doubles function

photo
1

Thanks for reminding me the great CAS. It accepts g(k):=f(k) with given function f(x).

photo
photo
1

quote: ...to display the same polynomial but using another variable...

only as text it is possible with custom tool as in the attachment

photo
1

Unbelievable! Thanks.

photo
photo
1

Thanks ALL. I get want I want: https://www.geogebra.org/m/ftvva88k

© 2021 International GeoGebra Institute