A Square Inside A Triangle (but with a twist)

I have a right $\triangle ABC$ and I want to find the side length of one of the legs, $x$, when the square is at its max area, as shown in
I am given that $AB + BC$ is $10$.

Here's what I tried so far:

• I found ratios between the sides using similarity, but I wasn't able to get a conclusive answer, just things in terms of each other.

• I tried to set up equations using the Pythagorean theorem, but that just ended up with some messy variable terms and zero actual progress.

The answer is $x=5$, but I want to know how I would go about approaching this kind of problem. It's like others I've seen before here and in other places, but not being given the side lengths threw me off.

• So $AB + BC$ is fixed, and $AB^2 + BC^2 = AC^2$ is fixed. Does this not mean that the lengths $AB$ and $BC$ are fixed, since we can solve from them from the above, and hence $x$ is fixed? – астон вілла олоф мэллбэрг Oct 6 '17 at 8:15
• It does. It's just my wording that got messed up. – Aditya R Oct 6 '17 at 8:16
• Yes, then you should rephrase your question better. – астон вілла олоф мэллбэрг Oct 6 '17 at 8:17

The area of the square would be maximal, when $l$ would be maximal.

Let $AB=a$ and $AC=b$.

Thus, $$\frac{a-l}{a}=\frac{l}{b},$$ which by AM-GM gives: $$l=\frac{ab}{a+b}\leq\frac{\left(\frac{a+b}{2}\right)^2}{a+b}=\frac{5}{2}.$$ The equality occurs for $a=b=5$.

Thus, the area of the square gets a maximal value for $x=5$.

Done!

• $x$ is equivalent to $AB$. Sorry if it was unclear from the diagram. – Aditya R Oct 6 '17 at 8:23
• @AppleCrazy I added something. See now. – Michael Rozenberg Oct 6 '17 at 8:27
• Thank you. The problem makes sense now. – Aditya R Oct 6 '17 at 8:28
• @AppleCrazy You are welcome! – Michael Rozenberg Oct 6 '17 at 8:29

You can show this strictly geometrically.

By symmetry of the situation you can assume that $BD\ge DC$. Then form the triangle $EGH$ by mirroring $DCE$ by $E$. Now we see that the triangle $EGH$ can be extended to a square $FEGI$ congruent to $BDEF$ and therefore $BCE$ and $AFE$ is together of at least the same area that $BDEF$. That is $BDEF$ is at most half of ther area of the triangle $ABC$. You also have that the maximal area of the triangle is when $x=5$ and that also happens to coincide with $BDEF$ having half of the ario of the triangle.

we have $$\frac{c-l}{l}=\frac{AB}{BC}$$ and with $$BC=10-c$$ we get $$\frac{c-l}{l}=\frac{c}{10-c}$$ can you finish? $c=AB$ and you will get $$-c^2+10c-10l=0$$ from here we get $$l=\frac{-c^2+10c}{10}$$ $$l'(c)=\frac{-2c+10}{10}$$ thus $$l'(c)=0$$ if $$c=5$$

• the answer can you find above, with the help of calculus – Dr. Sonnhard Graubner Oct 6 '17 at 8:31