  Here we consider the anharmonic oscillator that is a dynamical system given
by $y_{xx}+\delta y^{n}=0$. We demonstrate that to this equation corresponds a
new example of a superintegrable two-dimensional metric with a linear and a
transcendental first integrals. Moreover, we show that for particular values of
$n$ the transcendental first integral degenerates into a polynomial one, which
provides an example of a superintegrable metric with additional polynomial
first integral of an arbitrary even degree. We also discuss a general procedure
of how to construct a superintegrable metric with one linear first integral
from an autonomous nonlinear oscillator that is cubic with respect to the first
derivative. We classify all cubic oscillators that can be used in this
construction. Furthermore, we study the Li\'enard equations that are equivalent
to the anharmonic oscillator with respect to the point transformations. We show
that there are nontrivial examples of the Li\'enard equations that belong to
this equivalence class, like the generalized Duffing oscillator or the
generalized Duffing--Van der Pol oscillator.
