Consider 3d box of size $L$ with periodic boundary. Then the Schrodinger equation gives
\begin{align} \frac{d^2 \Psi}{d x_i^2} = -k_i^2 \Psi \end{align} thus we can set the solution in the following way.
Let consider $x$ axis only \begin{align} \Psi(x) = Ae^{ikx} + Be^{-ikx} \end{align} The periodic boundary condition gives $\Psi(0) = \Psi(L)$ which is lacks of solving schrodinger equation $i.e$ \begin{align} A+B = Ae^{ikL} + Be^{-ikL} \end{align} there are two variables and boundary condition only gives one constraints so we can not determine $A$, $B$.
What i know, for free particle, the boundary conditions $\Psi(0)= \Psi(L)=0$ gives two coefficients $A$, $B$ independently, and find quantization as \begin{align} kL = \pi m \quad \rightarrow \quad k = \frac{\pi m}{L} \end{align} for integer $m$.
But prof. says we can set plane waves as a solution \begin{align} \Psi(x) = A e^{ikx} \end{align} where $k$ runs negative to positive values. and imposing boundary condition it gives \begin{align} kL = 2\pi m \quad k = \frac{2\pi m}{L} \end{align} where $m$ is integer.
I don't understand why we only choose one particular basis.
Via web-searching i found similar content in see note section 8.1.d.
Can you explain why this works?