In quantum physics, to be able to determine the energy levels of a particle in a box potential, you need an exact value for X(x) — not just one of the terms of the constants A and B. You have to use the boundary conditions to find A and B. What are the boundary conditions? The wave function must disappear at the boundaries of the box, so
X(0) = 0
X(Lx) = 0
So the fact that
![image0.png](https://www.dummies.com/wp-content/uploads/396988.image0.png)
tells you right away that B must be 0, because cos(0) = 1. And the fact that X(Lx) = 0 tells you that X(Lx) = A sin(kxLx) = 0. Because the sine is 0 when its argument is a multiple of
![image1.png](https://www.dummies.com/wp-content/uploads/396989.image1.png)
this means that
![image2.png](https://www.dummies.com/wp-content/uploads/396990.image2.png)
And because
![image3.png](https://www.dummies.com/wp-content/uploads/396991.image3.png)
it means that
![image4.png](https://www.dummies.com/wp-content/uploads/396992.image4.png)
That's the energy in the x component of the wave function, corresponding to the quantum numbers 1, 2, 3, and so on. The total energy of a particle of mass m inside the box potential is E = Ex + Ey + Ez. Following
![image5.png](https://www.dummies.com/wp-content/uploads/396993.image5.png)
you have this for Ey and Ez:
![image6.png](https://www.dummies.com/wp-content/uploads/396994.image6.png)
So the total energy of the particle is E = Ex + Ey + Ez, which equals this:
![image7.png](https://www.dummies.com/wp-content/uploads/396995.image7.png)
And there you have the total energy of a particle in the box potential.