Algorithm for eliminating irrationality in denominator Good day.
Suppose $a$ is rational number, $p$ is positive integer and $a^{1/p}$ is irrational. If we want to eliminate irrationality in the denominator of the fraction $\frac{1}{a^{1/p}}$, then there is obvious solution  $\frac{a^{1-1/p}}{a}$.
Some situations like $\frac{1}{a^{1/n} - b^{1/n}}$ are also nice. But what if we have a more general situation - $\frac{1}{a_1^{\frac{1}{p_1}} + ... +a_n^{\frac{1}{p_n}}}$? I think that it's always possible to eliminate irrationality but i don't have an idea yet how to prove it and how to implement it algorithmically.
Any ideas will be highly appreciated. Thanks in advance.
 A: This is always possible; Let $P$ be the minimal polynomial over $\mathbb{Q}$  of the element $\alpha=a_1^{\frac{1}{p_1}}+\cdots+a_n^{\frac{1}{p_n}}$ the coefficient of $P$ are all rationals,in particular the product $p$ of its roots $\alpha_1=\alpha,\alpha_2,\cdots,\alpha_n$ is rational so :
$$\frac{1}{\alpha}=\frac{\alpha_2\cdots\alpha_n}{p}$$
and this is equivalent to eliminating the irrationality in denominator.
Examples 


*

*why we  multiply by $2-\sqrt3$ to eliminate $2+\sqrt3$? because the minimal polynomial of $2+\sqrt3$ is:
$$P(x)=x^2-4x+1=(x-2+\sqrt3)(x-2-\sqrt3) $$

*The minimal polynomial of $3^{1/3}+1$ is :
$$P(x)=x^3-3x^2+x-4=(x-1-\sqrt[3]3)(x-1-j\sqrt[3]3)(x-1-j^2\sqrt[3]3)$$
with $j$ the $3$th complex root of the unity, this method involves complex number but after simplification thy will disapear:
$$\frac{1}{1+\sqrt[3]3}=\frac{(1+j\sqrt[3]3)(1+j^2\sqrt[3]3)}{4}= \frac{1-\sqrt[3]3+\sqrt[3]9}{4}$$

*The minimal polynomial of $\sqrt[p]{a_1}$ is $x^p-a$ and the roots are $\alpha_i=w_p^i.\sqrt[p]{a}$ with $w_p$ is the $p$th primitive root of the unity and using the same method $\alpha_2\cdots\alpha_p=\sqrt[p]{a^{p-1}}$ which explains your "obvious" example.

