17: The condition that the cylinder is inscribed in a ball means that its bases must touch the sphere. Symmetry of the situation means that the whole information can be captured by a 2D-crosssection through the axis of the cylinder, connecting one touching point with the center of the circle one gets a useful triangle.

The resulting equation

(h/2)2 + r2 = R2

allows one to get rid of r.

The function

should be maximized over the set M = [0,2R] (the height of a cylinder in a ball cannot be longer than the diameter). Use the appropriate algorithm.

Actually, an experienced problem solver would maximize the function g(x) = 4f (x)/π in order to get rid of constants that do not influence the outcome.

Next hint
Answer