Derivatives of the Lagrangian $L=L(x, \dot x , t)$ Let me say I consider this a mathematics post, not a physics one -- correct me if I'm wrong.
In Lagrangian Mechanics we consider the Lagrangian function, which is a function of the position, the velocity and time $L(x, \dot x,t)$. In arbitrary coordinates it has the form $L= L (q, \dot q,t) $ (where $q$ is a vector if we have a problem in $2$ or $3$ dimensions). Suppose we change the coordinate system to $q'=f(q,t)$ so that $\dot {q'}={\partial f \over \partial q} \dot q + {\partial f \over \partial t}$. 
Then we get a new Lagrangian by 
$$L'\left(q', \dot q',t\right)=  L'\left(f(q,t),{\partial f \over \partial q} \dot q + {\partial f \over \partial t},t\right) = L(q,\dot q,t).$$
We know these two Lagrangians describe the same system, when the Euler-Lagrange equations are implemented on them (a bit a grammar issue here maybe- sorry).
These two functions are different, but for a given time $t$, their values coincide.
I want to show that $$ {d \over dt} \left({ \partial L \over \partial{\dot q}}\right) - {\partial L \over \partial q} = {\partial f \over \partial q} \left[ {d \over dt} \left( { \partial L' \over \partial{ \dot q'}}\right) -{ \partial L' \over \partial q'}\right] \space \space (1)$$
So my question is how do I approach this? The functions $L$, $L'$ are not equal (as functions), I only have a relation between the values of them in time $t$. More specifically how can I use the chain rule for a function like $L'$, what are the partial derivatives and what's its time derivative? I'm not so much interested in showing $(1)$ as I'm interesting in knowing how to find these derivatives.
 A: Ok first we use the chain rule:
\begin{align*}
 \frac{\partial L}{\partial \dot q} &= \frac{\partial L'}{\partial q'} \frac{\partial q'}{\partial \dot{q}} + \frac{\partial L'}{\partial \dot{q}'} \frac{\partial \dot{q}'}{\partial \dot q} + \frac{\partial L'}{\partial t} \frac{\partial t}{\partial \dot q}\\
 &= \frac{\partial L'}{\partial q'} 0 + \frac{\partial L'}{\partial \dot{q}'} \frac{\partial \dot{q}'}{\partial \dot q} + \frac{\partial L'}{\partial t} 0\\
 &= \frac{\partial L'}{\partial \dot{q}'} \frac{\partial f}{\partial  q},
\end{align*}
since $\dot q ' = \frac{\partial f}{\partial q} \dot q + \frac{\partial f}{\partial t}$.
Using the same line of argument we can show that:
\begin{align*}
  \frac{\partial L}{\partial q} &= \frac{\partial L'}{\partial q'} \frac{\partial f}{\partial q} + \frac{\partial L'}{\partial \dot q'} \frac{\partial \dot q'}{\partial q}\\
 &= \frac{\partial L'}{\partial q'} \frac{\partial f}{\partial q} + \frac{\partial L'}{\partial \dot q'} \left(\frac{\partial^2 f}{\partial q^2}\dot q + \frac{\partial^2 f}{\partial q \partial t} \right)
\end{align*}
Now let calculate $\frac{d}{dt} \frac{\partial L}{\partial \dot q} $:
\begin{align*}
 \frac{d}{dt} \frac{\partial L}{\partial \dot q} &= \frac{d}{dt} \left( \frac{\partial L}{\partial \dot q}\right) \frac{\partial f}{\partial q}+ \frac{\partial L'}{\partial \dot q'} \left(\frac{\partial^2 f}{\partial q \partial t} + \frac{\partial^2 f}{\partial q^2} \dot q\right)
\end{align*}
Finally equating $\frac{d}{dt} \frac{\partial L}{\partial \dot q}$ with $\frac{\partial L}{\partial q}$ we get that:
\begin{align*}
 \frac{d}{dt} \left( \frac{\partial L}{\partial \dot q}\right) \frac{\partial f}{\partial q} = \frac{\partial L'}{\partial q'} \frac{\partial f}{\partial q} ,
\end{align*}
 as we wanted.
