<s>[INST] construct polynomial from other polynomials If I have a polynomial, P, with root $a$ and a polynomial, Q, with root $b$, is there a way to construct polynomial R such that $a+b$ is a root of R?
Here's a concrete example.  a = $\sqrt2$. $P(x) = x^2 -2$ and $P(a) = 0$.
b = $\sqrt3$. $Q(x) = x^2 - 3$ and $Q(b) = 0$.
From another method, I know that $x^4 -10x^2 + 1$ has $\sqrt2 + \sqrt3$ as a root.
Is there a way to construct $R(x)$ from $P(x)$ and $Q(x)$?  $P$, $Q$, and $R$ are polynomials with integer coefficient.
Thank you.
 [/INST] Gaussian elimination is the key. The ring
$$ \mathbb{Q}[x,y]/(P(x),Q(y)) $$
is a vector space over $\mathbb{Q}$ with dimension $\partial P\cdot \partial Q$, and a base given by $x^i y^j$ for $i\in[0,\partial P-1],j\in[0,\partial Q-1]$. By representing $1,(x+y),(x+y)^2,\ldots,(x+y)^{\partial P\cdot\partial Q}$ in such a base we get $\partial P\cdot\partial Q+1$ elements in a vector space with dimension  $\partial P\cdot\partial Q$: it follows that $(x+y)^{\partial P\cdot \partial Q}$ can be represented as a linear combination of $1,(x+y),\ldots,(x+y)^{\partial P\cdot \partial Q-1}$ with rational coefficients: that provides a polynomial that vanishes at $a+b$.
In our concrete example, $P(x)=x^2-2$ and $Q(y)=y^2-3$, so from:
$$\begin{pmatrix} 1 \\ x+y \\ (x+y)^2 \\ (x+y)^3 \\ (x+y)^4\end{pmatrix}=\begin{pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 \\ 5 & 0 & 0 & 2 \\ 0 & 11 & 9 & 0 \\ 49 & 0 & 0 & 20\end{pmatrix}\begin{pmatrix}1 \\ x \\ y \\ xy\end{pmatrix}$$
we get $(x+y)^4 = 10(x+y)^2 - 1$, and $R(t)=\color{red}{t^4-10t^2+1}$ is a polynomial that vanishes at $\sqrt{2}+\sqrt{3}$. By studying the rank of the previous matrix, we also have that $R(t)$ is the minimal polynomial of $\sqrt{2}+\sqrt{3}$ over $\mathbb{Q}$.
</s>