So I was reading this: Invariance of Lagrange on addition of total time derivative of a function of coordiantes and time and while the answers for the first question are good, nobody gave much attention to the second one. In fact, people only said that it can be proved without giving any proof or any.
So, if I have a Lagrangian and ADD an arbitrary function of $\dot{q}$, $q$ and $t$ in such a way that the equations of motion are the same, does this extra function MUST be a total time derivative?
EDIT Ok, I changed my question a little bit:
Question: If I have a function that obeys the Euler-Lagrange equation off-shell, this implies that my function is a time derivative? (This was used in Qmechanic's answer of this other question: Deriving the Lagrangian for a free particle, equation 14.)
Also, why people only talk about things that change the Lagrangian only by a total derivative? If this is not always the case that keeps the equation of motion the same, so why is it so important? And why in the two questions I posted about the same statement on Landau&Lifshitz's mechanics book only consider this kind of change in the Lagrangian?