We know that at some time (say t = 0) that Q0 = 0.1 C and I0 = 0.5 A. Energy is consrved in an LC circuit which implies that at any other time t,
The maximum charge occurs when I = 0 and hence,
Solving for Qmax gives
where T is the period of the oscillations.