[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

282.0. "Triangles w/ int. sides + area" by RAINBO::GRANT () Thu May 09 1985 20:26

All these puzzles and problems are about triangles with integral sides and 
integral areas, called "integral triangles" for short.

1. The areas of integral triangles are always even: why?
 
2. As a related problem, or as a warmup, try showing that all pythagorean 
triangles are integral triangles.

3. There are only 5 integral triangles whose sides add up to their area.
Find these, and as a bonus, show they are the only ones.

4. The larger integral triangles sometimes have areas that are integral 
multiples of the sums of their sides.  For any integer M there are a finite 
number K>1 of integer triangles whose area = perimeter * M.  I know of no 
way, short of enumeration, of evaluating f(M) = K.  Maybe someone can find one.
The first few terms:

      M      K
      1      5
      2      15
      3      33

I haven't proved yet that I have f(2) and f(3) right: I only have upper and 
lower bounds.  There may be triangles that satisfy the criteria where all 
the sides are > 100. (Although I doubt it) 

5. Sometimes different integral triangles have the same area.  What's the 
smallest area this is true for, and what are the two integral triangles that 
have this area?

6. As in the solution to #5, sometimes these equal area triangles have two 
sides out of three in common. Let's call these "linked equiareal triangles."
Even excluding multiples of smaller l.e.t's, there are an infinite number of 
these.  (I'm pretty sure, anyway: can anyone prove it?)  

7. In l.e.t,'s, one of the two lengths that doesn't match up is always the 
largest length of its triangle.  How come?

8. The most acute integral triangle I have found so far has sides of 3, 160, 
and 163.  I imagine that there are always integral triangles that are more 
acute, but I haven't investigated much. Are there? Is there a limit?

9. The most obtuse integral triangle is probably the same as the most acute 
one, right?

Some of these I have answers to, some not. As always, contributions are 
welcome from all.

-Jim Grant, Littleton MA.
       
T.RTitleUserPersonal
Name
DateLines
282.1RAINBO::GRANTThu May 09 1985 22:4710
Editorial corrections:

8. Sides of 160,163, and 3 do not make a triangle in my kind of universe.
I meant to say 160,162, and 3. Even that misses being an integral triangle by 
a few thousandths.  Anyway, in the meantime, I found an integral triangle 
with sides 3,865, and 866.  Very acute.  An area of 1224.

9. This question should have the semi-universal bulletin board smile figure
appended to it, like so:     :-)

282.2ALIEN::POSTPISCHILFri May 10 1985 13:1674
1)	Given:	Sides a, b, and c of a triangle, and its area, A, are all
		integers.

	Prove:	A is even.

	One formula for the area of a triangle is:

		A = sqrt( s * (s-a) * (s-b) * (s-c) ),

	where s = (a+b+c)/2.  Call the product inside the square root function
	P.  Since P = A*A, P is an integer.

	Lemma:	s is an integer.

		Suppose s be not an integer (this is proper English, see note
		68 in SUMMIT""::SYS$NOTES:JOYOFLEX).  Then s is in the form
		i0/2, where i0 is an odd integer (i0 = a+b+c).  Clearly, s-a,
		s-b, and s-c also have forms i1/2, i2/2, and i3/2, for some
		odd integers i1, i2, and i3.  So P = i0*i1*i2*i3/16.  But
		i0*i1*i2*i3 must be odd, so P is not an integer, which is a
		contradiction.  Therefore s is an integer.
	
	Lemma:	P is even.

		Suppose P be odd.  Then none of s, s-a, s-b, and s-c could
		be even integers.  Since they are all integers, they must all
		be odd.  If s is odd and s-a is odd, then a must be even.
		Similarly, b and c must be even.

		If they are all even, then a = 2i, b = 2j, and c = 2k, for some
		integers i, j, and k.  Expanding P reveals

			P = 2(i*i*j*j + j*j*k*k + k*k*i*i) - i**4 - j**4 - k**4.

		Consider the remainder when P is divided by 4 when i, j, and k
		take on even or odd values.  Because i, j, and k are symmetric
		in the above formula, it is only necessary to consider one case
		where they are all even, one case where one is odd, one case
		where two are odd, and so on.

			i j k | formula, shown as congruences mod 4 | P mod 4
			0 0 0 | 2(0+0+0)-0-0-0                      | 0
			0 0 1 | 2(0+0+0)-0-0-1                      | 3
			0 1 1 | 2(0+1+0)-0-1-1                      | 0
			1 1 1 | 2(1+1+1)-1-1-1                      | 3

		So P is congruent to either 0 or 3 modulo 4.  If it is
		congruent to 0, it is even, which contradicts the supposition
		that P is odd.  If it is congruent to 3, then A is not an
		integer, because there is no integer whose square is congruent
		to 3 modulo 4 (integers congruent to 0, 1, 2, and 3 have
		squares congruent to 0, 1, 0, and 1, modulo 4).  This is also
		a contradiction.

		Therefore the supposition that P is odd is false.

	Since P is an even integer and A is an integer, then A is also even
	(otherwise squaring A, an odd integer, would yield P, an even integer). 


