Cylinder of Greatest Volume Inscribed in a Cube with its Axis as the Diagonal 
Given a cube of side $a$, what is the volume of the greatest cylinder that can be inscribed in it, such that its axis coincides with the longest diagonal of the cube?

It is quite obvious that for obtaining maximum volume, we would have to stretch the cylinder until it touches the cube’s faces at six distint points, but is that even possible? I’ll explain what I mean by converting this (sort of) to a $2D$ problem. 
Let’s say I have a rectangle $ABCD$, and inside the rectange is another (smaller) rectangle with its axis being the diagonal $AC$. (axis here refers to the line passing through the center and parallel to any one pair of sides). Now, intuitively or even by drawing a picture it’s evident that it shouldn’t be possible to have all four corners of the smaller rectangle touching the bigger rectangle, leaving one corner hanging in the air. Is there a way to prove/disprove this? It’s quite possible in the case of a square, though.
What I did here was take a side-view  of the original configuration, where the bigger rectangle is determined by the farthest edges (of length $a$) of the cube and the shorter diagonals (length $\sqrt 2 a$).
I’m looking for is way to relate the height and radius of the cylinder, after which the task is trivial using calculus.
 A: Following amd’s comment consider a plane containing the cup circle (of radius $r$) of the cylinder. The plane cuts a pyramid (of height $h$) from the cube. Let $V$ be the volume of the pyramid and $S$ be the area of its base, which is an equilateral triangle with a side $s$. Then  $V=\frac 13 Sh=\frac {\sqrt 3}{12}s^2h$. On the other hand, $V=\frac {d^3}6$, where $d$ is the length of the part of an edge of the cube cut by the plane. Also we have $s^2=2d^2$. It follows 
$V=\frac {\sqrt 3}{12}s^2h=\frac {s^3}{12\sqrt{2}}$ and so $s=h\sqrt{6}$. The circle inscribed into the triangle has radius $r=\frac s{2\sqrt{3}}=\frac h{\sqrt 2}$. The cyliner has height $H=a\sqrt{3}-2h$ and the volume 
$$\pi r^2H=\pi\frac {h^2}{2}\left(a\sqrt{3}-2h \right).$$
A: Position the cube so that a vertex is at the origin and the cube lies in the first octant. The long diagonal has length $a\sqrt3$, so if the cylinder’s height is $h$, its near cap lies at a distance of $\frac12\left(a\sqrt3-h\right)$ from the origin. The normal to this cap’s plane is $(1,1,1)$, so an equation of this plane is $$x+y+z=\frac{\sqrt3}2\left(a\sqrt3-h\right).$$ The expression on the right-hand side is the axis-intercept of this plane with all three coordinate axes. The end cap touches the $x$-$y$ plane at the midpoint of the $x$- and $y$-intercepts, so using the Pythagorean theorem, we can obtain the square of its radius, namely $$\frac38\left(a\sqrt3-h\right)^2-\frac14(a\sqrt3-h)^2 = \frac18\left(a\sqrt3-h\right)^2.$$ The rest of the task, as you say, is a trivial calculus exercise.
