A cone is inscribed in a sphere of radius a, centred at the origin. The

height of the cone is x and the radius of the base of the cone is r, as
shown in the diagram opposite.
Find the height, x, for which the volume of the cone is a maximum.
(HINT: show that the volume of the cone is given by
V=1/3pi(2ax^2-x^3)