Derivation of Euler-Lagrange equations from Newton's second law [duplicate]

I was thinking about this for some time and I wanted to clarify my question. Can the Euler-Lagrange equation be somehow derived from Newton's second law? Here's a possible way to do it: We start with Newton's second law for a non-relativistic point particle of mass $$m$$ under a conservative force, $$m \frac{\mathrm{d}^2 \vec{r}}{\mathrm{d} t^2}=-\nabla U$$. Converting this to index notation and choosing a Cartesian coordinate system, we have $$m \frac{\mathrm{d}^2 x^i}{\mathrm{d} t^2}=-\frac{\partial U}{\partial x_i}=\frac{\mathrm{d} p^i}{\mathrm{d} t},$$ where $$i \in \{1,2,3\}$$ and $$p^i=m\dot{x}^i$$.

Now define the quantity $$T=\frac{1}{2}m\dot{x}^j\dot{x}_j$$ (kinetic energy), and Einstein summation convention is used here. It is easy to see that $$p^i=\frac{\partial T}{\partial \dot{x}_i}=m\dot{x}^i.$$ Substituting this result into Newton's second law we obtain the relation $$\frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial T}{\partial \dot{x}^i}=-\frac{\partial U}{\partial x^i}.$$ Now, defining the function $$L=T-U$$, and since $$\frac{\partial U}{\partial \dot{x}^i}=0$$ and $$\frac{\partial T}{\partial x^i}=0$$, we arrive at the celebrated equation $$\frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial L}{\partial \dot{x}^i}=\frac{\partial L}{\partial x^i}.$$

Now, is this derivation valid? Can it be shown from this to be valid for all holonomic systems?

• I dont know about index notation, but wouldn't that only be valid for Cartesian coordinates?. It means we could not freely use this for any given system. I mean to say the real power of lagrangian formalism comes due to use of genralized coordinates. Commented Jan 2, 2021 at 7:45
• @Proxy well, I would be a nice excersise to redo this derivation in an arbitrary coordinate system. Commented Jan 2, 2021 at 7:57
• @Proxy Expressing motion in terms of generalized coordinates is an independent operation. Kevin Brown (on his site 'mathpages') has an article in which both are presented: demonstration of generalized coordinates and derivation from F=ma Lagrangian and Hamiltonian mechanics Commented Jan 2, 2021 at 8:03
• @cleonis ok I get it now, thank you for that. Commented Jan 2, 2021 at 9:31
• Poossible duplicate: physics.stackexchange.com/q/344720/2451 , physics.stackexchange.com/q/78138/2451 and links therein. Commented Jan 2, 2021 at 10:01