I wish to find the exact energy levels of the following perturbed hamiltonian. $$\hat{H}=\frac{p^2}{2m}+\frac{m\omega^2}{2}x^2+\alpha x+\beta p^2.$$
I believe that it can be solved by using the destruction/creation operators, $$\hat{x}=\sqrt{\frac{\hbar}{2m\omega}}(\hat{a}+\hat{a}^\dagger)$$ $$\hat{p}=\sqrt{\frac{m\omega\hbar}{2}}i(\hat{a}^\dagger-\hat{a})$$ However, as it is rather tedious calculation, I want to use the following method: I complete the square and factorize by $p^2$ $$\hat{H}=\frac{p^2}{2m}(1+2m\beta)+\frac{m\omega^2}{2}(x^2+\frac{2}{m\omega^2}\alpha x)$$.
$$\hat{H}=\frac{p^2}{2m}(1+2m\beta)+\frac{m\omega^2}{2}(x+\frac{2}{m\omega^2}\alpha)^2-\frac{\alpha^2}{m^2\omega^4}$$.
Now I introduce $\tilde{p}^2=p^2(1+2m\beta)$ and $\tilde{x}=x+\frac{2}{m\omega^2}\alpha$ and the Hamiltonian is thus: $$H=\frac{\tilde{p}^2}{2m}+\frac{m\omega^2}{2}\tilde{x}^2-\frac{\alpha^2}{m^2\omega^4}$$
Thus, the energy levels would be $$E_n=\hbar\omega(n+\frac{1}{2})-\frac{\alpha^2}{m^2\omega^4}$$
My question is, is this method correct? I know it works when there is a perturbation that depends on x, but I am not sure if it works now that the perturbation involves a term with momentum.