Comparisons between the pendulum with varying length and the pendulum with oscillating support