Square and cubic roots in $\mathbb Q(\sqrt n)$

The way of Quiaochu Yuan's comment is technical and hard. In elementary way you have with two arbitrary rational $r,s$ form the values given by $a+b\sqrt n=(r+s\sqrt n)^m=A+B\sqrt n$ where $$B=\binom m 1r^{m-1}s+\binom m3r^{m-3}s^3n+\binom m5r^{m-5}s^5n^2+...... $$ and $$A=\text{the other terms}$$ This way you have for each couple of $r,s$ an $A+B\sqrt n$ satisfying the question.

With technical way, you'll have always this implicit condition for some couple of rationals : for each suitable $a+b\sqrt n$ there are two rational $r,s$ fulfilling the elementary condition given here.


As suggested by @franz lemmermeyer, a theoretical approach would certainly consist in an adequate global-local principle (i.e. CFT in fine), but there could be technical difficulties when ramification comes into play. Take a general number field $K$, but to avoid petty trouble, assume that the given integer $m$ is odd. The global-local principle for $m$-th powers consists in studying the kernel of the natural map from the global group $ K^* / (K^*)^m$ to the direct sum of all the local groups $K_v^{*} / (K_v^{*})^m $. Given a finite set $S$ of primes of $K$, an element of $K^*$ which is not divisible by any prime $\mathcal L_{v}$ outside $S$ will be called an $S$-unit. The following global-local principle is valid : "an $S$-unit $\alpha$ of $K$ is a global $m$-th power iff for any $\mathcal L_v$ outside $S$, $\alpha$ is an $m$-th power in the local field $K_v$" (Artin-Tate, chap. IX, thm. 1). The finite set $S$ is meant to give us a certain « room » adapted to the problem under study. Here we’ll choose $S$ such that it contains all the infinite primes, all the primes dividing the given $m$ and the given $\alpha$ in $ K^*$,as well as all the primes dividing disc($K$). To decide if $\alpha$ is a global $m$-th power, we have only to look at its natural image in $K_v^* / (K_v^*)^m$ for any $\mathcal L_v$ outside $S$ . Using the Chinese remainder theorem, we can suppose that $m = p^r$ for some rational prime $p$. Let $l$ be the rational prime under such an $\mathcal L_v$ . By our choice of $S$, $l \neq p$, $K_v$ is an unramified extension of $\mathbf Q_l$, and $\alpha \in U_v$, the group of units of $K_v$. Let $\kappa_v$ be the residual field of $K_v$, a finite field of degree over $\mathbf F_l$ equal to the inertia index, equal here to the local degree $[K_v : \mathbf Q_l]$. It is classically known that $U_v$ is the direct product of a group $\cong(\kappa_{v})^*$ (via Hensel’s lemma) and of the group of principal units $U_1 = 1 + \mathcal L_v$ . Since $l \neq p$, raising to a $p$-primary power is an automorphism of $U_1$, hence in the end $ U_v / (U_v)^{p^r} \cong \kappa_v^* / (\kappa_v^*)^{p^r}$.

Let us now switch to the case at hand, where $K$ is a quadratic field. We have only to consider two cases : either $l$ is inert in $K$, or $l$ is split. In the first case, $\kappa_l^*$ is cyclic of order $l^2 – 1$ ; in the second, $\kappa_v$ cyclic of order $l – 1$ for any of the two $v$’s above $l$. Define $W_r (l)$ to be the quotient $\kappa_l^*$ mod $p^r$ or the product of the two quotients $\kappa_v^*$ mod $p^r$ . We know explicitly $W_r (l)$ (without feeling like writing it down !), and the conclusion is : let $\alpha \in K^* $; choose $S$ as above ; then $\alpha$ is a $p^r$-th power in $K^*$ iff for any $l$ outside $S$, the natural image of $\alpha$ in $W_r(l)$ is trivial.


Let me come back to your question for more practical purposes. In my former theoretical approach (I keep all my previous notations), I gave a necessary and sufficient condition for an element $\alpha\in K^*$ to be a global $m$-th power, but in practice this criterion works well only to give a negative answer, i.e. to show that $\alpha$ is not an $m$-th power, because in that case, one needs only a finite number of trials and errows to find a prime $\mathcal L_v$ outside $S$ such that $\alpha$ is not a local $m$-th power in $K_v^{*}$. But a positive answer would require an infinity of checks, which is not very satisfying in practice.

A « finite » criterion for a « positive » answer when $m$ = an odd prime $p$ (because we want to avoid some « silly special cases », @franz lemmemermer dixit) can be derived from an « interesting » (Tate’s own words) local-global principle in chapter 7 of Cassels-Fröhlich’s book (p. 184, remark 9.3). A particular case is the following : let $E$ be a number field containing the group $\mu_p$ of $p$-th roots of unity ; pick an $\alpha \in E$ and let $S$ be a finite set of primes of $E$ containing (i) all archimedean primes (ii) all primes dividing $p$ and $\alpha$ (iii) all representatives of a system of generators for the ideal class group of $E$. Then any $S$-unit of $E$ which is a local $p$-th power at all primes inside $S$ is a global $p$-th power. In our initial problem, $\alpha$ is in $K$ which does not necessarily contain $\mu_p$. Put $E = K(\mu_p)$ , $G = Gal(E/K)$, and try to relate $(K^*)^p$ and $(E^*)^p$. Taking $G$-cohomology of the exact sequence 1 --> $\mu_p$--> $E^*$--> $(E^*)^p$ -->1 , we get 1 -->$\mu_p^{G}$--> $K^*$ -->$ K^*\cap (E^*)^p$-->$H^1(G, \mu_p)$ ... If $K$ does not contain $\mu_p$, $G$ has order prime to $p$ and $H^1(G, \mu_p)$ is trivial. In any case we get $(K^*)^p \cong K^*\cap (E^*)^p$. Summarizing, Tate’s remark gives us a finite criterion for a positive answer (in the above sense) when $m = p$.

We may suspect that with the general local-global principle, we are going too far beyond the simple case of a quadratic field, for which the solution should be much less elaborate. In the case of $\mathbf Q$, the solution is immediate because of the factoriality of $\mathbf Z$, so the natural idea is to replace factoriality by the uniqueness of decomposition into prime ideals in a Dedekind domain. A necessary condition, as suggested by @Qiaochu Yuan, is obtained by taking norms down to $\mathbf Q$. But for a sufficient condition, it seems that we are definitely blocked by by the units of norm 1 in the totally real case. This is rather irritating.