Abstract. Two methods to change a quantum harmonic oscillator frequency without transitions in a finite time are described and compared. The first method, a transitionless-tracking algorithm, makes use of a generalized harmonic oscillator and a non-local potential. The second method, based on engineering an invariant of motion, only modifies the harmonic frequency in time, keeping the potential local at all times.