# Some doubts about action symmetry

We know that Symmetry of the Lagrangian ($$\delta L = 0$$) always yields some conservation law.

Now, if $$\delta L \neq 0$$, that doesn't mean we won't have conservation law, because if we can show action is invariant, we can still get what gets conserved.

Let's look at this answer, I don't get the following.

He mentions that we have:

$$$$\frac{\partial L}{\partial q}K + \frac{\partial L}{\partial \dot{q}}\dot{K} = \frac{dM}{dt}.$$$$

To me, what $$M$$ represents to me is a total time derivative of some function $$M$$, so if we show that $$L' = L + \frac{d}{dt}M$$, we got action invariance and we will get something to be conserved.

1. The question is the author of the answer mentions that $$M$$ can be a function of $$q, \dot q, t$$ (note $$\dot q$$). I mean how can it be a function of $$\dot q$$?

2. In more detail: We know that action stays invariant if $$L$$ is changed by $$\frac{d}{dt} M(q,t)$$ when $$M$$ is a function of $$q, t$$, but if it's a function of $$\dot q$$, action won't stay invariant. Even in textbooks, I never saw such $$M$$ to be mentioned to be containing $$\dot q$$. Even Landau says the following: Check here. Could you shed some lights?

1. Note that the linked answer at the end considers the example of time-translation quasi-symmetry, where $$K=\dot{q}$$ and $$M(q,\dot{q})=L(q,\dot{q})$$ both do depend on $$\dot{q}$$.