# Polynomial Big List: Find the polynomial whose roots are given by some functions of the roots of given polynomials.

I would like to create a compilation about polynomials for future reference. The aim is to capture some scenarios that appear in many exams and contests. Please feel free to make a contribution.

Request. For each answer, please give the setting of your problem (the input polynomials, the function, etc) and the output polynomial. Please also provide a proof, a proof sketch, or a reference for your claim.

The five scenarios I have thought of are listed below. In what follows, let $$\mathbb{K}$$ be a field with the algebraic closure $$\overline{\mathbb{K}}$$. (For those who have not yet learned about fields, think of $$\mathbb{K}$$ as $$\mathbb{R}$$, and $$\overline{\mathbb{K}}$$ as $$\mathbb{C}$$.) For simplicity, all polynomials involved may be assumed to be monic (that is, the leading coefficient is $$1$$).

Scenario I. A polynomial $$p(x)$$ of degree $$d$$ is given, where $$r_1,r_2,\ldots,r_d\in\overline{\mathbb{K}}$$ are the roots of $$p(x)$$. For a function $$f:\overline{\mathbb{K}}\to\overline{\mathbb{K}}$$, let $$q(x)$$ be the polynomial of degree $$d$$ with roots $$f(r_1)$$, $$f(r_2)$$, $$\ldots$$, $$f(r_d)$$. What is $$q(x)$$ in terms of $$p(x)$$ and $$f$$?

Example I.

• If $$f(t)=\lambda t+\mu$$ where $$\lambda,\mu\in\mathbb{K}$$ with $$\lambda\neq 0$$, then $$q(x)=\lambda^d\,p\left(\dfrac{x-\mu}{\lambda}\right)$$.
• If all roots of $$p(x)$$ are nonzero and $$f(t)=\dfrac{1}{t}$$ for $$t\neq 0$$, then $$q(x)=\dfrac{x^d}{p(0)}\,p\left(\dfrac{1}{x}\right)$$.
• If $$f(t)=t^2$$ and $$p(x)=x^2+ax+b$$, then $$q(x)=x^2-(a^2-2b)x+b^2$$.

Scenario II. A polynomial $$p(x)$$ of degree $$d$$ is given, where $$r_1,r_2,\ldots,r_d\in\overline{\mathbb{K}}$$ are the roots of $$p(x)$$. For a symmetric function $$f:\overline{\mathbb{K}}\times\overline{\mathbb{K}}\to\overline{\mathbb{K}}$$, let $$q(x)$$ be the polynomial of degree $$\dfrac{d(d-1)}{2}$$ with roots $$f(r_i,r_j)$$ where $$i$$ and $$j$$ are integers such that $$1\leq i. What is $$q(x)$$ in terms of $$p(x)$$ and $$f$$?

Example II. If $$f(t_1,t_2)=t_1+t_2$$ and $$p(x)=x^3+ax^2+bx+c$$, then $$q(x)=x^3+2a\,x^2+(a^2+b)\,x+(ab-c)\,.$$

Scenario III. A polynomial $$p(x)$$ of degree $$d$$ is given, where $$r_1,r_2,\ldots,r_d\in\overline{\mathbb{K}}$$ are the roots of $$p(x)$$. For an asymmetric function $$f:\overline{\mathbb{K}}\times\overline{\mathbb{K}}\to\overline{\mathbb{K}}$$, let $$q(x)$$ be the polynomial of degree $$d(d-1)$$ with roots $$f(r_i,r_j)$$ where $$i,j\in\{1,2,\ldots,d\}$$ are such that $$i\neq j$$. What is $$q(x)$$ in terms of $$p(x)$$ and $$f$$?

Example III. If $$f(t_1,t_2)=\dfrac{t_1}{t_2}$$ and $$p(x)=x^2+ax+b$$ with $$b\neq 0$$, then $$q(x)=x^2-\left(\dfrac{a^2}{b}-2\right)\,x+1\,.$$

