Consider a parallel RLC oscillator. Kirchhoff's equations of motion are $$ \ddot{\Phi} + \frac{1}{\tau}\dot{\Phi} + \omega_0^2 \Phi = 0 $$ where $\tau = RC$ and $\omega_0 = 1 / \sqrt{LC}$.
- What is the Lagrangian and associated Euler-Lagrange equations for this system?
- What is the Hamiltonian and associated Hamilton's equations of motion for this system?
My attempt
The Lagrangian in the absence of damping is $$\mathcal L = \frac{1}{2} C \dot{\Phi}^2 - \frac{1}{2}\frac{\Phi^2}{L}$$ from which the usual Euler-Lagrange equations give $\ddot \Phi + \omega_0^2 = 0$, the correct equation of motion without damping.
I found a reference(pdf) claiming that if the equations of motion are independent of time and the damping is linear, we can write $$\frac{d}{dt} \left( \frac{\partial \mathcal L}{\partial \dot q} \right) - \frac{\partial \mathcal L}{\partial q} + \frac{\partial G}{\partial \dot q} = 0$$ where $\mathcal{L}$ is Lagrangian without damping and $G$ is the Raleigh dissipation function defined by $$ G = \frac{1}{2} b \dot{q}^2$$ where $b$ is defined by $F_\text{friction} = -b \dot q$. In our case, $b = 1/R$ so $G=(1/2) \dot{\Phi}^2/R$. Let's check that the Euler Lagrange equation works \begin{align} \frac{d}{dt} \left( \frac{\partial \mathcal L}{\partial \dot q} \right) - \frac{\partial \mathcal L}{\partial q} + \frac{\partial G}{\partial \dot q} &= 0\\ C \ddot{\Phi} + \frac{\Phi}{L} + \frac{\dot{\Phi}}{R} &= 0 \\ \ddot{\Phi} + \omega_0^2 \Phi + \frac{\dot{\Phi}}{\tau} &= 0 \end{align} which is what we wanted. It seems we've answered part 1 of the question, i.e. we found a Lagrangian and Euler-Lagrange equation. But what about the Hamiltonian?