A heavy flywheel rotating at n revolutions per minute is

A heavy flywheel rotating at n revolutions per minute is rigidly attached to the end of a shaft of diameter d (see figure). If the bearing at A suddenly freezes, what will be the maximum angle of twist ( of the shaft? What is the corresponding maximum shear stress in the shaft?
(Let L = length of the shaft, G = shear modulus of elasticity, and Im = mass moment of inertia of the flywheel about the axis of the shaft. Also, disregard friction in the bearings at B and C and disregard the mass of the shaft.)
Equate the kinetic energy of the rotating flywheel to the strain energy of the shaft
A heavy flywheel rotating at n revolutions per minute is