# The Lagrangian Solution of an LC Circuit

1. Aug 28, 2014

### nmbr28albert

One way to solve the simple LC circuit with 1 inductor and 1 capacitor is to use the Lagrangian formulation of mechanics and consider charge $q$ as the generalized coordinate. When writing down your Lagrangian, the energy of the inductor $\frac{1}{2}L(\frac{dq}{dt})^2$ is treated as the kinetic energy, and the energy of the capacitor $\frac{q^2}{2C}$ is treated as the potential. My first instinct is to treat the inductor energy as also potential energy. Why is it considered kinetic?

2. Aug 29, 2014

### Delta²

Because it is similar to the kinetic energy i.e the term (dq/dt)^2 is similar to v^2. The definition of velocity v in lagrangian mechanics is the first derivative wrt time, of the generalized coordinate right?

3. Aug 29, 2014

### Staff: Mentor

I don't think it matters which you call what.

You have two terms. The sum is the Hamiltonian (total energy) and the difference is the Lagrangian. The sign of the difference shouldn't make any difference.

When you have three or more terms, you need to be more careful with signs.

4. Aug 30, 2014

### gsal

that sounds right

on linear motion along coordinate x, velocity is dx/dt, i.e., the first derivattive. Kinetic energy is (1/2)mv^2 or one half of constant m times the square of the first derivative of the generalized coordinate.

Besides, capacitors can actually store energy and inductors cannot, at least not permanently, only temporarily in the magnetic field but things need to be in motion (changing).

my 2 cents