Problem with length contraction I'm trying to understand why I am getting problems with the demonstration of length contraction using the Lorentz transformations.
Suppose you have two systems of reference $S$ and $S'$, with $S'$ moving in the positive $x$-direction with respect to $S$. You also have a rod at rest in $S$, whose endpoints are $x_1$ and $x_2$.
In $S$, you have the proper length, and we can write
$$L=x_2-x_1.$$
Using Lorentz transformations, we get
$$L=x_2-x_1=\gamma(x_2'-vt_2')-\gamma(x_1'-vt_1')=\gamma[(x_2'-x_1')-v(t_2'-t_1')].$$
Now I suppose that the measurements of $x_1'$ and $x_2'$ are done at the same time in $S'$, so that $t_1'=t_2'=t'$, so we conclude
$$L=\gamma(x_2'-x_1')=\gamma L'.$$
It says that the proper length $L$ is bigger than $L'$, and that's expected. The real problem starts now.
For me, it's fair enough to state that the length $L'$ measured in $S'$ is given by (here $L'$ isn't a proper length)
$$L'=x_2'-x_1'.$$
Using the Lorentz transformation,
$$L'=x_2'-x_1'=\gamma(x_2+vt_2)-\gamma(x_1+vt_1).$$
Since $t_1=t_2=t$ at the moment of the measurement in $S$, we can simplify this expression to
$$L'=\gamma(x_2-x_1)\implies L=\frac{L'}{\gamma}.$$
And now we are saying that the proper length is smaller than the non-proper length? I don't know where I'm making a mistake.
 A: 
Since $t_1=t_2=t$ at the moment of the measurement in S, we can simplify this expression

This is the problem. $t_1=t_2$ but $t’_1 \ne t’_2$. So your $L’$ is not the length of the object in the primed frame. It is the distance between two events that do not occur at the same time. To measure length in the primed frame you need two events such that $t’_1 = t’_2$
A: In SR we can measure the spacetime coordinates of events and convert those measurements between reference frames. If we try to ignore time coordinates (by trying to compare length measurements from different frames without also comparing our time measurements), we are doomed to confusion.
Imagine you attach a light to each end of the bar, and flash the lights simultaneously in frame S. In frame S’ they will measure the flashes separated by a distance which is greater than L but also separated by some time.
If the lights are instead flashed so that they appear simultaneous in frame S’, then in S’ they will now be separated by a distance less than L.  Meanwhile, in frame S, these flashes will still be separated by a distance L, but they will now be separated by some time.
The conundrum you put yourself in was obtained by not being consistent about which events you were measuring between.  We like to measure lengths by comparing simultaneous position measurements in our frame, but those endpoints will not be simultaneous in other frames!
If you want to really get a handle on this stuff, you will eventually need to read about intervals and Minkowski space.  Start by getting comfortable thinking in terms of events, though.
A: Length contraction is a consequence of the timing of measurements. If you and a friend are some distance apart on a platform, and you each note the position of either end of a passing train, you will calculate its length correctly if you make your observations at exactly the same time. If you note the position of the front of the train slightly before your friend notes the position of the rear of the train, then the rear of the train will have travelled forward somewhat between the two observations, as a result of which the moving train will seem shorter than its true length.
The same effect accounts for length contraction in relativity, since observations of each end of a moving object which are simultaneous in one frame will be observations of the object at two different times in its rest frame, so in the rest frame the object actually moves forward somewhat between the two separate observations.
In your question, you have correctly applied the formulae, but you have misinterpreted what you are doing. You start with an object, say it's a stick, of length L and you find it seems a shorter length, L', in S'. Now suppose you had measured L' using a ruler of exactly the length L'. L' is the proper length of the ruler in S', so if you view the ruler from S you will find that it is shorter than L', not longer, which is the result you found.
A: Problem is not in your reasoning but in theory of realtivity and lorentz transformation. For first part, where length of rod is given by coordinates of frame in which rod is, gives correct answer but not feasible. Let see,
$L=L_0=x_2-x_1=\gamma[(x'_2-x'_1)-v(t'_2-t'_1)]\implies L_0=\gamma L\Rightarrow L=\frac{L_0}{\gamma}\quad \text{if}\quad t'_2=t'_1$
which is not possible for a frame moving with relative speed. Some texts and books forcefully take liberty of assuming that both ends of a moving object measured simultaneously.
For second part, length of given rod is feasible but answer is incorrect or length elongation instead of contraction. But reasoning is still incorrect. Let see,
$L'=x'_2-x'_1=\gamma[(x_2-x_1)+v(t_2-t_1)]\implies L'=\gamma L_0\quad \text{if}\quad v(t_2-t_1)=0$
Above it doesn't mean that $t_2=t_1$, which is also not possible unless devise some mechanism. But it is feasible to measure length of object in $S$ frame because object is at rest and doesn't have relative speed, $v$ with frame. But this still multiply $\gamma$ with length, which is not the case in classical relativity with galilean transformation.
