LC circuit
From Physics wiki
Given a closed circuit with a source of constant voltage V, an ideal capacitor with capacitance C and an ideal inductor with inductance L, assuming that the wires and circuit elements have negligible internal resistances, we analyse the circuit as follows.
Assign a direction to the unknown time-varying current I(t) and use Kirchoff's voltage law. Counting voltage increases around the loop we have:
Where Q(t) is the charge accumulated on the capacitor at time t. Since
we can write this as a second-order inhomogeneous differential equation:
We define
, consequently
which removes the inhomogeneous term:
Multiplying by
and integrating results in a constant of motion:
Where B is the constant of motion in question. Replacing the substitution for A(t) we find that B is (up to a multiplicative factor of
) the total energy of the system. Thus this is a statement of energy conservation.
The equation above is now separable and we integrate it.
where we substituted
We can perform the z integral using the derivative of inverse sine.
Putting back all of our substitutions we have:
We can check our units by substituting these back into the equation defining B and seeing if it is self-consistent. Recall that
where Etotal is the total energy of the system and determines the amplitude of the oscillations.

