In Lagrangian mechanics we are introduced to point transformations or gauge transformations where the Lagrangian changes by a total time derivative:
\begin{equation} L'(q,\dot{q},t) = L(q,\dot{q},t)+\frac{df(q,t)}{dt}.\tag{1} \end{equation}
This is the most general transformation that leaves the Euler-Lagrange equations invariant. According to this paper the above transformation can also be expressed in terms of a coordinate transformation of the form:
\begin{equation} q' = q\tag{2}\end{equation} \begin{equation} p' = p + \frac{\partial f(q,t)}{\partial t}\tag{3}\end{equation}
with $q$ and $p$ the coordinate and canonical momentum and primes indicating the transformed coordinates. This transformation is proven to be canonical, i.e. it preserves the form of the Hamilton equations.
So we can prove that every gauge transformation of the Lagrangian (understood as the above kind of transformations) is canonical. However from what I understand the opposite is not true, i.e., I can find a coordinate transformation $q'(q,p,t)$ and $p'(q,p,t)$ that is canonical but for which the transformed Lagrangian cannot be expressed as the old one plus a time derivative (see first equation). This would mean that the Euler-Lagrange equations are not invariant under this coordinate transformation.
I would really like to find an example of such a transformation but so far I haven't had luck with the ones I've tried, and cannot seem to find any example online. Can anyone help me find an example?
EDIT: forgot the paper, here it is: https://arxiv.org/abs/1409.0692
EDIT 2: Apparently the question was not clear, I apologize for that. Let me provide an example of what I mean:
Consider the harmonic oscillator Hamiltonian
\begin{equation} H(q,p) = \frac{p^2}{2m}+\frac{m\Omega^2}{2}q^2 \tag{4} \end{equation}
and the coordinate transformation
\begin{equation} q' = -1/q \tag{5} \end{equation} \begin{equation} p' = p q^2 \tag{6} \end{equation}
It is straightforward to show that the following statements are true:
a) The equation of motion is $$\ddot{q} +\Omega^2 q = 0.\tag{7}$$
b) The canonical momentum fulfills $$p=m\dot{q}.\tag{8}$$
c) The coordinate transformation is canonical as it preserves Poisson brackets, $$\{q',p'\}_{q,p}=1.\tag{9}$$
d) The Lagrangian is given by $$L = p \dot{q}-H(q,p)= (m/2)(\dot{q}^2+\Omega^2q^2)\tag{10}$$ where we have used (b).
By directly transforming (a) we find the equations of motion in the transformed coordinates to be
\begin{equation} \ddot{q}'=\Omega^2q'+\frac{2\dot{q}'^2}{q'}.\tag{11} \end{equation}
Of course since the coordinate transformation is canonical we find the same equation by using Hamilton's equations with the transformed Hamiltonian \begin{equation} H'(q',p')=\frac{q'^4p'^2}{2m}+\frac{m\Omega^2}{2q'^2}.\tag{12} \end{equation} My question now is whether the Euler-Lagrange equations are also invariant under this coordinate transformation. To my understanding this is not guaranteed as there are canonical transformations which are not gauge transformations. To check this we build the transformed Lagrangian by inverse Legendre transform, \begin{equation} L' = p'\dot{q}'-H'(q',p') = \frac{m}{2}\left(\frac{\dot{q}'^2}{q'^4}-\frac{\Omega^2}{q'^2}\right).\tag{13} \end{equation} By applying the Euler-Lagrange equations to this Lagrangian, \begin{equation} \frac{d}{dt}\frac{\partial L'}{\partial \dot{q}'} = \frac{\partial L'}{\partial q}\tag{14} \end{equation} we obtain exactly the same equation of motion, \begin{equation} \ddot{q}'=\Omega^2q'+\frac{2\dot{q}'^2}{q'}.\tag{15} \end{equation} From this we conclude that the Euler-Lagrange equations hold in the transformed frame and thus it must be possible to write this canonical transformation as a total time derivative (see first equation in the post).
My questions are:
Does the above hold for arbitrary Hamiltonians and arbitrary canonical transformations? or equivalently, is there a canonical transformation for which the transformed Lagrangian does NOT obey Euler-Lagrange equations?
If the answer to the latter is yes, can you give an example?