All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Integer Side Lengths (Posted on 2009-03-05)
The side lengths of a triangle are consecutive integers.
The largest interior angle is twice the smallest.

What are the side lengths of the triangle?

 See The Solution Submitted by Bractals Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solution | Comment 2 of 8 |

DECLARE FUNCTION asin# (x#)
DECLARE FUNCTION acos# (x#)
DEFDBL A-Z
DIM SHARED pi
pi = 4 * ATN(1)

FOR s1 = 2 TO 45
s2 = s1 + 1: s3 = s2 + 1

' a^ = b^2 + c^2 - 2bc cosA
' cos A = (b^2 + c^2 - a^2)/(2bc)

cosSmall = (s2 ^ 2 + s3 ^ 2 - s1 ^ 2) / (2 * s2 * s3)
cosLarge = (s2 ^ 2 + s1 ^ 2 - s3 ^ 2) / (2 * s2 * s1)

small = acos(cosSmall)
large = acos(cosLarge)

PRINT USING "## ## ## "; s1; s2; s3;
PRINT USING " ###.#####"; small; large; large / small
NEXT s1

FUNCTION acos (x)
acos = 90 - asin(x)
END FUNCTION

FUNCTION asin (x)
IF ABS(x) = 1 THEN
asin = 90 * SGN(x)
ELSE
asin = ATN(x / SQR(1 - x * x)) * 180 / pi
END IF
END FUNCTION

finds

`s1 s2 s3   angle 1   angle 3     ratio 2  3  4   28.95502 104.47751   3.60827 3  4  5   36.86990  90.00000   2.44102 4  5  6   41.40962  82.81924   2.00000 5  6  7   44.41531  78.46304   1.76658 6  7  8   46.56746  75.52249   1.62179 7  8  9   48.18969  73.39845   1.52312 8  9 10   49.45840  71.79004   1.45152 9 10 11   50.47880  70.52878   1.3972010 11 12   51.31781  69.51268   1.3545511 12 13   52.02013  68.67631   1.3201912 13 14   52.61680  67.97569   1.2919013 14 15   53.13010  67.38014   1.2682114 15 16   53.57643  66.86760   1.2480815 16 17   53.96812  66.42182   1.2307616 17 18   54.31467  66.03052   1.2157017 18 19   54.62346  65.68426   1.2024918 19 20   54.90037  65.37568   1.1908119 20 21   55.15010  65.09894   1.1804020 21 22   55.37646  64.84934   1.1710621 22 23   55.58261  64.62307   1.1626522 23 24   55.77113  64.41700   1.1550223 24 25   55.94420  64.22854   1.1480824 25 26   56.10364  64.05552   1.1417425 26 27   56.25101  63.89612   1.1359126 27 28   56.38763  63.74879   1.1305527 28 29   56.51462  63.61220   1.1255928 29 30   56.63299  63.48523   1.1209929 30 31   56.74357  63.36688   1.1167230 31 32   56.84711  63.25632   1.1127431 32 33   56.94427  63.15279   1.1090332 33 34   57.03561  63.05564   1.1055533 34 35   57.12165  62.96431   1.1022834 35 36   57.20283  62.87828   1.0992235 36 37   57.27956  62.79711   1.0963336 37 38   57.35218  62.72039   1.0936037 38 39   57.42103  62.64777   1.0910238 39 40   57.48639  62.57893   1.0885939 40 41   57.54851  62.51357   1.0862840 41 42   57.60763  62.45145   1.0840841 42 43   57.66397  62.39233   1.0820042 43 44   57.71772  62.33600   1.0800143 44 45   57.76905  62.28225   1.0781244 45 46   57.81812  62.23093   1.0763245 46 47   57.86507  62.18186   1.07460`

Left out at the beginning is the degenerate triangle with sides 1, 2 and 3, where the smallest angle is 0 degrees and the largest 180, for an infinite ratio.

There's one obtuse triangle, then the familiar 3:4:5 right triangle.

Then comes the solution to the problem: 4:5:6 gives a 2:1 ratio between its largest and smallest angles.

The ratio is monotonically decreasing, approaching 1 as the sides approach the ratio of 1:1:1 of an equilateral triangle.

 Posted by Charlie on 2009-03-05 12:48:10

 Search: Search body:
Forums (0)