# Example of a transformation that is not canonical

Can someone please give me an example of a transformation that is not a canonical transformation?

• See my answer here for examples of non canonical transformations on the harmonic oscillator which are nonetheless used regularly in quantum optics: physics.stackexchange.com/questions/450187/… Dec 14, 2022 at 20:57

Hint: Canonical transformations are volume preserving in phase space according to Liouville's theorem. So e.g. a dilation $$Z^{I} = 2 z^I, \qquad I~\in~\{1,\ldots ,2n\},$$ is not a canonical transformation.

• In Goldstein, this sort of transformation would be called an extended canonical transformation (see Sec. 9.1). Dec 14, 2022 at 20:29
• $\uparrow$ Yes. Dec 14, 2022 at 20:36

Consider the transformation $x \mapsto x, p \mapsto v = \frac 1 m [p - qA(x)]$ where $A$ is a vector potential. Then $\{v,v\} = \frac q {m^2} v\times B$ where $\{\cdot,\cdot\}$ is Poisson bracket and $B = dA$ is the magnetic field, so this transformation is not canonical.

More concretely: With the Hamiltonian $H = (p-qA)^2/2m$, you find $\dot v_i = \frac q m (v\times B)_i$. If the form of Hamilton's equations is preserved, then $\dot v_i = -\partial K/\partial x_i$ where $K$ is the new Hamiltonian, the "Kamiltonian". But then $\partial_j \dot v_i$ must be a symmetric tensor, but this is not the case for arbitrary $B$.

One way is to spoil a canonical transformation. But in reality, canonical transformations are a very restricted subset of all possible transformations. Therefore, if you just 'randomly' pick a transformation, it is very likely not going to be canonical. All you have to do, once you picked it, is check that it is indeed not canonical, which you can do using the Poisson brackets.

## Discussion

For simplicity, we'll stick to the case of one degree of freedom (so one $$q$$ and one $$p$$). Also, I'll assume that we are only considering differentiable transformations with a differentiable inverse, at least in some open set in the $$q,\,p$$-plane. (If your transformation fails to be differentiable, or fails to be invertible, or fails to have a differentiable inverse, it will also not be canonical. But I assume you are asking for transformations that fail to be canonical for other reasons.) Finally, I will only consider restricted canonical transformations, i.e. those that don't involve time $$t$$ explicitly.

How to check if a transformation is canonical

Whether or not a transformation is canonical can be checked using the Poisson brackets (with respect to the old coordinate and momentum), $$\{Q,\,P\}=(\partial_{q}Q)(\partial_{p}P)-(\partial_{q}P)(\partial_{p}Q)$$. Namely, since the Poisson brackets are invariant under canonical transformations, and $$\{q,\,p\}=1$$, it follows that if a transformation $$q,\,p\to Q,\,P$$ is canonical, with $$Q$$ the new coordinate and $$P$$ the new momentum, then $$\{Q,\,P\}=1$$. Equivalently, if $$\{Q,\,P\}\neq 1$$, the transformation is not canonical. It turns out that the converse is true as well: if $$\{Q,\,P\}=1$$, the transformation is canonical.

There are other ways, see e.g. here, but this one is adequate for our purposes.

Spoiling a canonical transformation

For example, recall that there is a canonical transformation that, in effect, exchanges coordinates and momenta: $$Q=p$$ and $$P=-q$$. Indeed, if you compute the Poisson bracket, you get $$\{Q,\,P\}=1$$. Now, if we modify this transformation in some way, chances are, the result will not be a canonical transformation.

So, how about $$Q(q,p)=p$$ and $$P(q,p)=+q$$? Computing the Poisson bracket, we find that $$\{Q,\,P\}=-1$$, and thus this transformation is not canonical.

One can ask various further questions here. For example, if we want the new coordinate to be the old momentum ($$Q=p$$), what is the most general form of $$P(q,p)$$ so that the transformation $$q,\,p\to Q,\,P$$ is canonical, with $$Q$$ the new coordinate and $$P$$ the new momentum? Since the transformation is canonical if and only if the Poisson bracket is 1, we solve the equation $$\{Q,\,P\}=-\partial P/\partial q = 1$$. The solution is $$P(q,\,p)=-q+f(p)$$, where $$f(p)$$ is an arbitrary function of $$p$$. It follows that if $$P(q,\,p)$$ has any other form, the transformation will not be canonical. So, all of the following, and many more, fail to be canonical transformations:

$$Q(q,\,p)=p$$, $$P(q,\,p)=-q^3$$;
$$Q(q,\,p)=p$$, $$P(q,\,p)=q\,p$$;
$$Q(q,\,p)=p$$, $$P(q,\,p)=e^{q}$$;

and so on.

'Randomly' picking a transformation

As should be clear from the above, canonical transformations are a very restricted subset of all possible (differentiable and reversible) transformations. Thus, if you just take any old ('randomly chosen') transformation from $$q$$, $$p$$ to some $$Q(q,\,p)$$ and $$P(q,\,p)$$, it is extremely likely that it's not going to be canonical. So one 'method' of generating non-canonical transformations is to just try some crazy functions $$Q(q,\,p)$$ and $$P(q,\,p)$$, and compute their Poisson bracket. If the result isn't 1 (as will almost certainly turn out to be the case), voila, you have a non-canonical transformation. For example:

$$Q(q,\,p)=q^3$$, $$P(q,\,p)=p^3$$; $$\{Q,\,P\}=9\, q^{2} p^{2}\neq 1$$;
$$Q(q,\,p)=\arctan (q\,p)$$, $$P(q,\,p)=\tanh p$$; $$\{Q,\,P\}=p\frac{\text{sech}^{2}p}{1+q^{2}p^{2}}\neq 1$$.

And so on.

All reversible variable changes, especially those that help solve the differential equations, are good, although the "new" equations may not have a canonical form.