Let the radius and height of the cylinder are r and h, respectively
In ΔAOM, r2+(4h2​)=a2 ∴h2=4(a2−r2)
Now, V=πr2h=π(a2h−41​h3)
For max or min, dhdV​=π(a2−43​h2)=0 ⇒h=(3​2​)a
Now, dh2d2V​=−46h​<0
So, V is maximum at h=3​2a​