Scenario IV. A polynomial $$p(x)$$ of degree $$d$$ is given, where $$r_1,r_2,\ldots,r_d\in\overline{\mathbb{K}}$$ are the roots of $$p(x)$$. Let $$s>2$$ and $$f:\overline{\mathbb{K}}^s\to\overline{\mathbb{K}}$$ be given. If $$q(x)$$ is a polynomial whose roots are given by $$f(r_{i_1},r_{i_2},\ldots,r_{i_s})$$ where $$(i_1,i_2,\ldots,i_s)$$ is in some subset $$S$$ of $$\{1,2,\ldots,d\}^s$$, then what is $$q(x)$$ in terms of $$p(x)$$ and $$f$$?

Example IV. If $$f(t_1,t_2,t_3)=t_1t_2t_3$$, $$p(x)=x^4+a_3x^3+a_2x^2+a_1x+a_0$$, and $$S=\big\{(1,2,3),(1,2,4),(1,3,4),(2,3,4)\big\}\,,$$ then $$q(x)=x^4+a_1\,x+a_2a_0\,x+a_3a_0^2\,x+a_0^3\,.$$ More generally, for a given polynomial $$p(x)=\sum\limits_{k=0}^d\,a_k\,x^k$$ of degree $$d>1$$, if $$f(t_1,t_2,\ldots,t_{d-1})=t_1t_2\cdots t_{d-1}$$ with $$S=\big\{(i_1,i_2,\ldots,i_{d-1})\,\big|\,1\leq i_1 we have $$q(x)=\sum\limits_{k=0}^d\,(-1)^{d(d-k)}\,a_{d-k}\,a_0^{d-k-1}\,x^k\,,$$ where we use the conventions $$a_0^0=1$$ and $$a_0\,a_0^{-1}=1$$ even if $$a_0=0$$.

Scenario V. Polynomials $$p_1(x),p_2(x),\ldots,p_n(x)\in\mathbb{K}[x]$$ are given, where $$p_i(x)$$ has degree $$d_i$$ with roots $$r_i^j\in\overline{\mathbb{K}}$$ for $$j=1,2,\ldots,d_i$$. For a function $$f:\overline{\mathbb{K}}^n\to\overline{\mathbb{K}}$$, let $$q(x)\in\overline{\mathbb{K}}[x]$$ be the polynomial of degree $$\prod\limits_{i=1}^n\,d_i$$ with roots $$f\left(r_1^{j_1},r_2^{j_2},\ldots,r_n^{j_n}\right)$$ with $$j_i\in\{1,2,\ldots,d_i\}$$ for every $$i=1,2,\ldots,n$$. What is $$q(x)$$ in terms of $$p_1(x),p_2(x),\ldots,p_n(x)$$ and $$f$$?

Example V. If $$p_1(x)=x^2+a_1x+b_1$$, $$p_2(x)=x^2+a_2x+b_2$$, and $$f(t_1,t_2)=t_1t_2$$, then $$q(x)=x^4-a_1a_2\,x^3+(a_1^2b_2+a_2^2b_1-2b_1b_2)\,x^2-a_1a_2b_1b_2\,x+b_1^2b_2^2\,.$$

Proof of Example V. Recall that $$r_i^1+r_i^2=-a_i\text{ and }r_i^1r_i^2=b_i\text{ for }i\in\{1,2\}\,.$$ Therefore, $$\sum_{j_1,j_2\in\{1,2\}}\,f(r_1^{j_1},r_1^{j_2})=(r_1^1+r_1^2)(r_2^1+r_2^2)=a_1a_2$$ and $$\prod_{j_1,j_2\in\{1,2\}}\,f(r_1^{j_1},r_1^{j_2})=(r_1^1r_1^2)^2(r_2^1r_2^2)^2=b_1^2b_2^2\,.$$ Observe that \begin{align}\sum_{\big\{(j_1,j_2),(j'_1,j'_2),(j''_1,j''_2)\big\}\in\binom{\{0,1\}^2}{3}}\,&f(r_1^{j_1},r_2^{j_2})\cdot f(r_1^{j'_1},r_2^{j'_2})\cdot f(r_1^{j''_1},r_2^{j''_2})\\&=b_1b_2\,\sum_{j_1,j_2\in\{1,2\}}\,f(r_1^{j_1},r_1^{j_2})=a_1a_2b_1b_2\,.\end{align} Finally, \begin{align}\sum_{\big\{(j_1,j_2),(j'_1,j'_2)\big\}\in\binom{\{0,1\}^2}{2}}\,f(r_1^{j_1},r_2^{j_2})\cdot f(r_1^{j'_1},r_2^{j'_2})&=b_2\,\sum_{j=1}^2\,(r_1^j)^2+b_1\,\sum_{j=1}^2\,(r_2^j)^2+2b_1b_2\\&=b_2(a_1^2-2b_1)+b_1\,(a_2^2-2b_2)+2b_1b_2\\&=a_1^2b_2+a_2^2b_1-2b_1b_2\,.\end{align} The proof is now complete.

This example aligns with Scenario IV. Let $$p(x)=x^3+ax^2+bx+c$$, $$f(t_1,t_2,t_3)=\dfrac{t_1}{t_2}+\dfrac{t_2}{t_3}+\dfrac{t_3}{t_1}$$, and $$S=\big\{(1,2,3),(1,3,2)\big\}$$. Suppose that $$c\neq 0$$. Because $$r_1+r_2+r_3=-a$$, $$r_2r_3+r_3r_1+r_1r_2=b$$, and $$r_1r_2r_3=-c$$, we have $$f(r_1,r_2,r_3)+f(r_1,r_3,r_2)=-\frac{ab}{c}-3$$ and $$f(r_1,r_2,r_3)\cdot f(r_1,r_3,r_2)=\frac{a^3c-6abc+b^3}{c^2}+9\,.$$ Therefore, $$q(x)=x^2+\left(\frac{ab}{c}+3\right)\,x+\left(\frac{a^3c-6abc+b^3}{c^2}+9\right)\,.$$

This example aligns with Scenario I. Let $$f(t)=\dfrac{\alpha \,t+\beta}{t+\delta}$$, where $$\alpha\delta\neq \beta$$. Observe that $$f(t)=\alpha+\frac{\beta-\alpha\delta}{t+\delta}\,.$$ Let $$p(x)$$ be a given polynomial with roots $$r_1,r_2,\ldots,r_d$$. Suppose that $$q_1(x)$$ is the polynomial with roots $$\dfrac{1}{r_i+\delta}$$ for $$i=1,2,\ldots,d$$. Therefore, we see that $$q_1(x)=\prod_{i=1}^d\,\left(x-\frac{1}{r_i+\delta}\right)=x^d\,\frac{\prod\limits_{i=1}^d\,\left(\frac{1}{x}-\delta-r_i\right)}{\prod\limits_{i=1}^d\,(-\delta-r_i)}=\dfrac{x^d}{p(-\delta)}\,p\left(\frac{1}{x}-\delta\right)\,.$$ If $$q(x)$$ is the polynomial with roots $$\alpha+\dfrac{\beta-\alpha\delta}{t+\delta}$$, then $$q(x)=(\beta-\alpha\delta)^d\,q_1\left(\frac{x-\alpha}{\beta-\alpha\delta}\right)\,.$$ Consequently, $$q(x)=\frac{(x-\alpha)^d}{p(-\delta)}\,p\left(\frac{\beta-\alpha\delta}{x-\alpha}-\delta\right)=\frac{(x-\alpha)^d}{p(-\delta)}\,p\left(\frac{\beta-\delta x}{x-\alpha}\right)\,.$$

This example aligns with Scenario II. Let $$p(x)=x^3+ax^2+bx+c$$ and $$f(t_1,t_2)=t_1^2t_2^2$$. Suppose that $$c\neq 0$$. Because $$r_1+r_2+r_3=-a$$, $$r_2r_3+r_3r_1+r_1r_2=b$$, and $$r_1r_2r_3=-c$$, we have $$f(r_1,r_2)+f(r_1,r_3)+f(r_2,r_3)=b^2-2ac\,,$$ $$f(r_1,r_2)\cdot f(r_1,r_3)+f(r_1,r_2)\cdot f(r_2,r_3)+f(r_1,r_3)\cdot f(r_2,r_3)=(a^2-2b)c^2\,,$$ and $$f(r_1,r_2)\cdot f(r_1,r_3)\cdot f(r_2,r_3)=c^4\,.$$ Therefore, $$q(x)=x^3-(b^2-2ac)\,x^2+(a^2-2b)c^2\,x-c^4\,.$$

This example aligns with Scenario III. Let $$p(x)=x^2+ax+b$$ and $$f(t_1,t_2)=\lambda t_1+\mu t_2$$, where $$\lambda,\mu\neq0$$ and $$\lambda\neq \mu$$. Because $$r_1+r_2=-a$$ and $$r_1r_2=b$$, we get $$f(r_1,r_2)+f(r_2,r_1)=(\lambda+\mu)(r_1+r_2)=-(\lambda+\mu)a$$ and $$f(r_1,r_2)\cdot f(r_2,r_1)=\lambda\mu(r_1^2+r_2^2)+(\lambda^2+\mu^2)r_1r_2=\lambda\mu(a^2-2b)+(\lambda^2+\mu^2)b\,.$$ Hence, $$q(x)=x^2+(\lambda+\mu)a\,x+\left(\lambda\mu a^2+(\lambda-\mu)^2 b\right)\,.$$

This example aligns with Scenario V. Let $$p_1(x)=x^2+a_1x+b_1$$, $$p_2(x)=x^2+a_2x+b_2$$, and $$f(t_1,t_2)=\lambda_1t_1+\lambda_2t_2$$, where $$\lambda_1,\lambda_2\neq 0$$. Then, $$q(x)=\prod_{j_1=1}^2\,\prod_{j_2=1}^2\,\left(x-\lambda_1r_1^{j_1}-\lambda_2r_2^{j_2}\right)=\prod_{j_1=1}^2\,\lambda_2^2\,\prod_{j_2=1}^2\,\left(\frac{x-\lambda_1r_1^{j_1}}{\lambda_2}-r_2^{j_2}\right)\,.$$ Therefore, $$q(x)=\prod_{j_1=1}^2\,\lambda_2^2\,p_2\left(\frac{x-\lambda_1\,r_1^{j_1}}{\lambda_2}\right)=\prod_{j_1=1}^2\,\left((x-\lambda_1r_1^{j_1})^2+\lambda_2a_2(x-\lambda_1r_1^{j_1})+\lambda_2^2b_2\right)\,.$$ Note that \begin{align}(x-\lambda_1r_1^{j_1})^2&+\lambda_2a_2(x-\lambda_1r_1^{j_1})+\lambda_2^2b_2 \\&=x^2+\lambda_2a_2x+\lambda_2^2b_2-\left(2\lambda_1x+\lambda_1\lambda_2 a_2\right)r_1^{j_1}+\lambda_1^2(r_1^{j_1})^2\,.\end{align} Now, if $$r$$ is a root of $$p_1(x)$$, then $$r^2=-a_1r-b_1\,,$$ whence \begin{align}(x-\lambda_1r_1^{j_1})^2&+\lambda_2a_2(x-\lambda_1r_1^{j_1})+\lambda_2^2b_2 \\&=x^2+\lambda_2a_2x+\lambda_2^2b_2-\left(2\lambda_1x+\lambda_1\lambda_2 a_2\right)r_1^{j_1}-\lambda_1^2\left(a_1r_1^{j_1}+b_1\right) \\&=\left(x^2+\lambda_2a_2x+\lambda_2^2b_2-\lambda_1^2b_1\right)-\left(2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1\right)r_1^{j_1}\,.\end{align} That is, $$q(x)=\left(2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1\right)^2\,\prod_{j_1=1}^2\,\left(\frac{x^2+\lambda_2a_2x+\lambda_2^2b_2-\lambda_1^2b_1}{2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1}-r_1^{j_1}\right)\,.$$ That is, $$q(x)=\left(2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1\right)^2\,p_1\left(\frac{x^2+\lambda_2a_2x+\lambda_2^2b_2-\lambda_1^2b_1}{2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1}\right)\,.$$ Ergo, \begin{align}q(x)&=\left(x^2+\lambda_2a_2x+\lambda_2^2b_2-\lambda_1^2b_1\right)^2 \\&\phantom{abcd}+a_1\left(x^2+\lambda_2a_2x+\lambda_2^2b_2-\lambda_1^2b_1\right)\left(2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1\right) \\&\phantom{abcdefg}+b_1\left(2\lambda_1x+\lambda_1\lambda_2 a_2+\lambda_1^2a_1\right)^2 \\ &=x^4 +2\left(\lambda_1a_1+\lambda_2a_2\right)\,x^3 \\&\phantom{abcd}+\left(\lambda_1^2\alpha_1^2+\lambda_2^2\alpha_2^2+3\lambda_1\lambda_2\alpha_1\alpha_2+2\lambda_1^2b_1+2\lambda_2^2b_2\right)\,x^2 \\&\phantom{abcdefg}+\left(\lambda_1^2\lambda_2a_1^2a_2+\lambda_1\lambda_2^2a_1a_2^2+2\lambda_1^3a_1b_1+2\lambda_2^2a_2b_2+2\lambda_1^2\lambda_2a_2b_1+2\lambda_1\lambda_2^2a_1b_2\right)x \\&\phantom{abcdfghijk}+\left(\lambda_1^3\lambda_2a_1a_2b_1+\lambda_1\lambda_2^3a_1a_2b_2+\lambda_1^2\lambda_2^2a_1^2b_2+\lambda_1^2\lambda_2^2a_2^2b_1+\lambda_1^4b_1^2+\lambda_2^4b_2^2-2\lambda_1^2\lambda_2^2b_1b_2\right)\,.\end{align} In particular, if $$\lambda_1=\lambda_2=1$$, we have \begin{align}q(x)&=x^4+2(a_1+a_2)\,x^3+(a_1^2+3a_1a_2+a_2^2+2b_1+2b_2)\,x^2 \\&\phantom{abcd}+(a_1^2a_2+a_1a_2^2+2a_1b_1+2a_2b_2+2a_1b_2+2a_2b_1)\,x\\&\phantom{abcdefg}+(a_1a_2b_1+a_1a_2b_2+a_1^2b_2+a_2^2b_1+b_1^2-2b_1b_2+b_2^2)\,.\end{align}

This example aligns with Scenario IV. Let $$p(x)=x^4+a_3x^3+a_2x^2+a_1x+a_0$$, $$f(t_1,t_2,t_3,t_4)=t_1t_2+t_3t_4\,,$$and $$S=\big\{(1,2,3,4),(1,3,2,4),(1,4,2,3)\big\}$$. Because $$r_1+r_2+r_3+r_4=-a_3\,,$$ $$r_1r_2+r_1r_3+r_1r_4+r_2r_3+r_2r_4+r_3r_4=a_2\,,$$ $$r_1r_2r_3+r_1r_2r_4+r_1r_3r_4+r_2r_3r_4=-a_1\,,$$ and $$r_1r_2r_3r_4=a_0\,,$$ we have $$f(r_1,r_2,r_3,r_4)+f(r_1,r_3,r_2,r_4)+f(r_1,r_4,r_2,r_3)=a_2\,,$$ \begin{align}f(r_1,r_2,r_3,r_4)\cdot f(r_1,r_3,r_2,r_4)&+f(r_1,r_2,r_3,r_4)\cdot f(r_1,r_4,r_2,r_3)+f(r_1,r_3,r_2,r_4)\cdot f(r_1,r_4,r_2,r_3) \\&=a_3a_1-4a_0\,,\end{align} and $$f(r_1,r_2,r_3,r_4)\cdot f(r_1,r_3,r_2,r_4)\cdot f(r_1,r_4,r_2,r_3)=a_3^2a_0+a_1^2-4a_2a_0\,.$$ Therefore, $$q(x)=x^3-a_2\,x^2+\left(a_3a_1-4a_0\right)\,x-\left(a_3^2a_0+a_1^2-4a_2a_0\right)\,.$$

This example aligns with Scenario I. Let $$f(t)=f_2t^2+f_1t+f_0$$, where $$f_2 \neq 0$$. Let $$p(x)$$ be a given polynomial with roots $$r_1,r_2,\ldots,r_d$$. Suppose that $$q(x)$$ is the polynomial with roots $$f(r_i)$$ for $$i=1,2,\ldots,d$$. Therefore, we see that $$q(x)=\prod_{i=1}^d\,\left(x-f_2r_i^2-f_1r_i-f_0\right)=(-1)^df_2^d\,\prod\limits_{i=1}^d\,\left(r_i^2+\frac{f_1}{f_2}r_i+\frac{f_0}{f_2}-\frac{x}{f_2}\right)\,.$$ Ergo, $$q(x)=(-1)^df_2^d\,\prod_{i=1}^d\,\left(r_i-\frac{-f_1+\sqrt{f_1^2-4f_2f_0+4f_2x}}{2f_2}\right)\left(r_i-\frac{-f_1-\sqrt{f_1^2-4f_2f_0+4f_2x}}{2f_2}\right)\,,$$ making $$q(x)=(-1)^df_2^d\,p\left(\frac{-f_1+\sqrt{f_1^2-4f_2f_0+4f_2x}}{2f_2}\right)\,p\left(\frac{-f_1-\sqrt{f_1^2-4f_2f_0+4f_2x}}{2f_2}\right)\,.$$ If the polynomial $$\tilde{p}(x)$$ whose roots are given by $$\left(r_i+\dfrac{f_1}{2f_2}\right)^2$$ for $$i=1,2,\ldots,d$$ is known, then $$q(x)=f_2^d\,\tilde{p}\left(\frac{4f_2x+f_1^2-4f_2f_0}{4f_2^2}\right)\,.$$ In particular, if $$p(x)=x^2+ax+b$$, then $$\tilde{p}(x)=x^2-\left(a^2-2b-\frac{f_1}{f_2}a+\frac{f_1^2}{2f_2^2}\right)\,x+\left(b-\frac{f_1}{2f_2}a+\frac{f_1^2}{4f_2^2}\right)^2\,,$$ whence \begin{align}q(x)&=x^2 + \left(-a^2f_2 + af_1 + 2bf_2 - 2f_0\right)\,x \\&\phantom{abcd}+ \left(a^2f_0f_2 - abf_1f_2 + b^2f_2^2 - af_0f_1 + bf_1^2 - 2bf_0f_2 + f_0^2\right)\,.\end{align}

This example aligns with Scenario II. Let $$p(x)=x^4+ax+b$$ and $$f(t_1,t_2)=\dfrac{\alpha\,t_1+\beta}{\gamma\,t_2+\delta}$$, where $$\alpha,\beta,\gamma,\delta\in\mathbb{K}$$ are such that $$\alpha\neq 0$$, $$\gamma\neq 0$$, and $$\gamma^2b-\gamma\delta a+\delta^2\neq 0$$. From $$r_1+r_2=-a$$ and $$r_1r_2=b$$, we have $$\dfrac{\alpha\,r_1+\beta}{\gamma\,r_2+\delta}+\dfrac{\alpha\,r_2+\beta}{\gamma\,r_1+\delta}=\frac{\alpha\gamma(a^2-2b)-(\alpha\delta+\beta\gamma)a+\beta\delta}{\gamma^2b-\gamma\delta a+\delta^2}$$ and $$\dfrac{\alpha\,r_1+\beta}{\gamma\,r_2+\delta}\cdot\dfrac{\alpha\,r_2+\beta}{\gamma\,r_1+\delta}=\frac{\alpha^2b-\alpha\beta a+\beta^2}{\gamma^2b-\gamma\delta a+\delta^2}\,.$$ Consequently, $$q(x)=x^2-\frac{\alpha\gamma(a^2-2b)-(\alpha\delta+\beta\gamma)a+\beta\delta}{\gamma^2b-\gamma\delta a+\delta^2}\,x+\frac{\alpha^2b-\alpha\beta a+\beta^2}{\gamma^2b-\gamma\delta a+\delta^2}\,.$$

This example aligns with Scenario III. Let $$p(x)=x^3+ax^2+bx+c$$ and $$f(t_1,t_2)=t_1-t_2$$. If $$q(x)$$ is the polynomial with roots $$f(r_i,r_j)$$ for $$i,j\in\{1,2,3\}$$ with $$i\ne j$$, then clearly, $$q(x)=Q(x^2)\,,$$ where $$Q(x)$$ is the polynomial with roots $$(r_i-r_j)^2$$, where $$1\leq i. It is not difficult to see that $$(r_1-r_2)^2+(r_1-r_3)^2+(r_2-r_3)^2=2(a^2-3b)\,,$$ \begin{align}(r_1-r_2)^2\cdot (r_1-r_3)^2&+(r_1-r_2)^2\cdot (r_2-r_3)^2+(r_1-r_3)^2\cdot(r_2-r_3)^2 \\&=a^4-6a^2b+9b^2\,,\end{align} and $$(r_1-r_2)^2\cdot(r_1-r_3)^2\cdot(r_2-r_3)^2=-4a^3c+a^2b^2+18abc-4b^3-27c^2$$ (which is the discriminant of $$p(x)$$). Therefore, $$Q(x)=x^3-2(a^2-3b)\,x^2+(a^4-6a^2b+9b^2)\,x-(-4a^3c+a^2b^2+18abc-4b^3-27c^2)\,,$$ making $$q(x)=x^6-2(a^2-3b)\,x^4+(a^4-6a^2b+9b^2)\,x^2-(-4a^3c+a^2b^2+18abc-4b^3-27c^2)\,.$$

This example aligns with Scenario I. Let $$f(t)=\sum\limits_{k=0}^n\,f_kt^k$$ with $$f_n \neq 0$$, and $$p(x)=x^2+ax+b\,.$$ Assume that we know all the roots of $$f$$: $$f(t)=f_n\,\prod_{k=1}^n\,(t-\rho_k)\,.$$ Define the Newton sequence $$(s_m)_{m=0}^\infty$$ as follows: $$s_0:=2$$, $$s_1=-a$$, and $$s_m:=-as_{m-1}-bs_{m-2}\,\text{ for }m=2,3,\ldots\,.$$ Then, the polynomial $$q(x)$$ with roots $$f(r_1)$$ and $$f(r_2)$$ is given by $$q(x)=x^2-\left(\sum_{k=0}^n\,f_ks_k\right)\,x+f_n^2\,\prod_{k=1}^n\,p(\rho_k)\,.$$ In other words, $$q(x)=x^2-f_n\,\left(\sum_{k=0}^n\,(-1)^{n-k}\,s_k\,\sum_{T\in\binom{[n]}{n-k}}\,\prod_{\nu\in T}\,\rho_\nu\right)\,x+f_n^2\,\prod_{k=1}^n\,p(\rho_k)\,,$$ where $$[n]:=\{1,2,\ldots,n\}$$ and $$\displaystyle\binom{[n]}{m}$$ is the set of all subsets of $$[n]$$ of size $$m\in\{0,1,2,\ldots,n\}$$.