Is it possible to prove $a^2\mid x $ and $b^2\mid x$ implies $ab\mid x$ without using canonical prime decomposition?

Let $\rm\ r = X/(AB).\,$ Then $\rm \,r^2 = \overbrace{(X/A^2)}^{\large \in\,\Bbb Z}\overbrace{(X/B^2)}^{\large \in\,\Bbb Z} =: n\in \Bbb Z\ $ so $\ r\in\Bbb Z\ $ by

Theorem $\ \ \ \rm r = \sqrt{n}\;\;$ is integral if rational, $ $ for $\:\rm n\in\mathbb{N}$

Proof $\ \ $ Writing $\rm\,\ r = a/b,\ \ \gcd(a,b) = 1\ \Rightarrow\ ad\!-\!bc \,=\, \color{#C00}{\bf 1}\;$ for some $\:\rm c,d \in \mathbb{Z}\ $ by Bezout.

$\rm\color{#C00}{That\,}$ and $\rm\: r^2\! = \color{#0a0}{ n}\:\Rightarrow\ 0 \,=\, (a\!-\!br)\, (c\!+\!dr) \, =\, ac\!-\!bd\color{#0a0}{ n} \:+\: \color{#c00}{\bf 1}\cdot r,\ $ so $\rm\ r = bdn\!-\!ac \in \mathbb{Z}$


Remark $ $ There are many ways to prove this Theorem going back to the ancient proofs of irrationality of $\,\sqrt 2.\,$ See this thread for many proofs. One can also use the Rational Root Test and variants, or descent on denominators, or principality of denominator ideals, e.g. here or here. There are over a handful of variants in my older posts on related topics.


Sure it's possible. Let $r$ be a rational number, and $r^2=n$ an integer. Then, $r$ must be an integer, too: if we assume $k<r<k+1$ for an integer $k$, and $m$ is the smallest positive integer so that $mr$ is integer, let's consider $m'=m(r-k)$: it's an integer $<m$, and $m'r=mn-k\cdot mr$ is integer, contradicting the minimality of $m$. So if the square root of an integer is rational, it must be integer. Now if $a^2|x$ and $b^2|x$, $$\frac{x}{a^2}\cdot\frac{x}{b^2}=\left(\frac{x}{ab}\right)^2$$ is an integer, so the rational number $\frac{x}{ab}$ must be an integer as well.