2)	Is a Pythagorean triangle a right triangle with integral sides?  If
	so, one of the legs is necessarily even, so the area is obviously an
	integer.

	To see that one side is even, suppose they be both odd.  Let the length
	of the hypoteneuse be denoted by a and the lengths of the legs by b
	and c.  Then a*a = b*b + c*c.  Since b and c are odd, b*b and c*c are
	odd, and b*b + c*c is divisible by two but not by four.  Clearly,
	no integer has a square divisible by two but not by four.  But a is
	known to be an integer, so this is a contradiction.  Therefore b and
	c are not both odd.


				-- edp (WHOAREYOU note 329)
282.3TOOLS::STANSat May 25 1985 18:1126
Of course you all know the formula for generating the sides of
all Pythagorean triangles:

		k(2mn)
		k(m^2-n^2)
		k(m^2+n^2)

where gcd(m,n)=1, m>n.

For quite a while, I have been researching the question of whether
there is a formula that generates all Integral Triangles
(also known as Heronian Triangles in the literature).  Dickson
hedges the question in his monumental work, the History of the Theory
of Numbers.  I have found several purported formulas in the literature,
some of which are wrong.  I believe the following is a valid formula:

		kmn(p^2+q^2)
		kpq(m^2+n^2)
		k(mq+np)(mp-nq)

where gcd(m,n)=1 and gcd(p,q)=1, mp>nq,

although the published proof seemed wrong.
Note that letting p=q=1 yields the formula for Pythagorean triples.

I hope you find this formula useful.  Let me know if it misses any solutions.
282.4R2ME2::STANSun May 26 1985 15:411
See also note 70 for a, yet unsolved, problem about Heronian triangles.
282.5RAINBO::GRANTTue May 28 1985 18:538
The formula in .3 seems to miss some triangles.  (5,5,6) is Heronian, with an 
area of 12, and cannot be generated by the formula if k is required to be an 
integer.  It does come from the formula when m=p=2,  n=q=1,  and k = 1/2.

If this is a valid use of the formula, then what is the domain of k?  k=1/2 
does not always produce integral solutions.

-Jim
282.6TOOLS::STANTue May 28 1985 20:021
Oops, another candidate down the drain.
282.71-9JOBURG::BUCHANANMon Oct 30 1995 14:22181
        Let the sides be a,b & c, angles A,B & C. The area of a triangle is 
T = �absinC. Now, cosC= (a�+b�-c�)/2ab, so:

(*)        T = _/((a+b+c)(a+b-c)(a-b+c)(-a+b+c)) /4

        Any integral triangle must satisfy (*). Also, any solution to (*)
yields an integral triangle. For a,b,c must satisfy the triangle inequality,
or T will be imaginary. So the problem is entirely captured algebraically.

