For a centered box, the position wave function may be written including the length of the box as . Using a similar approach to that of the one-dimensional box, it can be shown that the wavefunctions and energies for a centered box are given respectively by where the two-dimensional wavevector is given by For a three dimensional box, the solutions are where the three-dimensional wavevector is given by: In general for an n-dimensional box, the solutions are The n-dimensional momentum wave functions may likewise be represented by and the momentum wave function for an n-dimensional centered box is then: An interesting feature of the above solutions is that when two or more of the lengths are the same (e.g. ), there are multiple wavefunctions corresponding to the same total energy. For example, the wavefunction with has the same energy as the wavefunction with . This situation is called degeneracy and for the case where exactly two degenerate wavefunctions have the same energy that energy level is said to be doubly degenerate. Degeneracy results from symmetry in the system. For the above case two of the lengths are equal so the system is symmetric with respect to a 90° rotation. More complicated wall shapes The wavefunction for a quantum-mechanical particle in a box whose walls have arbitrary shape is given by the Helmholtz equation subject to the boundary condition that the wavefunction vanishes at the walls. These systems are studied in the field of quantum chaos for wall shapes whose corresponding dynamical billiard tables are non-integrable. Applications Because of its mathematical simplicity, the particle in a box model is used to find approximate solutions for more complex physical systems in which a particle is trapped in a narrow region of low electric potential between two high potential barriers. These quantum well systems are particularly important in optoelectronics, and are used in devices such as the quantum well laser, the quantum well infrared photodetector and the quantum-confined Stark effect modulator. It is also used to model a lattice in the Kronig-Penney model and for a finite metal with the free electron approximation. Conjugated polyenes Conjugated polyene systems can be modeled using particle in a box. The conjugated system of electrons can be modeled as a one dimensional box with length equal to the total bond distance from one terminus of the polyene to the other. In this case each pair of electrons