  In this paper we \emph{explicitly} compute the transformation that maps the
generic second order differential equation $y''= f(x, y, y')$ to the Painlev\'e
first equation $y''=6y^2+x$ (resp. the Painlev\'e second equation ${y''=2
y^{3}+yx+ \alpha}$). This change of coordinates, which is function of $f$ and
its partial derivatives, does not exist for every $f$; it is necessary that the
function $f$ satisfies certain conditions that define the equivalence class of
the considered Painlev\'e equation. In this work we won't consider these
conditions and the existence issue is solved \emph{on line} as follows: If the
input equation is known then it suffices to specialize the change of
coordinates on this equation and test by simple substitution if the equivalence
holds. The other innovation of this work lies in the exploitation of discrete
symmetries for solving the equivalence problem.
