The study of confined particles is at the heart of any quantum physics textbook, including examples of particles moving in a harmonic oscillator potential well and of particles trapped in a box. Studying these examples constitutes a starting block to deepen our understanding of the quantum dynamics of more realistic systems.