>1. The areas of integral triangles are always even: why?

        If a+b+c is odd, so are the other three multiplicands under the
sqrt sign, and hence T� is not an integer (let alone T.) Contradiction. So 
a+b+c is even, and similarly, the other three terms. So their product is a 
multiple of 16, and we can deduce that T� is an integer.

        Suppose then that one of {a,b,c} is odd. Wlog, c is odd. Then (a+b+c)
-(a+b-c) = 2c == 2 mod 4. So 4 divides one of (a+b+c) or (a+b-c). So 2 | T�.
So T is even.

        Otherwise, all of {a,b,c} are even. Let a = 2a', etc. Then

        T = _/((a'+b'+c')(a'+b'-c')(a'-b'+c')(-a'+b'+c'))

If a'+b'+c' is even, then so is T. Otherwise a'+b'+c' is odd, and computing
the rhs mod 4, have that T� == 3 mod 4. Contradiction.

>2. As a related problem, or as a warmup, try showing that all pythagorean 
>triangles are integral triangles.

        Pythagorean triangles are of the form:
                k2mn
                k(m�-n�)
                k(m�+n�)
        where m > n are coprime +ve integers, with m+n odd, and k is any
+ve integer. Pythagorean *triples* satisfy the above with the restriction
that k = 1. Plugging these values into (*) yields:

        T = k�mn(m�-n�)

which is certainly an integer.

>3. There are only 5 integral triangles whose sides add up to their area.
>Find these, and as a bonus, show they are the only ones.

        Most puzzles concerning integral triangles are of this form. Posit an
extra restriction on top of (*), and find the solutions. Here (*) becomes:

        16(a+b+c) = (a+b-c)(a-b+c)(-a+b+c)

        (p)    (-1 1 1)(a)
Let     (q) = �( 1-1 1)(b). By the above, p,q,r are all +ve integers. Then:
        (r)    ( 1 1-1)(c)

        4(p+q+r) = pqr
or:
         1     1     1    1
        --- + --- + --- = -
        p.q   p.r   q.r   4

One of the 3 summands on the lhs must be >= 12. So wlog p.q =< 12. And we know
that p.q >= 5, so there are just a few cases. We have a solution if r is an
integer, ie: if 4(p+q)/(pq-4) is an integer.

p.q   q    p    r    a    b    c    T
--------------------------------------
 5    5    1   24   29   25    6   60
 6    6    1   14   20   15    7   42
 6    3    2   10   13   12    5   30
 7    7    1   32/3 not integer
 8    8    1    9   17   10    9   36
 8    4    2    6   10    8    6   24
 9    9    1    8 (see above)
 9    3    3   24/5 not integer
10   10    1   44/6 not integer
10    5    2   28/6 not integer
11   11    1   48/7 not integer
12 => p.q = p.r = q.r = 12 => r = _/12, not integer.

        So there are only 5 solutions, listed above.

>4. The larger integral triangles sometimes have areas that are integral 
>multiples of the sums of their sides.  For any integer M there are a finite 
>number K>1 of integer triangles whose area = perimeter * M.  I know of no 
>way, short of enumeration, of evaluating f(M) = K.  Maybe someone can find one.
>The first few terms:
>
>      M      K
>      1      5
>      2      15
>      3      33
>
>I haven't proved yet that I have f(2) and f(3) right: I only have upper and 
>lower bounds.  There may be triangles that satisfy the criteria where all 
>the sides are > 100. (Although I doubt it) 

        The corresponding formula is:

         1     1     1     1
        --- + --- + --- = ---
        p.q   p.r   q.r   4M�

        As before, wlog, pq =< 12M�. There are a finite number of candidate
pairs (p,q) and if r = 4M�(p+q)/(pq-4M�) is an integer, then we have a solution.
I don't see any reason why there should be a neat formula for f(n), and I'm not
interested in checking the values of f(2) or f(3) given.

