I am currently studying the path integral formulation of quantum mechanics and have done a couple of problems (free particle and simple harmonic oscillator). Now, I am already done calculating the propagator for the simple harmonic oscillator and have shown that in the limit $\omega \rightarrow 0$ this gives the propagator of a free particle. I have stumbled on an article on Wikipedia (linked below) about this where it says that you could extract the energy levels of the h. o. from the propagator by comparing it to another representation of the propagator: \begin{aligned} K(x_{f},t_{f};x_{i},t_{i}) &= \left({\frac {m\omega }{2\pi i\hbar \sin \omega T}}\right)^{\frac {1}{2}}\exp {\left({\frac {i}{\hbar }}{\tfrac {1}{2}}m\omega {\frac {(x_{i}^{2}+x_{f}^{2})\cos \omega T-2x_{i}x_{f}}{\sin \omega T}}\right)} \\ &= \sum _{n=0}^{\infty }\exp {\left(-{\frac {iE_{n}T}{\hbar }}\right)}\psi _{n}(x_{f})^{*}\psi _{n}(x_{i}) \end{aligned}
This got me interested and I tried to follow the argumentation. The article seems to drop some details and I don't see how one arrives at the bottom. I would find it really interesting to see the full expression, as one should then be able to also extract the wave functions of all the excited states from this relation. Can someone maybe give me a hint to better understand what is going on in the end of this section?
Source: https://en.wikipedia.org/wiki/Path_integral_formulation#Simple_harmonic_oscillator