Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 5.3.16* (Triangles with integer sides and an angle of $60°$)
Exercise 5.3.16* (Triangles with integer sides and an angle of $60°$)
Find, in the spirit of Theorem5.5, all primitive triples of positive integers such that a triangle with sides has an angle of .
Answers
Proof. Consider a triangle with sides , where are positive integer, which has an angle of . Let is the length of the side intercepted by the angle with measure 60°. Then the law of cosines gives
Since , we obtain
Conversely, if satisfies (1), then , thus , where , so .
A triangle with sides has an angle of if and only if some permutation of satisfies (1). It remains to find all primitive solutions of the equation (1), that is
If satisfies (2), then cannot be both even , otherwise is even. This is impossible, because . So or is odd. By exchanging and if necessary, we can assume that is odd. So we search the solutions of (2) with odd (which gives the solutions and ).
We write the equation (1) in an equivalent form:
So we must find the solutions of
We show first that and are relatively prime. Suppose for the sake of contradiction that some prime divides these factors , so that
Then and . We know that , otherwise , but is odd by hypothesis. Therefore and . Moreover the equation (3) shows that
- If , then , thus , and is prime, so . Since , , so . Then . This is a contradiction, which proves that .
- Since , implies . By the unique factorization theorem, , and , thus where , so . Then . This is a contradiction.
Therefore , where . Note that and , otherwise and , which implies , thus , which is false. As in Problem 5, this shows that
where are suitable integers such that . In both cases, , where , thus . We examine these two cases.
- (i)
-
In the first case,
Then . Since is odd, and are odd (and relatively prime). We obtain
Since are odd, , and , thus and .
If we don’t like quotients, we write , where are integers. If we replace in the preceding equations, we obtain
(we can take so that ).
Conversely, if (5) is true, then
(Thanks to Sagemath!).
- (ii)
-
In the second case,
Then
With , this gives
Conversely, if (7) is true, then
In conclusion, if are positive integers such that , then
(To avoid redundancy, we can take only the pairs such that ).
In another form,
To list the solutions, we only keep the triplets such that .
(We can take only the pairs such that ). □
Note: Apart the obvious symmetry which maps solutions on solutions, there is another symmetry, given by (if ). Indeed
We can explain this symmetry geometrically: if we complete a triangle with integer sides (where ) in an equilateral triangle, we obtain a second triangle with sides with an angle of 60° (You can do a figure with the solution and the solution ).
The solutions of the second case are given by this symmetry: if
is a solution of the first case such that , then
is a solution for the second case.
Note: verification of these results with Python (on jupyter-lab)
from math import gcd, sqrt def is_square(n): r = round(sqrt(n)) if r * r == n: return True else: return False l = [] for x in range(1,100): for y in range(1, 100): u = x ** 2 + y ** 2 - x * y if is_square(u): z = round(sqrt(u)) if gcd(gcd(x,y), z) == 1 and y % 2 == 1: l.append((x,y,z)) print(l) [(1, 1, 1), (5, 21, 19), (7, 15, 13), (8, 3, 7), (8, 5, 7), (8, 15, 13), ... l2 = [] for u in range(17): for v in range(18): for epsilon in [1,-1]: if u % 2 == 1 and v % 2 == 1 and gcd(u,v) == 1: x, y, z = (2 * u * v + epsilon * (- 3 * u ** 2 + v ** 2)) // 4, u * v, (3 * u ** 2 + v ** 2) // 4 if gcd(gcd(x,y), z) == 1 and x>0 and y>0: l2.append((x,y,z)) print(l2) [(1, 1, 1), (8, 5, 7), (15, 7, 13), (35, 11, 31), (48, 13, 43), (80, 17, 73),...
We obtain the same solutions (but not in the same order). We have verified similarly (5) and (7).