wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> non-similar triangles
(Message started by: Christine on May 24th, 2013, 10:23am)

Title: non-similar triangles
Post by Christine on May 24th, 2013, 10:23am
The triangle (5,7, 8) has one of its angle measuring 60 degrees.
Law of cosines:
5^2 + 8^2 - (2 * 5 * 8)cos(60) = 49 = 7^2
The triangle has 60 degrees angle between the sides of length 5 and 8.

How many non-similar triangles w/ integer sides and an angle of 60 degrees are there?

// turned off smileys so 8) shows as intended --towr

Title: Re: non-similar triangles
Post by towr on May 24th, 2013, 12:27pm
So, basically how many solutions can we find to a2+b2 -ab = c2, where a,b,c are coprime.

[hide]I'll assume there are solutions of the form:
a = r m2 + s mn + t n2
b = u m2 + v mn + w n2
c = x m2 + y mn + z n2

Which gives us
(r m2 + s mn + t n2)2 +(u m2 + v mn + w n2)2 - ((r m2 + s mn + t n2)*(u m2 + v mn + w n2)) - ( x m2 + y mn + z n2)2 = 0

From which we get the system:
2 r s - r v - s u+2 u v-2 x y = 0
2 s t - s w - t v+2 v w-2 y z = 0
2 r t - r w + s2- s v- t u+2 u w+ v2-2 x z- y2 = 0
r2 - r u + u2 - x2 = 0
t2 - t w + w2 - z2 = 0

Some searching gives us lots of possible solutions, among which
a = m2 + 2 mn
b = 2 mn + n2
c = m2 + mn + n2
So for distinct m,n we get an infinite number of integer triangles with a 60 degree angle.
And I think if m and n are coprime a, b and c are also; but I'll leave that for another time/person to check.
[/hide]

Title: Re: non-similar triangles
Post by towr on May 24th, 2013, 12:39pm
Hmm, well, the last bits not true unfortunately, so there remains some work to be done.
[hide]Maybe just take m,n prime?[/hide]

[edit][hide]That also fails (e.g 5,11 -> 135,231,201 which are divisible by 3) [/hide][/edit]

[edit2][hide]n=m+1 seems to work[/hide][/edit2]

Title: Re: non-similar triangles
Post by towr on May 24th, 2013, 1:53pm
Is it in general the case that if there is some integer triangle with an angle A, that there are infinitely many non-similar integer triangles with an angle A?

Title: Re: non-similar triangles
Post by Grimbal on May 24th, 2013, 3:12pm
I computed the solutions up to 1000 and found some regularity that leads to....

Consider the 1/2 equilateral triangle with sides (d, 2d, sqrt(3)d).  It has a 60 degree angle between d and 2d.  It is a right triangle.

To complete the triangle and get integer sides, let's find a 2nd right triangle with sides (sqrt(3)d, e, f) with f the hypothenuse.

We want
  3d2 + e2 = f2
That is easy when d is odd.  We can choose
  e+1 = f
and we need
  (e+1)2 - e2 = 3d2
  <=> 2e+1 = 3d2
  <=> e = (3d2-1)/2
When we put together the triangles, we get a triangle with sides:
  a = 2d, b = d+e, c = f
Since d must be odd, let's write d = 2k+1.  We can express a, b, c in terms of k:
  a = 4k + 2
  b = 6k2 + 8k + 2
  c = 6k2 + 6k + 2
Since all are even, we can divide them by 2
  a' = 2k + 1
  b' = 3k2 + 4k + 1
  c' = 3k2 + 3k + 1

You can verify these satisfy a'2 - a'b' + b'2 = c'2  (or ab - a2 = b'2 - c'2)
And a',b',c' are co-prime because a'-2b'+2c' = 1

So there are an infinity of solutions

Title: Re: non-similar triangles
Post by Christine on May 24th, 2013, 7:11pm
towr,

Thanks for turning off the smileys. I tried but no success.

How did you do it? Just in case it happens again in the future

Title: Re: non-similar triangles
Post by towr on May 25th, 2013, 12:04am
When you make a post or edit, there are two checkboxes under the textarea, notify of replies and disable smilies. So you need to check the second one.
Another option is to always put a space after an 8 and before the ), because then it doesn't form that smiley.

Title: Re: non-similar triangles
Post by Grimbal on May 25th, 2013, 2:23am
I searched by computed for solutions to
  a2 + b2 - 2ab cos(alpha) = c2
for small rational values of cos(alpha).  There seems to always be plenty of solutions.  Even for values >1 or <-1.

Title: Re: non-similar triangles
Post by Christine on May 25th, 2013, 9:33am
c^2 = a^2 + b^2 - a*b

the 60 degrees angle is between a and b.
the sides a and b are integers

if b = 1
c^2 = a^2 + 1 - a
<=> (2c + 2a - 1)(2c - 2a + 1) = 3
Let x and y be two rational numbers such that x*y = 3
suppose
(2c + 2a - 1) = x
(2c - 2a + 1) = y
then
c = (x^2 + 3)/4x  and a = (x-1)(x+3)/4x

therefore, triangles with sides
a = (x-1)(x+3), b = 4x and c = (x^2 + 3)
where x >= 2
will have integer sides and a 60 degrees angle

Can you show that these triangles will be similar for x=2 or x=5

Title: Re: non-similar triangles
Post by Grimbal on May 25th, 2013, 11:00am

on 05/24/13 at 13:53:25, towr wrote:
Is it in general the case that if there is some integer triangle with an angle A, that there are infinitely many non-similar integer triangles with an angle A?

You get a right triangle with cos(alpha)=p/q by just taking p as a side and q as the hypothenuse.  The third side is sqrt(q2-p2).
So you can do the same construction as I did above with the half of an equilateral triangle.  You get:
   a = 2nq
   b = n2(q2-p2) + 2np - 1
   c = n2(q2-p2) + 1

You can verify that (a2+b2-c2)/(2ab) = p/q

And the triangles are dissimilar because b/a increases with n.

Title: Re: non-similar triangles
Post by towr on May 25th, 2013, 1:38pm
Neat.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board