Wikipedia:Reference desk/Archives/Mathematics/2019 October 30

= October 30 =

Composition of polynomials
For polynomials f(x) and g(x) in indeterminate x, can the composition operation f(g(x)) be defined in a natural manner? - or is there some technical difficulty that prevents that? - or have I overlooked something in the article that explains this?

Tashiro~enwiki (talk) 14:40, 30 October 2019 (UTC)


 * The composition $$f(g(x))$$ is defined just how you'd expect – by substituting $$g(x)$$ into any $x$ that appears in $$f(x).$$ For example, if $$f(x) = x^2 + 2x$$ and $$g(x) = x^3 + 1,$$ then
 * $$\begin{align}

f(g(x)) &= (x^3 + 1)^2 + 2(x^3 + 1) \\ &= x^6 + 2x^3 + 1 + 2x^3 + 2 \\ &= x^6 + 4x^3 + 3. \end{align}$$
 * The example I used had integer coefficients, but the same definition works for coefficients in any ring. –Deacon Vorbis (carbon &bull; videos) 15:04, 30 October 2019 (UTC)


 * As a comment on the article from which my comment was taken: This information should be included in the article.
 * Tashiro~enwiki (talk) 16:13, 30 October 2019 (UTC)


 * There could be some "irregularities". For example:

f(x) = x2 g(x) = x1/2
 * The simple answer is f(g(x)) = x, but for negative values of x, x1/2 is an imaginary number. So, if you exclude imaginary numbers from the calcs, and only take the real root, you end up with f(g(x)) = |x|. Note that this also means f(g(x)) <> g(f(x)). SinisterLefty (talk) 18:28, 30 October 2019 (UTC)
 * x1/2 is not a polynomial in x. --Trovatore (talk) 18:55, 30 October 2019 (UTC)


 * On whether the operation should be mentioned in the article: There's probably not a lot in the literature that covers this. Not that composition of polynomials (or functions in general) isn't important, but apparently the context of ring theory doesn't really add much in the way of useful information. Composition would distribute with addition and multiplication on one side — (f+g)∘h = f∘h+g∘h and (f⋅g)∘h = f∘h⋅g∘h — but not the other, and common algebraic constructs require two sided distributivity. --RDBury (talk) 00:31, 31 October 2019 (UTC)
 * Yeah, I can't see any value in giving an algorithm to compose polynomials. Too much like a homework problem; doesn't add much conceptually.  If someone can find a website that details it, I suppose I wouldn't object to adding it as an external link. --Trovatore (talk) 04:04, 31 October 2019 (UTC)


 * What about this: For any polynomial $$g\in R[x]$$ the map $$f\mapsto f\circ g$$ is an algebra endomorphism of  $$R[x]$$ as $$R$$-algebra, and conversely, any algebra endomorphism of $$R[x]$$ is of the form $$f\mapsto f\circ g$$ for exactly one polynomial $$g\in R[x]$$. pm a  00:18, 6 November 2019 (UTC)