A right circular cone is inscribed in a sphere of radius $\displaystyle a$ with the vertex and the circumference of the base of the cone touching the surface of the sphere.

Show that the volume of the cone is given by $\displaystyle I=\frac{1}{3}\pi (2ah^2-h^3)$ where $\displaystyle h$ is the height of the cone.

Hence, find the height of the cone when its volume is maximum.