## Y in a Cube

Inside a unit cube, place a 2 dimensional letter "Y", such that each leg of the Y is the same length. Maximize the length of the legs and describe the orientation of the "Y" if
1. The "top" two legs are at 90 degrees to each other, and 135 degrees to the third.
2. All legs are 120 degrees from each other. [I believe this is the same as asking for the largest equilateral triangle you can inscribe in a cube.]
Source: 1. Wesley Rose. 2. Original extension.
Solutions were received from Jeremy Galvagni, Maurizio Morandi, and Alan O'Donnell.  Maurizio solved both problems, and his answers appear to match those from the others.
From Maurizio:
B           C
\         /
\     /
\ /
| O
|
|
A

1) If OA = OB = OC = x and BOC = 90° we have the equation:
2 - x = sqrt(3x^2 + sqrt(8)x^2 - 2)
The solution is x = 1+ 2^(1/4) - sqrt(2) = 0.775
In the Cartesian space we have the coordinates:
A (0 ; 0 ; 0)            B (1 ; sqrt(2) - 2^(1/4) ; 1)             C (sqrt(2) - 2^(1/4) ; 1 ; 1)

2) If BOC = AOB = AOC = 120° we have x = sqrt(6)/3 = 0.8165
The coordinates are:
A (0 ; 0 ; 0)             B (1 ; 0 ; 1)             C (0 ; 1 ; 1)

From Jeremy:
Part 1.
I believe the length of the legs of the Y is 3/(1+sqrt(4+3sqrt(2))) = .77499
The orientation has the lower leg in a lower corner and the upper legs along two consecutive upper edges.

method:

I used a unit-Y rather that a unit cube.  Connecting the ends with segments forms an isoceles triangle with base sqrt(2) and legs sqrt(2+sqrt(2))
call this triangle xyz with base yz
call the cube ABCD-EFGH
place x at E, y along BC and z along CD such that yC=zC
zC=1 by the isoceles right triangle Czy
zD=s-1 where s is the side length of the cube

the 3D pythagorean theorem gives s^2 + s^2 + (s-1)^2 = (xz)^2
solving for s gives (1+sqrt(4+3sqrt(2)))/3 = 1.291333315
which is the smallest cube which will fit a unit-Y