pisto said:
Why? I'm missing something big here. Putting something in a box from a mathematical standpoint means setting the wave function to zero elsewhere, but not touching anything within and at the boundary of the box.
To see why we need boundary conditions, and why we need continuity of the wave function at the boundary, consider the classical mechanics problem of waves on a string. To solve this problem for a finite length of string you need to what is physically happening at the ends of the string. This knowledge of the physics enables you to write down boundary conditions, which are a prerequisite to solving the mathematical problem. You can tie the ends of the string down, corresponding to the boundary condition y(0) = y(L) = 0. You can tie the ends of the string together, making it a loop, corresponding to the boundary condition y(0) = y(L). You can attach the ends of the string to massless metal rings which slide freely on vertical rods, corresponding to something like y'(0) = y'(L) = 0. To answer the important question of what the normal modes of the string are, you need to know the physics of the boundaries, which when understood supply a mathematical prescription for the boundary conditions on y(x).
For instance, let us choose to tie the ends of the string down. Now we need to solve the differential equation (d^2 y/dt^2) = 1/c^2 (d^2 y/dx^2). How about the following solution: y(x, t) = C, an arbitrary constant displacement, for 0 < x < L, and 0 outside that range. Over the string's length this solves the equation of motion, doesn't it? It even obeys the boundary condition y(0) = y(L) = 0. But this is clearly not a physically reasonable solution: the string's displacement jumps discontinuously from 0 to L as you go from x=0 to x=epsilon. Real strings don't get into such states. We should also impose continuity on the string displacement y(x). Mathematically it is NOT enough simply to set y(x) = 0 outside 0 < x < L.
Similarly if you want to do the quantum mechanical problem of a particle in a finite box, the physics of the box boundary implies certain boundary conditions on psi(x). If you are confining the particle to a box by making the potential large outside the allowed region, this corresponds to psi(boundary) = 0. We must also remember continuity, so a plane wave within the box that cuts off discontinuously at the boundary is unphysical. Instead in this case the energy eigenstates look like sin(kx) with k chosen so that this vanishes on the boundary.
The periodic boundary conditions you are working with correspond to a particle moving on the boundary of a circle, so that x=0 and x=L are actually the same position; this circumstance then obviously requires psi(0) = psi(L), which are your boundary conditions.
pisto said:
This cannot happen with a plane wave, again, from a mathematical standpoint.
And indeed, when one's boundary conditions are psi(boundary) = 0, the plane waves exp[ikx] are not among the states one considers. You are using different boundary conditions, corresponding to a different physical situation.
pisto said:
This, at last, makes some sense. Even though I'm a beginner in QM, could you give me a glimpse of why this happen?
Avodyne obliquely referred to one reason. You can put a system in a box, of some sort, but if the system is much smaller than the box then it won't know the different between being in an extremely large box and being in free space. So you can consider it to be in a box or not and get the same result either way. For this reason the precise boundary conditions you use don't matter, since the system never sees the boundary. But imagining the system to be in a very large box can be convenient because then the energy and momentum eigenstates are discrete instead of continuous.