Let me solve this question from begining.
By KVL
E=L(di/dt)+(1/C)
[ 0]
[t ] tdt
diff once again
(d2i/dt2)=-i/(LC)
Sol of this problem is of the form
i=Asin(wt)+Bcos(wt) where w^2 = 1/(LC)
at t=0, i=0, therefore B=0
At t=0 di/dt = E/L
Aw=E/L So A = Esqrt(C/L)
a) At t= to=pi/(2w)
Q =
0
to Asin(wt)dt =-(A/w)[cos(wt
o)-cos(0)]
cos(wto) = cos(pi/2)=0
Q=A/w =CE
b) i(t0) =Asin(pi/2) = A = Esqrt(C/L)
c) After t=t0 lets define a new time such that closing of switch 2 is t=0
differential equation will become
(d2i/dt2)=-2i/(LC)
which will have a solution of form
i=Csin(w't)+Dcos(w't) where w'^2=2/(LC)
At t=0 i=Esqrt(C/L)
From last part it can be seen that di/dt=0 at this point
S0 C=0 and D= Esqrt(C/L)
So maximum current will remain same as earlier