In my textbook, a wave traveling in the positive $x$-direction can be described using $$\psi(x,t)=Ae^{i(kx-\omega t+\phi)}. $$
I understand that the equation for a classical wave can be extrapolated by solving the differential equation associated with simple harmonic motion, giving us $\psi(x,t)=A\cos(kx-\omega t +\phi)$. I know Euler's identity is $e^{ix}=\cos(x)+i\sin(x)$. It would seem that we could simply equate $\psi(x,t)=A\cos(kx-\omega t +\phi)$ with $\Re (Ae^{i(kx-\omega t+\phi)})$ by omitting the $i\sin(kx-\omega t +\phi)$ term. My book seems to equate $\psi(x,t)=A\cos(kx-\omega t +\phi)$ to the entire complex version of the wavefunction $\psi (x,t) = Ae^{i(kx-\omega t+\phi)}$ with the stipulation that you can simply extract the real portion of the function when needed. It seems like these two functions should not be able to be equated for reasons described above. Is this a typo or am I not understanding this correctly?
Also, why in QM do we need to include the imaginary terms associated with the $i\sin(kx-\omega t +\phi)$ to get an accurate picture of the wave? Can the above relation only hold because it is derived from a wave associated with simple harmonic motion with classical not quantum waves?