# Lagrangian for a forced system [closed]

Suppose that for a non-forced system Lagrange's equations are $$\begin{equation*} \left\{ \begin{array}{l} m\ddot{x}+\left( k_{1}+k_{2}\right) x-k_{2}y+2c_{1}\dot{x}=0 \\ m\ddot{y}-k_{2}x+\left( k_{2}+k_{3}\right) y+2c_{2}\dot{y}=0.% \end{array}% \right. \end{equation*}$$

But if the system is subject to external forces, say $$F_{x},$$ $$F_{y}$$, which would be the Lagrangian in this case? Can we add $$F_{x},$$ $$F_{y}$$ in the right-hand sides?

The short answer is yes: when the system is not conservative because of dissipation or driving, one must include generalized forces on the right hand side of the usual EL equation: \begin{align} \frac{d}{dt}\frac{\partial L}{\partial \dot q_k}-\frac{\partial L}{\partial q_k}={\cal F}_k\, , \end{align} where $${\cal F}_k$$ is the generalized force on the (generalized) coordinate $$k$$.
You have already included damping so you need to include the driving term, again “by hand”. In the simplest example of a harmonic force on a 1d system, the equations of motion would then be of the form \begin{align} \ddot{x}+\frac{\omega_0}{Q}\dot{x}+\omega_0^2 x = A\cos(\omega t) \end{align} where for a force $$F_0\cos(\omega t)$$ and $$A=F_0/m$$.