Artificial intelligent assistant

A change in direction in a corridor (triangle/geometry) Johnny is building a corridor. The corridor is 1.1m wide. Johnny's corridor is parallel to a wall. Near the end of the corridor the wall turns 90 degrees right for 0.5m, before turning back 90 degrees left. Thus the second part of the wall is parallel to the first, but 0.5m to the right. See ![diagram]( Johnny has already cut the wood for the two sections of the corridor, as 1.1m wide rectangles the exact length of the respective walls. Having cut the wood, he has now realised that where the corridor changes direction, it is too narrow, with only 0.6m between the corner of the wall and the edge of the corridor Johnny wants to cut a right-angled triangle similar to the one highlighted in red which he will add between the two rectangles, so that the corridor is no narrower than 0.9m at any point. What are the minimum dimensions of Johnny's triangle?

Let the triangular piece of wood (brown in diagram below) have legs of $x$ and $y$ meters, so its hypotenuse is $\sqrt{x^2+y^2}$ meters long. The distance $h$ from the wall corner to the hypotenuse must be $0.9$ m.

The area of the larger yellow+brown triangle can be computed by taking $0.6+y$ as base and $x$ as altitude, or the brown triangle hypotenuse as base and $h$ as altitude. By equating these we get the equation:

$$ (0.6+y)\cdot x=\sqrt{x^2+y^2}\cdot0.9, \quad\hbox{whence:}\quad x={{0.9} y\over \sqrt{y^2 + 1.2 y - 0.45}}. $$

The area of the brown triangle is then $$ A={1\over2}xy={0.45 y^2\over \sqrt{y^2 + 1.2 y - 0.45}}. $$ The minimum can be found by differentiating $A$ with respect to $y$ and equating the result to zero, which leads to the equation: $$ y^2+1.8y-0.9=0, \quad\hbox{satisfied by}\quad y=\sqrt{1.71}-0.9=0.40767. $$ The corresponding value of $x$ is then $x=0.67043$.

![enter image description here](

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 43ff381f651991c3f6788ee9250bbff3