How do I calculate the minimal polynomial of $a+ \mathcal{i} b$ where $a,b \in \mathcal{R}$ in Mathematica. In Mathematica, if I give specific values of a and b, then it gives the solution, for example:
In[1]:= MinimalPolynomial[3 + Sqrt[-1] 2, x]
Out[1]= 13 - 6 x + x^2,
But if I take a and b as arbitrary, then
In[280]:= MinimalPolynomial[a + Sqrt[-1] b, x]
During evaluation of In[280]:= MinimalPolynomial::nalg: a+I b is not an explicit algebraic number. >>
Out[280]= MinimalPolynomial[a + I b, x] .
Kindly help me out.
When you look for the minimal polynomial of a complex number $z$, you mean find the polynomial that generates the ideal $I(z) = \{ p \in \mathbb{Q}[X] \mid p(z) = 0 \} $, but the thing is: for the vast majority of $z$, $I(z) = \{0\}$.
The numbers that verify $I(z) = \{0\}$ are transcendental numbers and don't have minimal polynomials. The field of numbers that verify $I(z) \neq \{0\}$ is called the field of algebraic numbers and is denoted $\overline{\mathbb{Q}}$. If you ask Mathematica to compute this polynomial for a given $a + ib$, it won't manage to do so because it simply can't.
Mathematicians even have a hard time describing algebraic numbers that have a minimal polynomial of degree $\geq 5$ (check Galois' theory) so if you don't give an explicit expression of your numbers with n-th roots $+$ or $\times$, Mathematica will not manage to find the adequate polynomial.
Plus proving a number is transcendental is super hard, so this is only natural that mathematica only accepts specific entries. You'll also notice that the degree of the minimal polynomial variates, hence you won't get a closed formula.
EDIT: If you change your $a$ and $b$ to be rational, you will find what you are looking for