TRIANGLES WITH TWO INTEGRAL SIDESSZ. TENGELY

Abstract. We study some Diophantine problems related to triangles withtwo given integral sides. We solve two problems posed by Zoltán Bertalan and
we also provide some generalization.

1. introduction
There are many Diophantine problems arising from studying certain propertiesof triangles. Most people know the theorem on the lengths of sides of right angled
triangles named after Pythagoras. That is a2 + b2 = c2 .
An integer n ≥ 1 is called congruent if it is the area of a right triangle withrational sides. Using tools from modern arithmetic theory of elliptic curves andmodular forms Tunnell [10] found necessary condition for n to be a congruent number. Suppose that n is a squarefree positive integer which is a congruent number.
(a) If n is odd, then the number of integer triples (x, y, z) satisfying the equationn = 2x2 + y 2 + 8z 2 is just twice the number of integer triples (x, y, z)satisfying n = 2x2 + y 2 + 32z 2 .
(b) If n is even, then the number of integer triples (x, y, z) satisfying the equation n2 = 4x2 + y 2 + 8z 2 is just twice the number of integer triples (x, y, z)satisfying n2 = 4x2 + y 2 + 32z 2 .
A Heronian triangle is a triangle having the property that the lengths of its sides
and its area are positive integers. There are several open problems concerning theexistence of Heronian triangles with certain properties. It is not known whether
there exist Heronian triangles having the property that the lengths of all their
medians are positive integers [6], and it is not known whether there exist Heronian triangles having the property that the lengths of all their sides are Fibonacci
numbers [7]. Gaál, Járási and Luca [5] proved that there are only finitely many
Heronian triangles whose sides a, b, c ∈ S and are reduced, that is gcd(a, b, c) = 1,
where S denotes the set of integers divisible only by some fixed primes.
Petulante and Kaja [9] gave arguments for parametrizing all integer-sided triangles that contain a specified angle with rational cosine. It is equivalent to determining a rational parametrization of the conic u2 − 2αuv + v 2 = 1, where α is therational cosine.
The present paper is motivated by the following two problems due to ZoltánBertalan.
(i) How to choose x and y such that the distances of the clock hands at 2o’clock and 3 o’clock are integers?
(ii) How to choose x and y such that the distances of the clock hands at 2o’clock and 4 o’clock are integers?
We generalize and reformulate the above questions as follows. For given 0 <α, β < π we are looking for pairs of triangles in which the length of the sides
2000 Mathematics Subject Classification. Primary 11D61; Secondary 11Y50.
Key words and phrases. Diophantine equations, Elliptic curves.
Research supported in part by the Magyary Zoltán Higher Educational Public Foundation.
12SZ. TENGELY(zα , zβ ) opposite the angles α, β are from some given number field Q(θ) and thelength of the other two sides (x, y) are rational integers. Let ϕ1 = cos(α) and
ϕ2 = cos(β).

By means of the law of cosine we obtain the following systems of equations
x2 − 2ϕ1 xy + y 2 = zα2 ,x2 − 2ϕ2 xy + y 2 = zβ2 ,After multiplying these equations and dividing by y 4 we get
Cα,β : X 4 − 2(ϕ1 + ϕ2 )X 3 + (4ϕ1 ϕ2 + 2)X 2 − 2(ϕ1 + ϕ2 )X + 1 = Y 2 ,where X = x/y and Y = zα zβ /y 2 . Suppose ϕ1 , ϕ2 ∈ Q(θ) for some algebraic
number θ. Clearly, the hyperelliptic curve Cα,β has a rational point (X, Y ) = (0, 1),
so it is isomorphic to an elliptic curve Eα,β . The rational points of an elliptic curve
form a finitely generated group. We are looking for points on Eα,β for which the firstcoordinate of its preimage is rational. If Eα,β is defined over Q and the rank is 0,
then there are only finitely many solutions, if the rank is greater than 0, then there
are infinitely many solutions. If the elliptic curve Eα,β is defined over some number
field of degree at least two, then one can apply the so-called elliptic Chabauty
method (see [2, 3] and the references given there) to determine all solutions withthe required property.
2. curves defined over Q
2.1. (α, β) = (π/3, π/2). The system of equations in this case is
2x2 − xy + y 2 = zπ/3,2x2 + y 2 = zπ/2.

