Yet another 3-4-5 triangle

Geometry Level 5

Inspiration , along with a few other questions from and inspired by @Fletcher Mattox

Given a point Q Q , a triangle Δ A B C \Delta ABC is constructed so that A Q = 3 AQ=3 , B Q = 4 BQ=4 , C Q = 5 CQ=5 , as shown in the diagram above. Among all such triangles, what is the largest possible perimeter?

If this perimeter is p p , enter 1000 p \left\lfloor 1000 p \right\rfloor as your answer.

Bonus: Can you find a closed form for p p ?


The answer is 20932.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Fletcher Mattox
May 13, 2021

I generally don't post code for these types of problems, but Chris egged me on. :)

here is a picture of the triangle.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from math import sin, cos, degrees, radians, pi
from sympy import *
from scipy.optimize import minimize
import numpy
numpy.set_printoptions(precision=15)

# let the arbitrary point be the origin
# parameters to doit() are the three angles the vertices make with the origin

def doit(x):
    A_,B_,C_ = x
    A = Point(a*cos(A_), a*sin(A_))
    B = Point(b*cos(B_), b*sin(B_))
    C = Point(c*cos(C_), c*sin(C_))
    t = Triangle(A, B, C)
    return -t.perimeter

a,b,c = 3,4,5
x0 = [radians(0), radians(120), radians(240)]
bounds = [(0, 2*pi)]*3
options = {'ftol':1e-16, 'maxiter':2000}
res = minimize(doit, x0, method='SLSQP', bounds=bounds, options=options)
print("Solution (angles with the x-axis)", list(map(degrees, res.x)))
print("Maximum perimeter: ", -N(res.fun))

1
2
Maximum perimeter:  20.9323303679694
Solution (angles with the x-axis) [1.0277511544426605, 113.36387173594606, 242.66520311471177]

Log in to reply

Not that I am aware of, but apparently Mathematica can. However, I cannot afford that software.

Fletcher Mattox - 4 weeks, 1 day ago

Log in to reply

Pi Han Goh - 4 weeks, 1 day ago

Log in to reply

Log in to reply

@Pi Han Goh Let X X denote the angle (in radian) sandwiched between the given lengths 4 and 5.

And let Y Y denote the angle (in radian) sandwiched between the given lengths 3 and 5.

Then we have X , Y ( 0 , π ) X,Y \in (0, \pi ) and X + Y > π . X + Y > \pi.

The the perimeter is maximized when ( 4 sin X 3 sin Y ) 2 = 41 40 cos X 34 30 cos Y \left( \dfrac{4 \sin X}{3\sin Y} \right)^2 = \dfrac{41-40\cos X}{34 - 30\cos Y}

or when ( X , Y ) ( 2.25673 , 2.06582 ) (X,Y) \approx (2.25673, 2.06582)

Pi Han Goh - 4 weeks ago

Log in to reply

@Pi Han Goh Alternatively,

  • let l l denote the other length formed from the interior triangle with two given sides 3 and 4

  • let m m denote the other length formed from the interior triangle with two given sides 4 and 5

  • let n n denote the other length formed from the interior triangle with two given sides 3 and 5

The perimeter is maximized when l 2 + 49 l 2 + 32 = m 2 + 81 m 2 = n 2 + 256 n 2 + 14 l^2 + \dfrac{49}{l^2} + 32 = m^2 + \dfrac{81}{m^2} = n^2 + \dfrac{256}{n^2} + 14

or when ( l , m , n ) ( 5.84131 , 8.14498 , 6.94624 ) (l,m,n) \approx (5.84131, 8.14498, 6.94624)

Pi Han Goh - 4 weeks ago

Thank you both for sharing your results! @Fletcher Mattox - that's very similar to my approach; I used two variables to represent angles at the centre (essentially your angles B and C; I fixed A=0, because rotating the whole triangle doesn't affect its perimeter), then equated the partial derivatives to zero to find the maximum.

@Pi Han Goh - I went about this numerically (I thought I got close to an analytical solution at one point, but no). That's a wonderful equation you found! I wonder how the coefficients come from 3 , 4 , 5 3,4,5 ?

Chris Lewis - 4 weeks, 1 day ago

Log in to reply

Uh-oh...ummm...have we all missed something here? (If so, I feel incredibly stupid for having posted this, because the inspiration problem is actually the solution!!)

Let B Q C = α \angle BQC=\alpha , C Q A = β \angle CQA=\beta , A Q B = γ \angle AQB=\gamma , so that α + β + γ = 2 π \alpha+\beta+\gamma=2\pi . By the cosine rule,

a 2 = B Q 2 + C Q 2 2 B Q C Q cos α b 2 = C Q 2 + A Q 2 2 C Q A Q cos β c 2 = A Q 2 + B Q 2 2 A Q B Q cos γ \begin{aligned} a^2 &=BQ^2 + CQ^2 - 2BQ \cdot CQ \cos \alpha \\ b^2 &=CQ^2 + AQ^2 - 2CQ \cdot AQ \cos \beta \\ c^2 &=AQ^2 + BQ^2 - 2AQ \cdot BQ \cos \gamma \end{aligned}

