Fractional powers of operators and Hamiltonian systems