When you derive the Euler-Lagrange equation using D'Alembert's principle, you find that $$\frac{d}{dt}\frac{\partial L}{\partial \dot{q_j}}-\frac{\partial L}{\partial q_j}=Q_j$$ where $$Q_j=\vec{F}·\frac{d\vec{r}}{dq_j}$$ (Goldstein, p. 23-24). But if you use Hamilton's principle and some calculus of variations (Goldstein, p. 44 ff.), you only obtain the formula with $Q_j=0$. Is it possible to put the generalized forces into the Euler-Lagrange equation without deriving it from D'Alembert's principle? I tried to use some kind of lagrange multiplier to insert additional forces, but was not able to derive it.