Page 1 of 1

Triangle

Posted: May 18th, 2022, 6:32 pm
by cinelli
The sides of a triangle are three consecutive integers. Moreover the biggest angle is twice as large as the smallest. What are the lengths of the sides of the triangle?

Cinelli

Re: Triangle

Posted: May 19th, 2022, 1:18 am
by UncleEbenezer
I expect others may solve it more elegantly, even in the absence of The Master. But here goes.

The sides are 4,5,6.

This can be found by inspection: as the numbers increase, so the triangle rapidly approaches equilateral and the biggest angle is much less than double the smallest. The right-angle triangle 3,4,5 is the opposite, but only by a rather small margin. So there's not far to look!

For a solution that would pass muster in the O-level (or, presumably, GCSE) classroom, let's notate the triangle as having sides N-2, N-1, N. Let A be the smallest angle opposite N-2, and B be opposite N-1. You specify the biggest angle as 2A, so we have 3A+B=π. We can also use A and B to notate the vertices having those respective angles, with C being the final vertex.

Having forgotten my O-level trig, let's formulate an equation we can solve from simple first principles. Drop a perpendicular from C to a point D on the side AB, dividing our triangle into two right-angle triangles either side of the line CD. Let P be the length of our line CD, and Q the length of AD. Then since AB = N, we have BD = N-Q.

Now we apply Pythagoras to the two right-angled triangles:
p^2 + q^2 = (n-1)^2
p^2 + (n-q)^2 = (n-2)^2

Reformulating into two expressions for p^2 (which we can of course equate) and solving for q, we get
q = (n^2 + 2n - 3) / 2n

from which we can compute angles
A = arc cos (q/(n-1))
B = arc cos (n-q)/(n-2))

whereupon computer says N=6.

Re: Triangle

Posted: May 19th, 2022, 8:21 am
by CliffEdge
So you'd have to look up the sine of the angles. That's cheating.

Re: Triangle

Posted: May 19th, 2022, 4:50 pm
by 9873210
Not sure it's more elegant, but it uses worse trig.
The sides are 4,5,6.
sine rule
a/sin A = b / sin B = c/sin C

Cosine rule
a^2 = b^2 +c^2 - 2bc cos C

Double angle formula
sin 2x = 2 cos x sin x

Let the shortest side have length A. So sides of A, A+1, A+2
Let the smallest angle be θ

The largest angle is opposite A+2 and the shortest angle is opposite A. Use the sine rule
(A+2)/sin 2θ = (A)/sin θ

Apply double angle formula
(A+2)/(2 sin θ cos θ) = (A)/sin θ
cos θ = (A+2)/(2A)

Now apply the cosine rule
(A)^2 = (A+1)^2+(A+2)^2 -2(A+1)(A+2) cos θ
(A)^2 = (A+1)^2+(A+2)^2 -2(A+1)(A+2) (A+2)/(2A)
(A)^2 = (A+1)^2+(A+2)^2 -2(A)(A+2) (A+2)/(2A) -2(1)(A+2) (A+2)/(2A)
(A)^2 = (A+1)^2+(A+2)^2 -(A+2) (A+2) -(A+2) (A+2)/(A)
(A)^2 = (A+1)^2+(A+2)^2 -(A+2) (A+2) - A -4 -4/A
so
integer = integer + integer blah blah blah -4/A
So 4/A is an integer and A is 1, 2 or 4

evaluate the expression for all three possibilities: 4, and only 4, works.




edit to remove stray character

Re: Triangle

Posted: May 19th, 2022, 5:13 pm
by 9873210
The sides are 4,5,6.
Cosine rule
a^2 = b^2 +c^2 - 2bc cos A


Need to edit to fix typo

Re: Triangle

Posted: May 19th, 2022, 11:22 pm
by SteelCamel

It's possible to get to the solution without having to try all the possibilities. You got to:
(A)^2 = (A+1)^2+(A+2)^2 -(A+2) (A+2) - A -4 -4/A

This can be simplified:
(A)^2 = (A+1)^2+(A+2)^2 -(A+2)^2 -A -4 -4/A
(A)^2 = (A+1)^2 -A -4 -4/A
A^2 = A^2+2A+1 -A -4 -4/A
A^2 = A^2+A -3 -4/A
0=A -3 -4/A
0=A^2 -3A -4

Then applying the quadratic formula, A=(--3 +/- sqrt((-3)^2 - 4(-4))/2
A=(3 +/- sqrt(9 - -16)/2
A=(3 +/- sqrt(25))/2
A=(3 +/- 5)/2
A=4 or -1

So the triangle has sides of 4,5,6 or -1,0,1. Since a triangle with negative and zero sides clearly isn't the solution, it must be the first.


Re: Triangle

Posted: May 20th, 2022, 8:21 pm
by cinelli
I was about to make the same point but SteelCamel beat me to it.

9873210 did 90% of the work and derived

9873210 wrote:(A)^2 = (A+1)^2+(A+2)^2 -(A+2) (A+2) -(A+2) (A+2)/(A)

which appears to be a cubic in A. In fact the A^3 terms cancel leaving a quadratic
A^2-3A-4 = 0
which factorises nicely as
(A-4)(A+1) = 0
(no need for the quadratic formula!)

Incidentally I used just the sine rule rather than the cosine rule to obtain two equations for A and theta:

'    A              A+1             A+2
---------- = ---------------- = ------------
sin(theta) sin(180-3*theta) sin(2*theta)

then the triple angle formula for sin(3*theta). This is not to say that this is an improvement on 9873210's method. The triangle's angles are 41.41 degrees, 55.77 deg and 82.82 deg.


Cinelli