# Hamilton Function

However, if the Lagrangian is time dependent the change in the Lagrangian with time would be \begin{align} \frac{d L}{dt}=\sum_i \frac{\partial L}{\partial q_i}\dot{q_i}+\frac{\partial L}{\partial \dot{q}_i}\ddot{q}_i+\frac{\partial L}{\partial t} \end{align} The time dependence would give an additional term \begin{align} \frac{d L}{dt}=\sum_i\frac{d}{dt} \left( \dot{q_i} \frac{\partial L}{\partial \dot{q}_i} \right)+\frac{\partial L}{\partial t} \end{align} so that the result is the time derivative of the Hamiltonian for a Dissipative System \begin{align} \frac{dH}{dt}=\frac{d}{dt}\sum_i\ \left( \dot{q_i} \frac{\partial L}{\partial \dot{q}_i} -L\right)=-\frac{\partial L}{\partial t} \end{align} $L$ is time dependent and the Hamiltonian is not conserved, but rather a function of time.