Stuck trying to prove conservation of energy Some notes. I've been playing around a bit with "Classical Mechanics Lite" to get a better understanding of exactly what's happening in terms of conservation laws, symmetries, and the seemingly derivative-like relationship between linear momentum $\mathbf p = m \mathbf v$ and kinetic energy $T = \frac{1}{2} m \dot{\mathbf x} \cdot \dot{\mathbf x}$. The reason I'm calling this "Classical Mechanics Lite" is because I'm working under the following assumptions:


*

*The coordinates $x_i$ are Cartesian coordinates (not generalized coordinates). 

*Since there's no coordinate curviture, I'm not worrying about distinguishing covariant and contravariant indices, as one would do in usual Classical Mechanics.

*Kinetic energy $T$ is strictly a function of the velocity variables $\dot x_i$ (again, because there is no curvature in the coordinates).

*Potential energy $U$ is strictly a function of the position variables $x_i$ (I'm not worrying about complicated potentials like the one for the Lorentz force).



Here's what I've found so far.


*

*The $i$th component of net force $m\ddot x_i$ can be written in terms of kinetic energy $T= \frac{1}{2} m \dot{\mathbf x} \cdot \dot{\mathbf x}$ in two ways. My sense is that each of these representations yields a conservation law under the proper conditions.
$$\displaystyle m\ddot x_i = \frac{d}{dt} \left( \frac{\partial T}{\partial \dot x_i} \right) \label{1}\tag{1}$$
$$\displaystyle m\ddot x_i = \frac{\partial}{\partial \dot x_i} \left( \frac{dT}{dt} \right) \label{2}\tag{2}$$

*Assuming we're only worried about conservative forces, then by definition of potential energy $U$, we have $m \ddot{\mathbf x} = - \mathbf \nabla U$, so 
$$ m\ddot x_i = -\frac{\partial U}{\partial x_i} \label{3}\tag{3}.$$

*Combining equations $\ref 1$ and $\ref 3$ gives conservation of momentum $p_i = \partial T / \partial \dot x_i$ when $-\partial U / \partial x_i = 0$, as expected. This explains the derivative relationship between momentum and kinetic energy.
$$0 = - \frac{\partial U}{\partial x_i} = \frac{d}{dt} \left( \frac{\partial T}{\partial \dot x_i} \right) \Rightarrow \boxed{p_i = \frac{\partial T}{\partial \dot x_i} \text{ is conserved}}$$

*Combining equations $\ref 2$ and $\ref 3$ almost give conservation of energy in general.
$$-\frac{\partial U}{\partial x_i} = \frac{\partial}{\partial \dot x_i} \left( \frac{dT}{dt} \right)$$
$$0 = \frac{\partial}{\partial \dot x_i} \left( \frac{dT}{dt} \right) + \frac{\partial U}{\partial x_i}$$
$$0 = \frac{\partial}{\partial \dot x_i} \left( \frac{dT}{dt} \right) + \frac{\partial}{\partial \dot x_i} \left( \frac{\partial U}{\partial x_k} \dot x_k \right)$$
$$0 = \frac{\partial}{\partial \dot x_i} \left( \frac{dT}{dt} \right) + \frac{\partial}{\partial \dot x_i} \left( \frac{dU}{dt} \right)$$
$$0 = \frac{\partial}{\partial \dot x_i} \left[ \frac{d}{dt} (T+U) \right] \label{4}\tag{4}$$
$$\text{(this is where I get stuck)}$$

My question.
Beyond equation $\ref 4$, I'm expecting to find $\frac{d}{dt} (T+U) = 0$, which would imply that $T+U$ is conserved. However, this cannot be directly deduced, even if taken to be true for all $i$s, since it could be possible to find a function $f$ such that
$$\frac{d}{dt}(T+U) = f(x,\ddot x,\dddot x, \ldots),$$
where $x$ represnts all of the $x_i$s, $\ddot x$ represents all of the $\ddot x_i$s, etc, and still have the relationship in equation $\ref 4$ satisfied. What additional assumption (ideally rooted in some sort of physical principle or intuition) would need to be taken in order to deduce conservation of energy $T+U$? I feel like just plainly assuming that $f = 0$ is too big of a jump, and isn't based in any sort of physical principle or intuition.
 A: Maybe I'm not seeing the problem, I will gladly delete this if that is the case, but you do not need to assume anything additional. If you use your Eq. (3) this is what you get
$$
\frac{{\rm d}}{{\rm d}t}(T + U) = m \ddot{x}_k \dot{x_k} + \frac{\partial U}{\partial x_k}\dot{x}_k = \left[ m\ddot{x}_k - m\ddot{x}_k \right]\dot{x}_k = 0
$$
So Eq. (4) is just a trivial $0 = 0$, which is completely consistent
A: Unfortunately, you've made a fatal error at the very first step! It's wrong to interchange the $d/dt$ and $\partial / \partial \dot{x}_i$. This quickly leads to absurdities, such as in this question where the OP concludes the Euler-Lagrange equation is trivial. This point isn't explained well in most textbooks; for a related question see here. I'll explain why briefly, then show a derivation like yours that works.

In your setup, $T$ is a function of the two independent variables $q$ and $\dot{q}$, with no explicit dependence on time. To take a time derivative, you must restrict to a specific path 
$$q(t) = \gamma(t), \quad \dot{q}(t) = \frac{d\gamma(t)}{dt}.$$
In other words, the time derivative really means
$$\frac{dT}{dt} \equiv \frac{d}{dt} T\left( \gamma(t), \frac{d\gamma(t)}{dt} \right).$$
Then $dT/dt$ is solely a function of $t$ and the path $\gamma$. It is no longer a function of $q$ and $\dot{q}$, so taking the partial derivative with respect to $\dot{q}$ doesn't even make any sense. The manipulations leading up to your equation (4) similarly don't make sense. 
A big part of the confusion is that usually the path $\gamma(t)$ is written as $q(t)$, so a function of a path $q(t)$ looks unfortunately similar to a function of the variables $q$ and $\dot{q}$. Compounding the confusion, the Lagrangian can also have direct dependence on $t$ (in addition to $q$ and $\dot{q}$), but this still isn't the same as depending on the path $q(t)$. It's a big mess that's confused many students.

Here's a different way to do it, which stays true to the spirit of your derivation. By the chain rule,
$$\frac{dE}{dt} = \frac{\partial T}{\partial \dot{q}} \frac{d \dot{q}}{dt} + \frac{\partial U}{\partial q} \frac{dq}{dt}.$$
Now, applying the equation of motion 
$$\frac{d}{dt} \frac{\partial T}{\partial \dot{q}} = - \frac{\partial U}{\partial q}$$
we have
$$\frac{dE}{dt} = \ddot{q} \frac{\partial T}{\partial \dot{q}} - \dot{q} \frac{d}{dt} \frac{\partial T}{\partial \dot{q}}.$$
However, because $T$ is only a function of $\dot{q}$, so is $\partial T / \partial \dot{q}$, so by the chain rule again,
$$\frac{dE}{dt} = \ddot{q} \frac{\partial T}{\partial \dot{q}} - \dot{q} \frac{d\dot{q}}{dt} \frac{\partial}{\partial \dot{q}} \frac{\partial T}{\partial \dot{q}} = \ddot{q} \left(1 - \dot{q} \frac{\partial}{\partial \dot{q}} \right) \frac{\partial T}{\partial \dot{q}}.$$
However, because $T$ is quadratic in $\dot{q}$, $\partial T / \partial \dot{q}$ is linear in $\dot{q}$. That means that differentiating with respect to $\dot{q}$ and then multiplying by $\dot{q}$ again does nothing, so $dE/dt = 0$ as desired.
Of course, as the existing answer says, it would be much faster to get this result if we just used the fact that $T$ was quadratic from the beginning, but I figured you wanted a derivation that used some of the partial derivative machinery.
