Let a cylinder of mass m1, length L and radius R then take elementary disc of radius R and trickiness dx at distance of x from axis OO′ then moment of inertia about OO′ as this element

dl=4dmR2+dmx2
I=∫dl=∫4dmR2+∫n=L/2n=−L/2LMdx×x2
⇒I=4MR2+12ML2
⇒I=4M×πLV+12ML2
dLdI=−4πL2mV+12M×2L=0
⇒V=32πL3⇒πR2L=32πL3⇒RL=23(I=4πLMV+12ML2)