The related hyperelliptic curve is Cπ/3,π/2 .
Theorem 1. There are infinitely many rational points on Cπ/3,π/2 .
Proof. In this case the free rank is 1, as it is given in Cremona’s table of elliptic
curves [4] (curve 192A1). Therefore there are infinitely many rational points onCπ/3,π/2 .
¤Corollary. Problem (i) has infinitely many solutions.
Few solutions are given in the following table.
x8176810130640
498993199440

y1524158109409
136318711969

zπ/3zπ/2
13172993
36379286489
12976609
517278459169 579309170089

TRIANGLES WITH TWO INTEGRAL SIDES

32.2. (α, β) = (π/2, 2π/3). The system of equations in this case is
2x2 + y 2 = zπ/2,2x2 + xy + y 2 = z2π/3.

The hyperelliptic curve Cπ/2,2π/3 is isomorphic to Cπ/3,π/2 , therefore there are infinitely many rational points on Cπ/2,2π/3 .
2.3. (α, β) = (π/3, 2π/3). We have2,x2 − xy + y 2 = zπ/3
2x2 + xy + y 2 = z2π/3.

After multiplying these equations we getx4 + x2 y 2 + y 4 = (zπ/3 z2π/3 )2 .

(1)

Theorem 2. If (x, y) is a solution of (1) such that gcd(x, y) = 1, then xy = 0.
Proof. See [8] at page 19.

¤Corollary. Problem (ii) has no solution.
In the following sections we use the so-called elliptic Chabauty’s method (see[2], [3]) to determine all points on the curves Cα,β for which X is rational. Thealgorithm is implemented by N. Bruin in MAGMA [1], so here we indicate themain steps only, the actual computations can be carried out by MAGMA. The
MAGMA code clock.m which were used is given below. It requires three inputs,a, b as members of some number fields and p a prime number.
√3. curves defined over Q( 2)3.1. (α, β) = (π/4, π/2). The hyperelliptic curve Cπ/4,π/2 is isomorphic toEπ/4,π/2 : v 2 = u3 − u2 − 3u − 1.
√√
The rank of Eπ/4,π/2 over Q( 2) is 1, which is less than the degree of Q( 2).
Applying elliptic Chabauty (the procedure ”Chabauty” of MAGMA) with p = 7,we obtain that (X, Y ) = (0, ±1) are the only affine points on Cπ/4,π/2 with rational
first coordinates. Since X = x/y we get that there does not exist appropriate
triangles in this case.
3.2. (α, β) = (π/4, π/3). The hyperelliptic curve Cπ/4,π/3 is isomorphic to√√Eπ/4,π/3 : v 2 = u3 + ( 2 − 1)u2 − 2u − 2.
√The rank of Eπ/4,π/2 over Q( 2) is 1 and applying elliptic Chabauty’s method again
with p = 7, we obtain that (X, Y ) = (0, ±1) are the only affine points on Cπ/4,π/3
with rational first coordinates. As in the previous case we obtain that there does
not exist triangles satisfying the appropriate conditions.
√√
4. curves defined over Q( 3) and Q( 5)In the following tables we summarize some details of the computations, that isthe pair (α, β), the equations of the elliptic curves Eα,β , the rank √of the Mordell√
Weil group of these curves over the appropriate number field (Q( 3) or Q( 5)),the rational first coordinates of the affine points and the primes we used.

4SZ. TENGELY

