Control of underactuated mechanical systems via passivity-based and geometric techniques