Does an on-shell symmetry necessarily change the Lagrangian by a total derivative? This is a follow-up question to: Does a symmetry necessarily leave the action invariant?
Qmechanic writes here:

Here the word off-shell means that the Lagrangian eqs. of motion are not assumed to hold under the specific variation. If we assume the Lagrangian eqs. of motion to hold, any variation of the Lagrangian is trivially a total derivative.

Qmechanic writes here:

if an action (1) has a quasi-symmetry, then the EOM (2) must have a symmetry (wrt. the same transformation).



*

*What exactly is an off-shell symmetry? I'm now confused. Does it mean that the action changes by a boundary term but despite that, the transformation does not necessarily map a solution of the EOM to a solution of the EOM? That seems to contradict the second quote---or does it?

*What is the proof of the "trivial" fact that for an on-shell symmetry, the Lagrangian necessarily changes by a total derivative?
 A: Comments to the question (v1):


*

*Concerning the notion of on-shell and off-shell, see also Wikipedia and this Phys.SE post. In the context of an action formulation, on-shell means that the Euler-Lagrange (EL) equations 
$$\tag{1} \frac{\delta S}{\delta\phi^{\alpha}(x)}~\approx~0$$
are satisfied.

*It seems that the potential confusing point is the notion of an off-shell (quasi) symmetry of the action. This means that the action is invariant (changes with at most a boundary term) for an arbitrary
off-shell transformation, respectively. 

*Normally one does not stress the word off-shell in an off-shell quasi-symmetry. It is usually just called a quasi-symmetry. This is because an on-shell quasi-symmetry  [i.e. the property that the action at most changes with a boundary term when the EL equations are satisfied] is a tautology. It is always true. That's essentially because of how the EL equations were defined in the first place. In detail, an arbitrary infinitesimal variation of the action is of the form
$$\tag{2} \delta S ~\sim~\int\! d^nx~\frac{\delta S}{\delta\phi^{\alpha}(x)}~\delta_0\phi^{\alpha}~\approx~0. $$
Here the $\sim$ ($\approx$) symbol means equality modulo boundary terms (EL equations), respectively.

*Also note that some authors call a quasi-symmetry for a symmetry, and a symmetry for a strict symmetry, see e.g. this Phys.SE post.

*As to why an off-shell quasi-symmetry of the action $S$ induces a corresponding symmetry on the EL equations (1), see e.g this Phys.SE post.