Now, define F ( α , β , γ , L ) = B Q 2 + C Q 2 2 B Q C Q cos α + C Q 2 + A Q 2 2 C Q A Q cos β + A Q 2 + B Q 2 2 A Q B Q cos γ + L ( α + β + γ 2 π ) F(\alpha,\beta,\gamma,L)=\sqrt{BQ^2 + CQ^2 - 2BQ \cdot CQ \cos \alpha}+\sqrt{CQ^2 + AQ^2 - 2CQ \cdot AQ \cos \beta}+\sqrt{AQ^2 + BQ^2 - 2AQ \cdot BQ \cos \gamma}+L(\alpha+\beta+\gamma-2\pi)

(ie set it up as a Lagrangian multiplier problem). Then the partial derivative with respect to α \alpha is F α = B Q C Q sin α B Q 2 + C Q 2 2 B Q C Q cos α + L F_\alpha=\frac{BQ \cdot CQ \sin \alpha}{\sqrt{BQ^2 + CQ^2 - 2BQ \cdot CQ \cos \alpha}}+L

Equating this and the other partial derivatives to zero (to find the maximum) gives B Q C Q sin α B Q 2 + C Q 2 2 B Q C Q cos α = C Q A Q sin β C Q 2 + A Q 2 2 C Q A Q cos β = A Q B Q sin γ A Q 2 + B Q 2 2 A Q B Q cos γ = L \frac{BQ \cdot CQ \sin \alpha}{\sqrt{BQ^2 + CQ^2 - 2BQ \cdot CQ \cos \alpha}}=\frac{CQ \cdot AQ \sin \beta}{\sqrt{CQ^2 + AQ^2 - 2CQ \cdot AQ \cos \beta}}=\frac{AQ \cdot BQ \sin \gamma}{\sqrt{AQ^2 + BQ^2 - 2AQ \cdot BQ \cos \gamma}}=-L

We can make two substitutions here; the denominators are just the sidelengths a , b , c a,b,c ; the numerators are twice the areas of the triangles Δ B Q C \Delta BQC , Δ C Q A \Delta CQA , Δ A Q B \Delta AQB respectively. So the equation becomes

2 [ Δ B Q C ] a = 2 [ Δ C Q A ] b = 2 [ Δ A Q B ] c \frac{2[\Delta BQC]}{a}=\frac{2[\Delta CQA]}{b}=\frac{2[\Delta AQB]}{c}

But these are just the heights of the three triangles Δ B Q C \Delta BQC , Δ C Q A \Delta CQA , Δ A Q B \Delta AQB . In other words, the perpendicular distances from Q Q to the three sides are all the same. In other words, Q Q is the incentre!

I think I went for numerical methods too quickly with the last one and thought the incentre didn't actually maximise the perimeter.

Have I made a mistake here? Or should I convert this to a solution and be very embarrassed?

Chris Lewis - 3 weeks, 5 days ago

Log in to reply

Did you see this ?

Fletcher Mattox - 3 weeks, 4 days ago

Log in to reply

@Fletcher Mattox I hadn't seen it - but wish I had!

Chris Lewis - 3 weeks, 4 days ago

Let point C is on an ellipse with foci A and B, then AC+BC=major axis. From the drawing is clear, that for a fixed AB, a, b, and c, the maximum AC+BC is when the ellipse is tangent to the blue circle (Q, c), because the red ellipse has the biggest possible major axis. From the focus-to-focus reflection property => CQ is an angle bisector of an angle C. Analogically AB+AC is maximal when AQ is an angle bisector of an angle A and AB+BC is maximal when BQ is an angle bisector of an angle B => the largest possible perimeter is when Q is the intersection point of the angle bisectors of ABC or Q is the center of the incircle of ABC. From the Heron's formula => A A B C = p r 2 = p 2 x y z p 2 = x + y + z x 2 + r 2 = a 2 y 2 + r 2 = b 2 z 2 + r 2 = c 2 A_{ABC}=\frac{pr}{2}=\sqrt{\frac{p}{2}xyz}\\ \frac{p}{2}=x+y+z\\x^2+r^2=a^2\\y^2+r^2=b^2\\ z^2+r^2=c^2 If a=3, b=4, c=5 and solving numerically for p p = 20.9323303679693379582020526 20932 \Rightarrow\;\;p=20.9323303679693379582020526\;\;\Rightarrow\;\; \boxed{20932}

Iliya Hristov - 2 days, 23 hours ago

Log in to reply

Wow, nice approach - you might want to post it as a solution rather than a comment, though (so more people see it)

Chris Lewis - 2 days, 12 hours ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...