>5. Sometimes different integral triangles have the same area.  What's the 
>smallest area this is true for, and what are the two integral triangles that 
>have this area?

        Pluck out of the air: (5,5,6) & (5,5,8) have area 12.

        Is there a smaller triangle? Yes, but only one. T� = (p+q+r)pqr & 
T == 0 mod 6. (Easy to check possibilities for p,q & r mod 3 to see that 3|T.) 
So any smaller example has T=6. The only integral triangle for T=6 is the 
(3,4,5) right-angled one.

>6. As in the solution to #5, sometimes these equal area triangles have two 
>sides out of three in common. Let's call these "linked equiareal triangles."
>Even excluding multiples of smaller l.e.t's, there are an infinite number of 
>these.  (I'm pretty sure, anyway: can anyone prove it?)  

        Equation * can be re-written:

        c� = a�+b� �2_/(a�b� - 4T�).

        So for any a,b,T for which there is one value of c�, there will be
another value of c�. The product of the two will be (a�-b�)� + 16T�, so since
one is positive, so will be the other.

>7. In l.e.t,'s, one of the two lengths that doesn't match up is always the 
>largest length of its triangle.  How come?

        Examine:

        c� = a�+b� �2_/(a�b� - 4T�).

        When the sqrt is added a�+b�, the result will *always* be greater
than both a� & b�.

>8. The most acute integral triangle I have found so far has sides of 3, 160,
> [later changed to 162] and 163.  Later I found an integral triangle with 
> sides 3,865, and 866.  Very acute. An area of 1224. I imagine that there are 
> always integral triangles that are more acute, but I haven't investigated 
> much. Are there? Is there a limit?
[paraphrase of question.]

        I don't agree with (3,162,163), but (3,865,866) is OK.

        Try * for the triangle (3,k,k+1)

        T� = (2k+4).(k-1)
=>      T� = 2k�+2k-4
=>      2T� = l�-9
where l = 2k+1. Take this equation mod 3. 2 is not a square mod 3, so 3 divides
both T & l. Write T=3y, l=3x.
        x� - 2y� = 1.
which is Pell (who never lurks below the surface here.) The fundamental
solution is (0,1), and then we can derive all others by multiplying the (x,y)
vector by:
        (3 4)
        (2 3)
See 1756.3 for exactly this Pellian equation in action. x = 1,3,17,99,577...
yielding k = ?,4,25,148,865... So we pick up the case k=865, but there is
nothing remotely like the other example suggested by the poster. The cos of
the acutest angle here is 1 - 4/(k(k+1)) -> 1 as k -> %.

>9. The most obtuse integral triangle is probably the same as the most acute 
>one, right? :-)

        There is no "most acute triangle", we have established. 

        There is no "most obtuse triangle", either. Go for triangles of the
form (x,x,2x-2). If 2x-1 is a square (not the hardest thing to arrange.) then
T = (x-1)_/(2x-1). The cos of the obtuse angle = -1 + (8x-4)/(2x�) -> -1 as
x -> %. The acute angles have cos 1 - 1/x -> % as x -> %, but not as fast as
the case in 8.
    
Cheers,
Andy.
282.8I'll mail Stan with the formulaJOBURG::BUCHANANThu Nov 02 1995 04:25109
>.3 TOOLS::STAN
>For quite a while, I have been researching the question of whether
>there is a formula that generates all Integral Triangles (also known as 
>Heronian Triangles in the literature). [...] I believe the following 
>is a valid formula:
>
> [a=]		kmn(p^2+q^2)
> [b=]	        kpq(m^2+n^2)
> [c=]		k(mq+np)(mp-nq)
>
>where gcd(m,n)=1 and gcd(p,q)=1, mp>nq,
>although the published proof seemed wrong.
>I hope you find this formula useful.  Let me know if it misses any solutions.

