It's probably a very basic question but I just cannot wrap my mind around it. I'll just try to derive the differential equation for an LC circuit:
According to the law of induction, in a solenoid we have:
$$U_L=-N\frac{\text{d}\Phi}{\text{d}t} = -NA\frac{\text{d}B}{\text{d}t}$$
where $N$ is the winding number of the solenoid, $A$ is its constant cross section area and $B$ is the magnetic flux density induced by the solenoid.
The flux density in a solenoid is known to be
$$B=\mu_0\mu_r\frac{N}{l}I_L$$
where $l$ is the solenoid's length and $I_L$ is the current that flows through it. Since only the current is time dependent we get:
$$U_L=-\mu_0\mu_r\frac{N^2A}{l}\frac{\text{d}I_L}{\text{d}t}$$
The constant prefactor is known as the solenoid's inductivity $L=\mu_0\mu_r\frac{N^2A}{l}$ which gives
$$U_L=-L\frac{\text{d}I_L}{\text{d}t}$$
Now, since the capacitor and the solenoid are the only elements in the circuit we get
$$U_C + U_L=0$$
For a (plate) capacitor with capacity $C$ we have
$$U_C = \frac{Q_C}{C}$$
where $Q_C$ is the charge on one of the capacitor's plates.
The current is constant in the whole circuit: $$I_C=I_L$$
But the current through the capacitor is given as $$I_C=\frac{\text{d}Q_C}{\text{d}t}$$
Plugging it all together, we get:
$$0=U_C+U_L = \frac{Q_C}{C} + \left(-L\frac{\text{d}I_L}{\text{d}t}\right) = \frac{Q_C}{C} - L\frac{\text{d}^2Q_C}{\text{d}t^2} $$
As you can see, this can't be correct, as we get an exponential rather than a sine/cosine solution.
So my question is: How to properly define the sign/"direction" for $Q$, $U$ and $I$ in this setup to get the signs right? Where did the mistake happen which led to the wrong result?
My thoughts so far:
- The charge $Q$ is defined by considering one of the capacitor plates. Say, the initially positively charged plate, that is, $Q_C(t=0)>0$. So, in the beginning, when the capacitor starts to discharge, the positive charge on this plate decreases and thus $I_C$, and thus $I_L$ as well, is negative.
- Then, according to the law of induction, $U_L$ is positive (Lenz's law, the minus sign).
- But we know that then the capacitor voltage $U_C=-U_L$ is negative.
- But this contradicts to the assumption that the capacitor's charge is initially positive and violates $Q_C=+CU_C$.
Where is the flaw in this consideration?