  We study the problem of characterizing polynomial vector fields that commute
with a given polynomial vector field on a plane. It is a classical result that
one can write down solution formulas for an ODE that corresponds to a planar
vector field that possesses a linearly independent commuting vector field. This
problem is also central to the question of linearizability of vector fields.
Let $f \in K[x]$, where $K$ is a field of characteristic zero, and $d$ the
derivation that corresponds to the differential equation $\ddot x = f(x)$ in a
standard way. Let also $H$ be the Hamiltonian polynomial for $d$, that is
$H=\frac{1}{2}y^2-\int{f(x)dx}$. It is known that the set of all polynomial
derivations that commute with $d$ forms a $K[H]$-module $M_d$. In this paper,
we show that, for every such $d$, the module $M_d$ is of rank $1$ if and only
if $\text{deg}\; f\geqslant 2$. For example, the classical elliptic equation
$\ddot x = 6x^2+a$, where $a \in \mathbb{C}$, falls into this category.
