Calculate the edge length of a cube, which is inserted in a hemisphere How can I calculate the edge length of a cube, which is inserted into a half-sphere with a radius $a$?
 A: This is an elaboration on @J.M.'s comment, and assumes we want the largest such cube (obviously we could put smaller cubes inside the half-sphere).
Imagine the half-sphere in $\Bbb R^3$, laying flat on the xy-plane. Let the side length of the cube be $r$.
The corners of the cube will touch the top of the half-sphere, so the length of a line from the origin to any top vertex of the cube will have length $a$, since this line is also the radius of the half-sphere. The line from the origin to a vertex on the xy-plane will be one-half the length of a diagonal on a face of the cube. Using the pythagorean theorem and letting the diagonal be $d$, we have that $d^2=r^2+r^2$ and so $d=\sqrt 2 r$, thus the line from the origin to the vertex on the xy-plane is $\frac 1 {\sqrt 2} r$. We have two sides of a triangle which has one vertex at the origin, one as a vertex of the cube on the xy-plane, and one as a top vertex of the cube. Using vertices of the cube which are on the same edge of the cube, we have that the last side of such a triangle has length $r$. Thus we just use the pythagorean theorem again:
$$r^2+\frac {r^2} 2 = a^2$$
Solving for $r$ in terms of $a$ gives the desired result.
