Constructing a degree 4 rational polynomial satisfying $f(\sqrt{2}+\sqrt{3}) = 0$

Goal: Find $f \in \mathbb{Q}[x]$ such that $f(\sqrt{2}+\sqrt{3}) = 0$.

A direct approach is to look at the following

(\sqrt{2}+\sqrt{3})^2 &= 5+2\sqrt{6} \\
(\sqrt{2}+\sqrt{3})^4 &= (5+2\sqrt{6})^2 = 49+20\sqrt{6} \\

Putting those together gives

-1 + 10(\sqrt{2}+\sqrt{3})^2 – (\sqrt{2}+\sqrt{3})^4 = 0,

so $f(x) = -1 + 10x^2 – x^4$ satisfies $f(\sqrt{2}+\sqrt{3}) = 0$.

Is there a more mechanical approach? Perhaps not entirely mechanical, but something more abstract.

Solutions Collecting From Web of "Constructing a degree 4 rational polynomial satisfying $f(\sqrt{2}+\sqrt{3}) = 0$"

There is a mechnical procedure, as follows.

Any polynomial function of $r = \sqrt 2 + \sqrt 3$ must have the form $a + b\sqrt 2 + c\sqrt 3 + d\sqrt 6$ for rational $a,b,c,d$. Consider the set of numbers of that form as a vector space $V$ over the rationals. It has dimension 4.

Now calculate $r^0, r^1, r^2, r^3, r^4$. These are five elements of the vector space $V$, and since $V$ has dimension only 4, they cannot be linearly independent. Therefore there must exist rationals $a_0,\ldots, a_4$ such that $a_4r^4 + a_3r^3 + a_2r^2 + a_1r^1 + a_0r^0 = 0$. These can be found by well-known mechanical methods for changing the basis of a vector space. Then our polynomial is $a_4x^4 + a_3x^3 + a_2x^2 + a_1x^1 + a_0$.

(There are a couple of fine points I skipped here: $a_4$ might be zero; $r^3$ might not be independent of $r^0, r^1, $ and $r^2$. None of this is hard to deal with.)

Here is an example.
Calculate powers of $r = \sqrt2 + \sqrt3$, and tabulate them:

% & 1 & \sqrt2 & \sqrt3 &\sqrt 6\\
r^0 = & 1 &&&\\
r^1 = & & \sqrt2 & + \sqrt3 & \\
r^2 = & 5 & && + 2\sqrt6\\
r^3 = & &11\sqrt2 &+ 9\sqrt3 \\
r^4 = & 49 &&& + 20\sqrt 6

Now we want to find rational $a,b,c,d$ such that $r^4 = ar^3 + br^2 + cr^1 + dr^0$. Such rationals must exist. (Unless $r^0\ldots r^3$ are not independent, in which case we are looking for a polynomial of lower degree, and we can use the same method with even less effort.) The relations in the table above impose relations on $a,b,c,d$ that we can read off from the table, one relation for each column:

& 5b & & + d &=49\\
11a&& + c &&= 0\\
&2b&&& = 20

We can solve the equations mechanically (they are particularly simple in this case; you can just read off the answer) and find that $a=0, b=10, c=0, d=-1$. So we have calculated, entirely mechanically, that $r^4 = 10r^2-1$, which means that $r$ is a zero of the polynomial $$x^4-10x^2+1.$$

(I wrote this up in detail on my blog a few years back, and just happened to use $\sqrt 2 + \sqrt 3$ as an example.)

Yes, there is a “purely mechanical” approach. Given algebraic numbers $\alpha$ and $\beta$, and monic polynomials $p_1(x)$ and $p_2(x)$ with rational coefficients, of which $\alpha$ and $\beta$ are roots, respectively, we can produce monic polynomials $p_+(x)$ and $p_\times(x)$ with rational coefficients, of which $\alpha+\beta$ and $\alpha\beta$ are roots, respectively. Moreover, if $\alpha$ and $\beta$ are algebraic integers (that is, we can take $p_1,p_2$ to have integer coefficients), then $p_+,p_\times$ have integer coefficients, so they witness that $\alpha+\beta$ and $\alpha\beta$ are algebraic integers as well. The argument is classical, but I follow below the presentation in

MR1083765 (91i:11001). Niven, Ivan; Zuckerman, Herbert S.; Montgomery, Hugh L. An introduction to the theory of numbers. Fifth edition. John Wiley & Sons, Inc., New York, 1991. xiv+529 pp. ISBN: 0-471-62546-9.

