An analysis is presented for the torsional oscillations of circular cylinders and cylindrical shells in which the density and rigidity vary in both radial (r) as well as axial (z) directions. The shear wave velocity is assumed to be constant or a function of the radial distance but independent of z. The equation of motion is solved for some particular forms of the heterogeneity. Finally, the frequency equations are obtained for many different cases.