Point Transformation Math Question
I am trying to proof the classic problem to showcase Lagrangian's scalar invariant property.
Namely, that if you have $x_i = { x_1, ...., x_n; t }$ , you can then represent $L(x_1,....,\dot{x_1},...,t)$ and find the Euler-Lagrangian equations of motion: \begin{equation} \frac{d}{dt} ( \frac{\partial L}{\partial \dot{x_i}}) - \frac{\partial L}{\partial x_i} = 0. \end{equation}
Now, if you introduce a new set of coordinates $q_j = { q_1, ...., q_n; t }$, then you too can express the equations of motion via:
\begin{equation} \frac{d}{dt} ( \frac{\partial L}{\partial \dot{q_j}}) - \frac{\partial L}{\partial q_j} = 0. \end{equation} I know I have to show that indeed this is the case, thus showing $L$ is scalar invariant under point transformations.
Now here's my problem.
I am going to use the simplest example I know: you only have $x$ and $q$ - only one degree of freedom.
I can define $x(q,t)$ and $q(x,t)$.
I can find the differential as follows:
\begin{equation} dx = \frac{\partial x}{\partial q}dq + \frac{\partial x}{\partial t}dt \end{equation}
And thus, I can find $\dot{x}$:
\begin{eqnarray} \frac{dx}{dt}= \frac{\partial x}{\partial q} \frac{dq}{dt} + \frac{\partial x}{\partial t} \ \dot{x} = \frac{\partial x}{\partial q} \dot{q} + \frac{\partial x}{\partial t} \end{eqnarray}
I have read that you can turn that last equation into: \begin{equation} \frac{\partial \dot{x}}{\partial \dot{q}}= \frac{\partial x}{\partial q} + \frac{\partial}{\partial q}\frac{\partial x}{\partial t} \ \end{equation}
which would yield: \begin{equation} \frac{\partial \dot{x}}{\partial \dot{q}}= \frac{\partial x}{\partial q} \end{equation}
Here's my question:
I am not sure how to justify the change that yield this result. Because if I follow the equation closely, I would find this value: \begin{equation} \frac{\frac{dx}{dt}}{\frac{dq}{dt}} = \frac{\partial x}{\partial q} + \frac{d}{dq}\frac{\partial x}{\partial t} \end{equation}
What I am missing or doing wrong that yields the intended result in partials rather than the result I just wrote above? 101