<p style='text-indent:20px;'>In the context of underactuated Hamiltonian systems defined by simple Hamiltonian functions, the matching conditions of the energy shaping method split into two decoupled subsets of equations: the <i>kinetic</i> and <i>potential</i> equations. The unknown of the kinetic equation is a metric on the configuration space of the system, while the unknown of the potential equation are the same metric and a positive-definite function around some critical point of the Hamiltonian function. In this paper, assuming that a solution of the kinetic equation is given, we find conditions (in the <inline-formula><tex-math id="M1">\begin{document}$ C^{\infty} $\end{document}</tex-math></inline-formula> category) for the existence of positive-definite solutions of the potential equation and, moreover, we present a procedure to construct, up to quadratures, some of these solutions. In order to illustrate such a procedure, we consider the subclass of systems with one degree of underactuation, where we find in addition a concrete formula for the general solution of the kinetic equation. As a byproduct, new global and local expressions of the matching conditions are presented in the paper.</p>