I tried solving the [particle in a box problem] 1 and I came to a result that's different than what I find online. I solved the Schrödinger equation and I found the analytical form of $\psi$: $$ \psi(x) = Ae^{ikx} + Be^{-ikx}$$ Then $$ \psi(x) = Ae^{ikx} + Be^{-ikx} $$ Then I set the boundary conditions $$\psi(0)=0$$$$\psi(L)=0$$ $$\psi(0)=0\,\qquad \psi(L)=0$$ and find the relations $$A+B=0$$$$Ae^{ikL}+Be^{-ikL}=0$$ Then $$ A+B=0 \qquad Ae^{ikL}+Be^{-ikL}=0 $$ Then, substituting $B$ for $-A$, I get $$A(e^{ikL} - e^{-ikL}) =0$$ or $$e^{ikL}-e^{-ikL}=2isin(kL)=0$$ $$\psi(x) =2iAsin(kx)$$\begin{align}e^{ikL}-e^{-ikL}&=2i\sin(kL)=0\ ,\\ \psi(x) &=2iA\sin(kx) \end{align} I then try to normalize the wave function so that $$\int_0^L|\psi(x)|^2dx=4|A|^2\int_0^L sin^2(kx)dx=1$$$$\int_0^L|\psi(x)|^2dx=4|A|^2\int_0^L \sin^2(kx)dx=1$$ $$4|A|^2\frac{L} 2=1$$ $$A=±\frac{1}{\sqrt{2L} }$$ Which gives the final wave function: $$\psi(x) =\frac{2i}{\sqrt{2L}}sin(\frac{n\pi}{L}x)$$$$\psi(x) =\frac{2i}{\sqrt{2L}}\sin\left(\frac{n\pi}{L}x\right)$$ which is different from what I've found online: $$\psi(x) =\sqrt{\frac{2}{L}}sin(\frac{n\pi}{L}x)$$$$\psi(x) =\sqrt{\frac{2}{L}}\sin\left(\frac{n\pi}{L}x\right)$$ Am I doing something wrong in solving the problem? Is there more than one correct answer, and if so, why?