Algorithm 1 MAGMA code clock.m
clock:=function(a,b,p)P1:=ProjectiveSpace(Rationals(),1);
K1:=Parent(a);K2:=Parent(b);if IsIntegral(a) then
K1:=RationalField();
end if ;if IsIntegral(b) then
K2:=RationalField();
end if ;if Degree(K1)*Degree(K2) eq 1 then
K:=RationalField();elseif Degree(K1) gt 1 and Degree(K2) gt 1 then
K:=CompositeFields(K1,K2)[1];else
if Degree(K1) eq 1 then
K:=K2;else
K:=K1;
end if ;end if ;end if ;P<X>:=PolynomialRing(K);ka:=K!a;kb:=K!b;
C:=HyperellipticCurve(X 4 − 2 ∗ (ka + kb) ∗ X 3 + (4 ∗ ka ∗ kb + 2) ∗ X 2 − 2 ∗(ka + kb) ∗ X + 1);
pt:=C![0,1];
E,CtoE:=EllipticCurve(C,pt);
Em,EtoEm:=MinimalModel(E);umap:=map<C->P1|[C.1,C.3]>;
U:=Expand(Inverse(CtoE*EtoEm)*umap);
RB:=RankBound(Em);print Em,RB;
if RB ne 0 thensuccess,G,mwmap:=PseudoMordellWeilGroup(Em);
NC,VC,RC,CC:=Chabauty(mwmap,U,p);print success,NC,#VC,RC;
if NC eq #VC thenprint {EvaluateByPowerSeries(U,mwmap(gp)): gp in VC};
print forall{pr: pr in PrimeDivisors(RC)|IsPSaturated(mwmap,pr)};end if ;else
success,G,mwmap:=PseudoMordellWeilGroup(Em);print #G,#TorsionSubgroup(Em);print {EvaluateByPowerSeries(U,mwmap(gp)): gp in G};
end if ;return K,C;
end function;

TRIANGLES WITH TWO INTEGRAL SIDES

5(α, β)Eα,βRankX
p2(π/6, π/2) v 2 = u3 − u√
− 2u1{0,±1}5√2(π/6, π/3) v 2 = u3 + ( 3 − 1)u√− u + (− 3 +√1)1{0}7(π/5, π/2) v 2 = u3 − u2 +√1/2( 5 − 7)u + 1/2(5−3)
1{0}13√(π/5, π/3) v 2 = u3 + 1/2( 5 − 1)u2 + 1/2( 5 − 5)u − 1
1{0, 1} 13(π/5, 2π/5) v 2 = u3 − 2u − 1√1{0}7√(π/5, 4π/5) v 2 = u3 + 1/2(− 5 + 1)u2 − 4u + (2 5 − 2)0{0}In case of (α, β) = (π/5, π/3) we get the following family of triangles given by thelength of the sidesÃ√ !
−1 + 5(x, y, zα ) = t, t,t and (x, y, zβ ) = (t, t, t),2where t ∈ N.
References[1] W. Bosma, J. Cannon, and C. Playoust. The Magma algebra system. I. The user language. J.
Symbolic Comput., 24(3-4):235–265, 1997. Computational algebra and number theory (London, 1993).
[2] N. R. Bruin. Chabauty methods and covering techniques applied to generalized Fermat equations, volume 133 of CWI Tract. Stichting Mathematisch Centrum Centrum voor Wiskunde
en Informatica, Amsterdam, 2002. Dissertation, University of Leiden, Leiden, 1999.
[3] Nils Bruin. Chabauty methods using elliptic curves. J. Reine Angew. Math., 562:27–49, 2003.
[4] J. E. Cremona. Algorithms for modular elliptic curves. Cambridge University Press, New
York, NY, USA, 1992.
[5] I. Gaál, I. Járási, and F. Luca. A remark on prime divisors of lengths of sides of Herontriangles. Experiment. Math., 12(3):303–310, 2003.
[6] Richard K. Guy. Unsolved problems in number theory. Problem Books in Mathematics.
Springer-Verlag, New York, second edition, 1994. Unsolved Problems in Intuitive Mathematics, I.
[7] H. Harborth, A. Kemnitz, and N. Robbins. Non-existence of Fibonacci triangles. Congr.
Numer., 114:29–31, 1996. Twenty-fifth Manitoba Conference on Combinatorial Mathematicsand Computing (Winnipeg, MB, 1995).
[8] L. J. Mordell. Diophantine equations. Pure and Applied Mathematics, Vol. 30. AcademicPress, London, 1969.
[9] N. Petulante and I. Kaja. How to generate all integral triangles containing a given angle. Int.
J. Math. Math. Sci., 24(8):569–572, 2000.
[10] J. B. Tunnell. A classical Diophantine problem and modular forms of weight 3/2. Invent.
Math., 72(2):323–334, 1983.
Mathematical Institute
University of Debrecen
P.O.Box 124010 Debrecen
Hungary
E-mail address: tengely@math.klte.hu