Prove this lemma the square root of a positive integer is ei
Prove this lemma: the square root of a positive integer is either an integer or irrational. (Hint: let n be a positive integer and suppose (x)^(1/2) is rational but not an integer. If x^(1/2) = p/q in lowest terms, show that q has at least one prime factor that does not divide p)
Solution
What about the case of general n? Well, of course n2 is not only rational but is an integer, namely n. Moreover, an arbitrary positive integer n can be factored to get one of these two limiting cases: namely, any n can be uniquely decomposed as
n = sN2 , where s is squarefree. (Prove it!) Since sN2 = N s, we have that n is rational iff s is rational; by the above result, this only occurs if s = 1. Thus: the square root of a positive integer is either an integer or irrational.
or
if n is square, then sqrt(x) is an
 integer and if n is nonsquare then n = p^2/q^2 gives
 xq^2 = p^2 and n nonsquare implies that some prime P in n
 will occur to an odd power. Yet if P is or is not in q,
 P will still occur to an odd power in xq^2. Yet P must occur
 to an even power in a^2. Therefore nb^2 does not
 equal p^2, a contradiction, so sqrt(x) is irrational.
 Conclusion: for every natural n, sqrt(x) is either an
 integer or is irrational.

