# Transform hamiltonian

I have got the following Quantum Hamiltonian:

$$H=\frac{p^{2}}{2m}+k_{1}x^{2}+k_{2}x+k_{3}$$

Which transformation can I use to change this Hamiltonian into an harmonic oscillator hamiltonian?

Note: $k_{1}, k_{2}$ and $k_{3}$ are constants.

-
Presumably $k_1,k_2,k_3$ are constants? If so complete the square in the $x$ terms. – Michael Brown Jan 2 '13 at 15:44
Yes, they are constants. – user15940 Jan 2 '13 at 15:52
$k_1 x^2 + k_2 x + k_3 = k_1 \left(x + a\right)^2 + b$ for some constants $a$ and $b$ which you can work out. Then introduce a shifted $x$ variable and your Hamiltonian reduces to a harmonic oscillator + a constant which you may or may not care about. – Michael Brown Jan 2 '13 at 15:57

$$H = \frac{p^2}{2m}+k_1 x^2 + k_2 x + k_3$$ Then add zero, $\frac{k_{2}^{2}}{4k_{1}}-\frac{k_{2}^{2}}{4k_{1}}$, and factor out a $k_1$, $$H = \frac{p^2}{2m}+k_1 \left( x+\frac{k_2}{2k_1} \right)^2 - \frac{k_{2}^{2}}{4k_{1}}+k_3$$ which is an oscillator hamiltonian with a shifted coordinate and a shifted energy, both by a constant.