The construction is based on the following lemma:

Lemma. Given $n\ge0$, and a complex number $\xi$, suppose that the complex numbers $\theta_1,\dots,\theta_n$ are not all zero, and satisfy the equations
$$ \xi\theta_j=a_{j,1}\theta_1+\dots+a_{j,n}\theta_n $$
for $j=1,2,\dots,n$. If the $n^2$ numbers $a_{j,k}$ are rational, then $\xi$ is algebraic. If they are integers, then $\xi$ is an algebraic integer.

One proves this by noticing that if $A$ is the matrix of the $a_{j,k}$ and $x$ is the vector of the $\theta_j$, then $Ax=\xi x$, so $\det(A-\xi I)=0$, and this is a monic polynomial with rational coefficients if the $a_{j,k}$ are rational, and integer coefficients if they are integers. In fact, we did better than stated in the lemma, since we obtained a witnessing polynomial rather than simply knowing the numbers are algebraic.

Using the lemma, one proceeds as follows: Suppose that $p_1$, the polynomial for $\alpha$, has degree $m$, and $p_2$, the polynomial for $\beta$, has degree $s$. Consider the numbers $n=ms$ numbers $\alpha^a\beta^b$ with $0\le a\le m-1$ and $0\le b\le s-1$, and call them $\theta_1,\dots,\theta_n$. Note that each $\alpha\theta_j$ is a linear combination of the $\theta_k$, using rational coefficients, and similarly for $\beta\theta_j$. To see this, note that either $\alpha\theta_j$ is another $\theta_i$, or else $\theta_j=\alpha^{m-1}\beta^b$ for some $b$, but then $$\alpha\theta_i=\alpha^m\beta^b=(\alpha^m-0)\beta^b=(\alpha^m-p(\alpha))\beta^b,$$ which is a combination of the $\alpha^i \beta^b$ for $0\le i<m$. The same argument applies to $\beta\theta_j$.

But then it follows that the lemma applies with both $\xi=\alpha+\beta$ and $\xi=\alpha\beta$. And this gives the result. In the case where $\alpha=\sqrt2$ and $\beta=\sqrt3$, this procedure is precisely what MJD sketched in his answer, and results in a polynomial of degree $4$ for $\sqrt2+\sqrt3$. The one thing that is not guaranteed is that in all cases the polynomial we obtain this way is minimal (that is, irreducible over the rationals) if $p_1$ and $p_2$ are minimal. It is in many cases that one finds in practice, though. See this and this MO questions for some details on when this is the case.

A ‘mechanical’ approach follows. Let $x=\sqrt{2}+\sqrt{3}$. Then $x^2=5+2\sqrt{6}$ which means $x^2-5=2\sqrt{6}$. Now $$(x^2-5)^2=24\Longrightarrow(x^2-5)^2-24=0.$$ By construction, one of the roots of $f(x)=(x^2-5)^2-24$ is $\sqrt{2}+\sqrt{3}$.

You can guess that the conjugates will be $\pm \sqrt 2 \pm \sqrt 3$, and multiply all the corresponding linear factors together.

$\rm \color{#c00}{x^2}\! = 5\!+\!2\sqrt{6} =: \color{#c00}\alpha\:\Rightarrow\: 0\, =\, (\color{#c00}{x^2\! -\! \alpha})(x^2\! -\!\alpha’)\, =\, x^4\!-(\alpha\!+\!\alpha’)\, x^2\! +\alpha\alpha’ =\, x^4\! – 10\, x^2 + 1$

As for algorithms, one could compute the characteristic polynomial of the linear map $\rm\:x \to (\sqrt{2}\!+\!\sqrt{3}) x\:$ on the vector space $\rm\:\Bbb Q\langle 1, \sqrt{2},\sqrt{3},\sqrt{6}\rangle.\:$ Or, one could use elimination methods, e.g. resultants: $ $ if $\rm\: f(x) = 0 = g(y) = 0\:$ then $\rm\:z = x+y\:$ is a root of any polynomial obtained by eliminating $\rm\:y\:$ from $\rm\:f(z\!-\!y)=0=g(y).\:$ A generic elimination method is by computing a resultant. A more efficient method is to employ the Grobner basis algorithm (which has the advantage of computing a minimal polynomial, via an ideal contraction).