# Maximizing the perimeter of a triangle inside a square

BdMO 2014:

We have a square $ABCD$ of side length 5.We take a point $E$ on $AD$ and $F$ on $AB$ so that $\angle FCE=45^\circ$. What can be the maximum perimeter of $\triangle AEF$?

I can construct the angle in such a way that the diagonal bisects it and then see if the perimeter is increasing or decreasing as we go to the left using the angle-bisector theorem.Is there a better and more rigorous way?

As a followup question,what is the maximum perimeter if $E$ does not fall on $A$ and $F$ on $B$ given that the perimeter is an integer?

NOTE: No trigonometry allowed.

Edit:trig allowed now.

-
If $E=A$, then you don't have $\triangle AEF$. – John Habert Feb 12 '14 at 4:57
@JohnHabert,no but I do have a trivial solution,don't I? – rah4927 Feb 12 '14 at 5:04
No you don't. The question asks for the maximum perimeter of a triangle. If you don't have a triangle, you don't have a perimeter to talk about. – John Habert Feb 12 '14 at 5:07
@JohnHabert,right,I was not thinking about the picture carefully.Ignore my previous comments. – rah4927 Feb 12 '14 at 5:11
@coffeemath,pardon my typo.I have been making them all day for some reason I have yet to understand.E must be on AD. – rah4927 Feb 12 '14 at 11:19

Claim: The perimeter of $\Delta AEF$ is 10 no matter where it is drawn.

We proceed by giving a way to construct the point $F$ on $AB$ once a given point $E$ on $AD$ is chosen, assuming $E$ is interior to this interval. First construct the circle $K$ centered at vertex $C$ of the square, of radius $5$. Then $K$ is tangent to sides $AD$ and $AB$ at the points $D,B$ respectively. Now from $E$ construct the other tangent to circle $K,$ which meets $K$ at the point $P$ and when extended meets side $AB$ at some point $F.$

We have $ED=EP$ since the lengths of tangents from a point outside a circle are equal, and similarly $FB=FP$. We now have congruent right triangles $\Delta EDC \equiv \Delta EPC$ and also $\Delta FPC \equiv \Delta FBC.$ We therefore have $$\angle DCE= \angle ECP =x, \\ \angle PCF = \angle FCB = y.$$ Two copies each of $x,y$ then fill out the whole 90 degree angle at corner $C$ of the square, and so $x+y=45=\angle ECF.$ There can only be one point $F$ on $AB$ which makes $\angle ECF=45,$ so the above construction has given the desired point $F$.

But now a series of equalities shows the perimeter of $\Delta AEF$ is always $10.$

$AE+AF+EF = AE+AF + (EP+PF) = (AE+EP)+(AF+FP)$

$= (AE+ED)+(AF+FB)=AD+AB=5+5=10.$

A trig approach (requested by OP in a comment)

The square is ABCD where say A is the upper right, B the lower right, C the lower left, and D the upper left vertex of the square. Then the point F is on the right vertical side, and E is on the top horizontal side, with the angle FCE given to be 45 degrees. Let $x$ be angle BCF and $y$ be angle DCE, so that $x+y=45$ degrees. For notation let $t(\theta)=\tan \theta.$ Then $BF=5t(x)$ and $DE=5t(y),$ and since all the sides are 5 we have $$FA=5(1-t(x)), \\ EA = 5(1-t(y). \tag{1}$$ Using Pythagoras' theorem to get the diagonal of triangle EAF gives $$EF^2=FA^2+EA^2=25[(1-t(x))^2+(1-t(y))^2] \\ =25[ 2-2(t(x)+t(y))+t(x)^2+t(y)^2]. \tag{2}$$ Now since $x+y=45$ and tangent of 45 is 1, we get from the sum formula for tangent that $(t(x)+t(y))/(1-t(x)t(y))=1.$ This means we can replace $t(x)+t(y)$ in $(2)$ by $1-t(x)t(y).$ When this is done we find we get $EF^2=25[(t(x)+t(y))^2]$, which means $EF=5(t(x)+t(y).$ When this is added to the sum $FA+EA$ the result is the constant $10$ because the tangents cancel, making the perimeter of the triangle $AEF$ constantly $10$ independent of the angles $x,y.$

-
But how do I come up with the idea of constructing a circle in a one and a half hour(15 minutes less than that,to be precise)exam?What should motivate me to do such a thing? – rah4927 Feb 13 '14 at 15:47
@rah4927 That I don't know. Maybe you could ask the teacher, and also ask why the question was put as find the max when all the perimeters are the same value of 10. By the way, what is BdMO 2014, is that a contest math? If so it's natural for a question to be difficult. – coffeemath Feb 13 '14 at 19:18
Yes,BdMO is a math contest.Of course such questions can be extremely difficult,but there were 9 other problems to solve and this wasn't even the last question!Setting that aside,good solution.+1 – rah4927 Feb 14 '14 at 12:03
It's a bit late,but if I do want to use trig,what should we do? – rah4927 Jun 7 '14 at 6:44
@rah4927 I haven't thought about using trig for this problem (I'll look into that and get back to you if anything simple comes of it.) – coffeemath Jun 7 '14 at 20:33