Consider a quantum particle in a harmonic trap with a time-dependent frequency $\omega = \omega(t) \,.$ In atomic units ($$\hbar = m = 1$$), the Schrödinger equation describing this system reads $i \dot{\psi} = -\frac{1}{2} \psi'' + \frac{1}{2} \omega^2 x^2 \psi \,,$ where $$\psi = \psi(x,t)$$ is the particle's wave function, and $$\; '$$ and $$\dot{}$$ denote $$\frac{\partial}{\partial x}$$ and $$\frac{\partial}{\partial t}$$, respectively.
Let us look for solutions $$\psi$$ in the form of a Gaussian wave packet centered at the origin: $\psi = \left( \frac{2 \alpha}{\pi} \right)^{1/4} e^{-(\alpha + i \beta) x^2 + i \gamma} \,,$ where $$\alpha = \alpha(t)$$, $$\beta = \beta(t)$$, and $$\gamma = \gamma(t)$$ are yet unknown, real-valued functions. The wave packet is normalized to unity. We have \begin{align} \psi' &= -2 (\alpha + i \beta) x \psi \,, \\ \psi'' &= \big[ 4 (\alpha + i \beta)^2 x^2 - 2 (\alpha + i \beta) \big] \psi \,, \end{align} and $\dot{\psi} = \left( \frac{\dot{\alpha}}{4 \alpha} - (\dot{\alpha} + i \dot{\beta}) x^2 + i \dot{\gamma} \right) \psi \,.$ Substituting these derivatives into the Schrödinger equation, we obtain $i \frac{\dot{\alpha}}{4 \alpha} - i (\dot{\alpha} + i \dot{\beta}) x^2 - \dot{\gamma} = -2 (\alpha + i \beta)^2 x^2 + \alpha + i \beta + \frac{1}{2} \omega^2 x^2 \,.$ Balancing terms with the same power of $$x$$, we get the following system of two equations: $\left\{ \begin{array}{rl} - i (\dot{\alpha} + i \dot{\beta}) &\!\! = \; -2 (\alpha + i \beta)^2 + \omega^2 / 2 \\[0.1cm] i \dot{\alpha} / 4 \alpha - \dot{\gamma} &\!\! = \; \alpha + i \beta \end{array} \right.$ Separating the real and imaginary parts, we obtain a system of three linearly independent, real equations: $\left\{ \begin{array}{rl} \dot{\alpha} &\!\! = \; 4 \alpha \beta \\[0.07cm] \dot{\beta} &\!\! = \; -2 \alpha^2 + 2 \beta^2 + \omega^2 / 2 \\[0.07cm] \dot{\gamma} &\!\! = \; -\alpha \end{array} \right.$
We now use a reverse engineering approach to construct a breather type solution to the system above. Let us take $\alpha(t) = 1 + A \sin t \,,$ where $$0 < A < 1$$ is a parameter. From the first equation, it follows that $\beta(t) = \frac{\dot{\alpha}}{4 \alpha} = \frac{A \cos t}{4 (1 + A \sin t)} \,.$ Then, the third equation yields $\gamma(t) = -\int_0^t d\tau \, \alpha(\tau) = A (\cos t - 1) - t \,.$ Finally, the second equation determines the oscillator frequency: \begin{align} \omega(t) &= \sqrt{ 2 \dot{\beta} + 4 \alpha^2 - 4 \beta^2} \\[0.1cm] &= \sqrt{ 4 (1 + A \sin t)^2 - \frac{A \sin t}{2(1 + A \sin t)} - \frac{3}{4} \left( \frac{A \cos t}{1 + A \sin t} \right)^2 } \,. \end{align} A visualization of this solution with $$A = 1/2$$ can be found here.