Euler-Lagrange equations of a current-loop pendulum in a magnetic field I am reading "Nonlinear Electromechanics", by Dmitry Skubov and Kamil S. Khodzhaev, Springer 2008. Here is the relevant and freely available chapter.
Essentially, a loop of area $S$, mass $m$, moment of inertia $I$, self inductance $L$, carrying current $i$ and rigidly connected to a pendulum bar of length $l$ is placed in a magnetic field $B_0\sin\nu t$. The Lagrangian of the system is:
$$L=T-V=\frac{1}{2}I\dot{\theta}^2-\frac{1}{2}Li^2-B_0Si\sin{\nu t}\sin\theta-mgl(1-\cos\theta)$$
where $\theta$ is the pendulum's deviation from the vertical.
Euler-Lagrange equation is $$\frac{\partial L}{\partial q}-\frac{d}{dt}(\frac{\partial L}{\partial \dot{q}})=0.$$ If we take the generalized variables to be $\theta$ and $i$ then we should get:
$$-B_0Si\sin{\nu t}\cos\theta-mgl\sin\theta-I\ddot{\theta}=0$$
$$Li+B_0S\sin{\nu t}\sin\theta=0$$
However, the equations in the book (2.2.2) are different from these two. The first differs by signs, while the second is completely different. What is wrong?
=== EDIT: Added the equations in question ===
$$I\ddot{\theta}-B_0Si\sin{\nu t}\cos\theta+mgl\sin\theta=0$$
$$L\dot i+B_0S\sin{\nu t}\cos\theta \dot \theta+B_0S\nu\cos{\nu t}\sin\theta+Ri=0$$
 A: Recall that magnetic energies add to the Lagrangian while electric energies subtract from the Lagrangian--this is easily proven looking at the Lorentz force in the Lagrangian formalism. That is to say, the Lagrangian should be defined as
$$
\mathcal L=T-V+W_b-W_e
$$
where $W_n$ are the magnetic ($b$) and electric ($e$) energies. Thus, your Lagrangian is
$$
\mathcal L=\frac12I\dot\theta^2-mgl\left(1-\cos\theta\right)+\frac12Li^2+B_0S\sin\nu t\sin\theta i
$$
which takes care of your sign error in the first part.
The missing terms in your second equation likely comes from your dissipation function (deduced from the existence of the $\dot\theta$ and $R$ terms) that will probably take the form
$$
\Psi=\alpha i^2+\beta\dot\theta^2
$$
It's not (yet) clear to me the origins of $\alpha$ and $\beta$ here (which are easily determined via direct differentiation), but hopefully you'll see that it's not simply the Lagrangian from classical mechanics applied to a new situation, there are some extra features.
The system of equations required here are called the Lagrange-Maxwell equations (defined in Section 1.2 of your book):
\begin{align}
\frac{d}{dt}\frac{\partial W}{\partial i}+\frac{\partial\Phi}{\partial i}+\frac{\partial V}{\partial g}&=E\\
\frac{d}{dt}\frac{\partial T}{\partial\dot\theta}-\frac{\partial\left(T+W\right)}{\partial \theta}+\frac{\partial\left(\Pi+V\right)}{\partial \theta}&=Q
\end{align}
where


*

*$W=\frac12Li^2$ is the self-inductance term

*$V=\frac12\sum_{j=1}^N\int \epsilon E^2dV$ is the energy of the electric field

*$\Phi=\frac12Ri^2$ is the thermal dissipation in the resistor

*$T$ is the kinetic energy

*$\Pi$ the potential energy

*$E$ the emf

*$Q$ the generalized forces


which is slightly different from the Lagrangian mechanics you've come to know. 
In your case, $V=E=Q=0$, leaving
\begin{align}
\frac{d}{dt}\frac{\partial W}{\partial i}+\frac{\partial\Phi}{\partial i}&=0\\
\frac{d}{dt}\frac{\partial T}{\partial\dot\theta}-\frac{\partial\left(T+W\right)}{\partial \theta}+\frac{\partial\Pi}{\partial \theta}&=0
\end{align}
Inserting the forms of $W$, $\Phi$, $T$, and $\Pi$ you have returns the form of 2.2.2 from your book (it does for me, at least).
