A circuit has a battery(V), Capacitor(C) and Inductor(L) connected in series. At t < 0, the switch is open and the capacitor has an initial charge of -800uC and Io = 0.0Amps.. When the switch is closed at t = 0, I want to know what happens here. I only understand an LC circuit where there is only a capacitor and an inductor, but the addition of a battery in this case makes it a little conplicated for me.
V - Ldi/dt - q(t)/C = 0; q(t)= qmax*cos(wt + phi) + VC; I(t)= -w*qmax*sin(wt + phi).
This is what I think: At t = 0 when the switch is closed, the capacitor starts discharging through the inductor and current increases in the circuit. But the battery is also connected in the circuit, so what is the battery doing? Is it continuosly charging the capacitor? I am confused!