# Mechanical and Electrical Oscillations

## Oscillation of a Mass-Spring System Compared with Electrical Oscillation in an L-C Circuit

### Mass-Spring System

• Kinetic energy = $\frac12mv_x^2$
• Potential energy = $\frac12kx^2$
• $\frac12mv_x^2+\frac12kx^2=\frac12kA^2$
• $v_x = \pm\sqrt{\frac km}\sqrt{A^2-x^2}$
• $v_x=\frac{dx}{dt}$
• $\omega=\sqrt{\frac km}$
• $x=A\cos(\omega t+\phi)$

### Inductor-Capacitor Circuit

• Magnetic energy = $\frac12Li^2$
• Electrical energy = $\frac{q^2}{2C}$
• $\frac12Li^2+\frac{q^2}{2C}=\frac{Q}{2C}$
• $i = \pm\sqrt{\frac1{LC}}\sqrt{Q^2-q^2}$
• $i=\frac{dq}{dt}$
• $\omega=\sqrt{\frac1{LC}}$
• $q=Q\cos(\omega t+\phi)$