Switch indeterminates in a polynomial
plug(p, indeterminate, value)
p | a polynomial |
---|---|
indeterminate | the indeterminate in the polynomial to switch |
value | the value/indeterminate to substitute |
an mpoly object
#> x^3 + 3 x^2 y + 3 x y^2 + y^3plug(p, "x", 5)#> 75 y + 15 y^2 + y^3 + 125plug(p, "x", "t")#> t^3 + 3 t^2 y + 3 t y^2 + y^3plug(p, "x", "y")#> 8 y^3#> 27 y^3#> x^3 + 6 x^2 y + 12 x y^2 + 8 y^3mp("((x+y)+y)^3")#> x^3 + 6 x^2 y + 12 x y^2 + 8 y^3#> y + 1 #> 2