I'm trying to prove that the Euler-Lagrange equation $$\frac{d}{dt}(\frac{\partial L}{\partial \dot{q}_i})-\frac{\partial L}{ \partial q_i}=0$$ is invariant under an arbitrary change of coordinates $$q_i \rightarrow \bar{q}_i (q_1,...,q_n,t), \space \space\space i=1,...,n.$$
I performed a change of variables for the Euler-Lagrange equation and I ended up with the following equation (omitting intermediate steps): $$ \sum_k\{ \frac{d}{dt}(\frac{\partial L}{\partial \dot{\bar{q}}}_k )-\frac{\partial L}{\partial \bar{q}_k} \} \frac{\partial \bar{q}_k}{\partial q_i} =0.$$
What further argument can I make to say that $$ \frac{d}{dt}(\frac{\partial L}{\partial \dot{\bar{q}}}_k )-\frac{\partial L}{\partial \bar{q}_k} = 0?$$
I'm thinking along the lines of saying that $$\frac{\partial \bar{q}_k}{\partial q_i}$$ are independent functions and hence their coefficients have to be zero. But then why do they have to be independent?
Also, for the arbitrary change of coordinates, is it required for the $\bar{q}_i$ to be independent coordinates?