I tried solving the particle in a box problem 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 I set the boundary conditions $$\psi(0)=0$$$$\psi(L)=0$$ and find the relations $$A+B=0$$$$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)$$ 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$$ $$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)$$ which is different from what I've found online: $$\psi(x) =\sqrt{\frac{2}{L}}sin(\frac{n\pi}{L}x)$$ Am I doing something wrong in solving the problem? Is there more than one correct answer, and if so, why?