Measuring position and momentum at the same time? In a non-relativistic quantum mechanical system in an infinite potential well. I try to measure the energy and the position of the system simultaneously. Since, the respective operators do commute according to Heisenberg's uncertainty relation I should be able to measure them both with infinite precision. Now, since I know that there is no potential energy in the well I can use $ E=\frac{p^2}{2m} $ since the potential energy is 0 and determine it's momentum provided I know it's mass. But I shouldn't be able know the momentum and position simultaneously with infinite precision! So where am I going wrong?    
 A: If you are considering a system of a single particle in a potential well with infinitely high walls and with finite width, the energy operator is
$ H = \frac{p^2}{2m} + V(x) $
where $ V(x) $ is the potential energy operator, vanishing inside the well and infinite outside it. Being that $ \frac{p^2}{2m} $ does not commute with $ x $, how are you saying that the energy and position operators commute?
Besides, if that were true than we could place a particle in any point inside the well and the particle would stay there forever.
A: 
I try to measure the energy and the position of the system
  simultaneously

The states with definite energy are not states with definite position so there is no particle state of both definite energy and definite position.
A: At the first look the question seemed very interesting, but later I found the mistake. You said you are measuring the position of the particle precisely. But how? You can tell that the particle is inside the well but you can not know the exact position of the particle. For more info read http://physicspages.com/2012/07/10/infinite-square-well-uncertainty-principle/