>.5 RAINBO::GRANT
>The formula in .3 seems to miss some triangles.  (5,5,6) is Heronian, with an 
>area of 12, and cannot be generated by the formula if k is required to be an 
>integer.  It does come from the formula when m=p=2,  n=q=1,  and k = 1/2.
>
>If this is a valid use of the formula, then what is the domain of k?  k=1/2 
>does not always produce integral solutions.

>.6 TOOLS::STAN
>Oops, another candidate down the drain.

        The formula given is sufficient but not necessary. The problem was with 
the constant multiplier k.

        Rather than deal with the sides a,b & c, it's cleaner to work with the
terms from Hero's formula for the area of a triangle:
        w = �(a+b+c)
        x = w-a
        y = w-b
        z = w-c

        Then *any* four positive integers w,x,y,z which satisfy:
                (i) w = x+y+z
                (ii) wxyz is a square 
yield an integral triangle (a,b,c)

******************************************************************************
*
* FORMULA TO GENERATE THE HERONIAN TRIANGLES
*
******************************************************************************

        Now let m,n,p,q be +ve integers such that (m,n) = (p,q) = 1, and
mp > nq. Then set:
                w = Kmpr
                x = Kmqs
                y = Knps
                z = Knqr
where: 
                r = (mq+np)/(mq+np,mp-nq)
                s = (mp-nq)/(mq+np,mp-nq)
and:
                K = N/(mn,pq), N being any +ve integer we like.

Then I claim that 

        (1) given p,q,r,s,N then w,x,y,z are of the required form.
        (2) given w,x,y,z, then we can derive p,q,r,s,N.
        (3) given w,x,y,z, then the derived p,q,r,s,N are unique.
        
(1) w,x,y,z could only fail to be integers if (mn,pq) > 1. Wlog, (m,p) = C > 1.
C | mq+np, but C \ mp-nq. ("\" denotes "doesn't divide".) So C \ (mq+np,mp-nq).
So C | r. Thus C | mpr,mqs,nps,nqr, so w,x,y & z are all integers.
    w=x+y+z is easy to check.
    wxyz a square is easy to check.

(2) Given w,x,y,z of the required form, let N = (w,x,y,z), and w = NW, x = NX,
y = NY, z = NZ. Since W=X+Y+Z, no three of W,X,Y&Z share a factor. WXYZ is a
square.
        Define m & n by _/(WX/YZ) = m/n (s.t. (m,n) = 1)
        Similarly:      _/(WY/XZ) = p/q
        And:            _/(WZ/XY) = r/s
        K = N/(mn,pq)
        
        (m,n) = (p,q) = 1 by construction
        mp/nq = W/Z = X+Y+Z/Z > 1. So mp>nq.

Let:
        w' = Kmpr
        x' = Kmqs
        y' = Knps
        z' = Knqr

        Our task is now to show that w' = w, etc.
        w'/x' = Kmpr/Kmqs = pr/qs = _/(WY/XZ)*_/(WZ/XY) = W/X = w/x, &
similarly for other w'/y' etc. So w',x',y',z' = �w,�x,�y,�z.

        w=x+y+z
=>      w'=x'+y'+z'
=>      Kmpr = Kmqs + Knps + Knpr 
=>      s(mq+np) = r(mp-nq)
=>      r = (mq+np)/(mq+np,mp-nq)
        s = (mp-nq)/(mq+np,mp-nq)
as required. 

        It remains to show that no three of w'/N, x'/N, y'/N, z'/N share a
factor. For then we know that �=1.
        If three share a factor, then so do all four.
        (w'/N, z'/N) = (mpr/(mp,nq),nqr/(mp,nq))) = r
Similarly:
        (x'/N, y'/N) = s. But we know that (r,s) = 1. So �=1.

(3) The values of m&n are the only coprime numbers which allow WX/YZ to be in
the right proportion. Similarly p&q, r&s. And given these 6 values, only one
value of K will allow wxyz to be correct. So the solution is unique.