# Quantum harmonic oscillator - Where am I going wrong?

Find the relationship between $a_+\psi_n$ and $\psi_{n+1}$

My attempt:

I was able to prove that

$\int{(a_+\psi)^*(a_+\psi)dx} = \int{\psi^*({a_-a_+\psi})dx}\qquad\qquad (1)$

And,

$(a_-a_+-\frac{\hbar\omega}{2})\psi = E\psi \qquad\qquad \qquad\qquad\qquad(2)$

Therefore from $(1)$ and $(2)$

$\int{(a_+\psi)^*(a_+\psi)dx}$ $= \int{\psi^*}(E+\frac{\hbar\omega}{2})\psi dx$ $=(E+\frac{\hbar\omega}{2})\int{\psi^*}\psi dx$ $= (E+\frac{\hbar\omega}{2})$

$a_+\psi_n$ is proportional to $\psi_{n+1}$

So, $a_+\psi_n = c_n\psi_{n+1}$

Normalising on both sides

$\int{|a_+\psi_n|^2 dx} = \int{|c_n\psi_{n+1}|^2}dx$

$E_n+\frac{\hbar\omega}{2} = |c_n|^2$

but, $E_n = (n + \frac{1}{2})\hbar\omega$

Therefore

$c_n = \sqrt{(n+1)\hbar\omega}$

But the answer given in book is

$c_n = i\sqrt{(n+1)\hbar\omega}$

A similar result I got for $a_-\psi_n$ and $\psi_{n-1}$ is

$c_n = \sqrt{n\hbar\omega}$

But the answer given in book is

$c_n = -i\sqrt{n\hbar\omega}$

And the reason given for these answers is "$i$'s are there to make the wavefunction real"

Please help me understand this statement or point out where I've gone wrong in proving the given equation

Your answer is perfectly fine. As you can see one can choose an abritrary phase $\exp(i\phi)$ for $c_n$ in the equation $$E_n + \frac{\hbar \omega}{2} = |c_n|^2$$ and it will still hold. This relates to the fact that you can always choose an arbitrary phase for the eigenfunctions $\psi_n$. All physical observables (e.g. $A_{nn} =\langle \psi_n|\hat{A}|\psi_n\rangle$) are invariant under the choice of the phase. In your book they just chose it to their convenience.
Recall that states or wave-functions are only defined up to an overall phase, i.e. $\psi(x)$ and $e^{i \alpha(x)} \psi(x)$ are both wave-functions that describe the same state. The wave-function generically is a complex function of the form $\psi = f(x) e^{i h(x)}$ where $f(x)$ and $h(x)$ are real functions. It is then often convenient to make a choice of the phase $\alpha(x) = - h(x)$ so that $e^{i \alpha(x)} \psi(x) = f(x)$ is real. This is an completely equivalent and good definition of the quantum state since all we have done is changed the wave function by a phase.
This is what your book is doing. They are making a choice of the phase so that all wave-functions $\psi_n$ turn out to be real.