\section{Length Contraction}
With proper time and distance done, we can now tackle length contraction easily! Length contraction is weird because different parts of our object will now be experiencing different times.

\problem{}
Suppose that you (at rest) see a rod of length $L$ moving at speed $v$.

\makeatletter
\if@solutions\else
	\halfdiagramc{you}
\fi
\makeatother

\begin{enumerate}
	\item Using the provided grid, draw a spacetime diagram where the left side of the rod is at $x = 0$ at $t = 0$.

	\item When we switch to the rod's reference frame, space gets rotated. Draw a line in the rod's reference frame which represents the rod at time $t' = 0$, when the left side is at $x' = 0$. Call the right side of the rod at this time $P$.

	\item Switching back to your reference frame, what are the spacetime coordinates $(ct,x)$ of $P$?
	\vfill

	\item Use the formula for proper distance to compute the length $L'$ of the rod in its own reference frame.
	\vfill

	\item Which is larger, $L'$ or $L$? Do moving objects shrink?
	\vspace{30pt}
\end{enumerate}

\begin{solution}
	\begin{center}
		\begin{tikzpicture}[scale=1.5]
			%\def\R{2*\xmax} % radius of clip
			%\clip (-\xmin,\R) |- (\R,-\xmin) arc(0:90:\xmin+\R);

			% AXES
			\def\xmin{0.2}
			\def\xmax{2.6}
			\def\ang{33.5}  % angle between x and x' axes
			\def\Nlines{12} % number of world lines (at constant x/t)
			\def\DNy{1}     % difference in number of world lines of y axis (lengthen)
			\def\DNxp{-6}   % difference in number of world lines of x' axis (shorten)
			\def\DNyp{-2}   % difference in number of world lines of y' axis (shorten)
			\def\xplabelang{170} % anchor angle of x' axis label
			\axes

			% SETTINGS
			\pgfmathsetmacro\Lz{4*\D} % proper/rest length L0 of ladder in S'
			\pgfmathsetmacro\L{cos(2*\ang)/cos(\ang)*\Lz} % contracted length L in S
			\pgfmathsetmacro\yminb{-0.7*\xmin} % ymin of barn in S
			\pgfmathsetmacro\xb{4.96*\d} % x coordinate of barn in S
			\pgfmathsetmacro\wb{3.08*\d} % width of barn in S
			\pgfmathsetmacro\yA{(\xb+0.04*\d)/tan(\ang)} % y = ct coordinate when ladder is fully in barn in S
			\coordinate (L) at (\L,0); % ladder end in S
			\coordinate (L') at (\ang:\Lz); % ladder end in S'
			\coordinate (A) at (90-\ang:{(\xb+0.04*\d)/sin(\ang)}); % left end of ladder when fully in barn
			\coordinate (B) at ($(A)+(\L,0)$); % right end of ladder when fully in barn
			\coordinate (C) at (90-\ang:{(\xb+\wb+0.08*\d)/sin(\ang)}); % left end of ladder when fully passed through barn

			% FILL
			\begin{pgfonlayer}{back} % draw on back (behind axes)
			% \fill[mydarkblue!22] % barn frame
			%   (\xb,\yminb) rectangle (\xb+\wb,\ymax);
			\fill[mylightred] % ladder frame
			(90-\ang:-\xmin) -- (90-\ang:\ymaxp) --++ (\ang:\Lz) -- (L) --++ (90-\ang:-\xmin) -- cycle;
			% \begin{scope}
			%   \clip (0,0) rectangle(1.3*\xmax,\ymax+0.2);
			%   \draw[myredhighlight,line width=3.1] % highlight simultaneity in S'
			%     (A)++(\ang:{-\xb/cos(\ang)-0.05}) --++ (\ang:\xmax+3.6*\D)
			%     (B)++(\ang:{-\xb/cos(\ang)-0.05-\Lz}) --++ (\ang:\xmax+3.8*\D);
			%   \draw[mypurplehighlight,line width=3.1] % highlight simultaneity in S
			%     (0,\yA) --++ (\xmax+0.8*\d,0);
			% \end{scope}
			\end{pgfonlayer}
			% \draw[->,thick,mydarkblue] % barn left door
			%   (\xb,\yminb) -- (\xb,\ymax+0.15);
			% \draw[->,thick,mydarkblue] % barn right door
			%   (\xb+\wb,\yminb) -- (\xb+\wb,\ymax+0.15);
			\draw[->,thick,mydarkbrown] % rod left end
			(L)++(90-\ang:-\xmin) -- (L) -- (L') --++ (90-\ang:\ymaxp+0.2);

			% LADDER
			\draw[rod] (O) -- (L')
			node[pos=0.55,above=2,scale=0.8] {\contour{mylightred}{$L'$}};
			\draw[rod] (O) -- (L)
			node[pos=0.46,below=1,scale=0.8] {$L$};

			% % LADDER IN BARN
			% \draw[rod] (A) --++ (L');
			% \draw[rod] (B) --++ (\ang:-\Lz);
			% \draw[rod] (A) --++ (L);

			% % LADDER RIGHT OF BARN
			% \draw[rod] (C) --++ (L');
			% \draw[rod] (C) --++ (L);

			% LABELS
			% \node[mydarkblue,below=0,align=center,scale=0.8,yshift=1] at (\xb+\wb/2,0)
			%   {barn\\$L$};
			% \node[mydarkpurple,right,align=left,scale=0.65,yshift=1.2] at (\xb+3.6*\d,\yA)
			%   {both doors closed in S};
			%   %{both doors\\[-3]close in S};
			% \node[mydarkred,right,scale=0.65,yshift=1.8,rotate=\ang] at ($(A)+(\ang:\Lz+0.8*\D)$)
			%   {left door closed in S$'$};
			% \node[mydarkred,right,scale=0.65,yshift=0.7,rotate=\ang] at ($(B)+(\ang:0.8*\D)$)
			%   {right door closed in S$'$};
		\end{tikzpicture}
	\end{center}

	We want to calculate the spacetime position of the right side side of the rod when the left side is at the origin.

	In the rest frame, the equation for the right edge of the rod is $x = vt + L$.
	The equation for the spatial axis of the rod's rest frame is $c^2t = vx$.

	This implies that they intersect at $ct = \frac{cvL}{c^2 - v^2}$ and $x = \frac{L}{1-v^2/c^2}$.

	Calculating the proper length between the left and right side of the rod, we find that
	\begin{align*}
		L' = \chi = \sqrt{\frac{c^4L^2}{(c^2 - v^2)^2} - \frac{c^2 v^2 L^2}{(c^2 - v^2)}}
		= L\sqrt{\frac{c^2(c^2 - v^2)}{(c^2 - v^2)^2}}
		= \frac{L}{\sqrt{1 - v^2/c^2}}
	\end{align*}

	We note that this implies $L' > L$. i.e., moving objects get shorter
\end{solution}


\pagebreak

\problem{Ladder paradox}
Aiden and Matt have a ladder of length $2L$ that they are trying to squeeze into a barn of length $L$. Suppose that the barn has a front door and back door which can be open/closed simultaneously.

Now, Aiden is particular smart, so he gives Matt the ladder and has Matt run at the barn at speed $v = \sqrt{3}c/2$. Does the ladder fit in the barn? We'll analyze this in the new few questions.

\begin{enumerate}
	\item
	What is the length of the ladder from Aiden's perspective when Matt is running? Does the ladder fit in the barn?
	\begin{solution}
		$L$
	\end{solution}
	\vfill

	\item As soon as Matt and the ladder are inside the barn, Aiden quickly closes and opens the doors of the barn. Success!

	However, consider this from Matt's perspective. From Matt's perspective, he's holding a ladder of length $2L$ and a barn is flying at him at speed $v = \sqrt{3}c/2$. By length contraction, what is the length of the barn?
	\begin{solution}
		$L/2$
	\end{solution}
	\vfill\pagebreak

	\item Despite the barn being too short, we know that the ladder has to fit! Using the provided grid, draw a spacetime diagram of the situation. Include Matt's reference frame on your diagram.
	\makeatletter
	\if@solutions\else
		\emptydiagramc{Aiden}
	\fi
	\makeatother


	\vfill
	\item From Matt's perspective, why don't the doors of the barn crush the ladder?
\end{enumerate}


\begin{solution}
	In short, from Matt's perspective, the barn doors do not close at the same time. The back door closes right when the front of the ladder reaches it, then opens again. Later, the front door closes right when the back of the ladder passes it, then opens again.
	% SPACETIME DIAGRAM - LADDER PARADOX
	\begin{tikzpicture}[scale=2.5]
		\message{Ladder paradox^^J}
		%\def\R{2*\xmax} % radius of clip
		%\clip (-\xmin,\R) |- (\R,-\xmin) arc(0:90:\xmin+\R);

		% AXES
		\def\xmin{0.2}
		\def\xmax{2.6}
		\def\ang{33.5}  % angle between x and x' axes
		\def\Nlines{12} % number of world lines (at constant x/t)
		\def\DNy{1}     % difference in number of world lines of y axis (lengthen)
		\def\DNxp{-6}   % difference in number of world lines of x' axis (shorten)
		\def\DNyp{-2}   % difference in number of world lines of y' axis (shorten)
		\def\xplabelang{170} % anchor angle of x' axis label
		\axes

		% SETTINGS
		\pgfmathsetmacro\Lz{4*\D} % proper/rest length L0 of ladder in S'
		\pgfmathsetmacro\L{cos(2*\ang)/cos(\ang)*\Lz} % contracted length L in S
		\pgfmathsetmacro\yminb{-0.7*\xmin} % ymin of barn in S
		\pgfmathsetmacro\xb{4.96*\d} % x coordinate of barn in S
		\pgfmathsetmacro\wb{3.08*\d} % width of barn in S
		\pgfmathsetmacro\yA{(\xb+0.04*\d)/tan(\ang)} % y = ct coordinate when ladder is fully in barn in S
		\coordinate (L) at (\L,0); % ladder end in S
		\coordinate (L') at (\ang:\Lz); % ladder end in S'
		\coordinate (A) at (90-\ang:{(\xb+0.04*\d)/sin(\ang)}); % left end of ladder when fully in barn
		\coordinate (B) at ($(A)+(\L,0)$); % right end of ladder when fully in barn
		\coordinate (C) at (90-\ang:{(\xb+\wb+0.08*\d)/sin(\ang)}); % left end of ladder when fully passed through barn

		% FILL
		\begin{pgfonlayer}{back} % draw on back (behind axes)
		\fill[mydarkblue!22] % barn frame
		(\xb,\yminb) rectangle (\xb+\wb,\ymax);
		\fill[mylightred] % ladder frame
		(90-\ang:-\xmin) -- (90-\ang:\ymaxp) --++ (\ang:\Lz) -- (L) --++ (90-\ang:-\xmin) -- cycle;
		\begin{scope}
		\clip (0,0) rectangle(1.3*\xmax,\ymax+0.2);
		\draw[myredhighlight,line width=3.1] % highlight simultaneity in S'
		(A)++(\ang:{-\xb/cos(\ang)-0.05}) --++ (\ang:\xmax+3.6*\D)
		(B)++(\ang:{-\xb/cos(\ang)-0.05-\Lz}) --++ (\ang:\xmax+3.8*\D);
		\draw[mypurplehighlight,line width=3.1] % highlight simultaneity in S
		(0,\yA) --++ (\xmax+0.8*\d,0);
		\end{scope}
		\end{pgfonlayer}
		\draw[->,thick,mydarkblue] % barn left door
		(\xb,\yminb) -- (\xb,\ymax+0.15);
		\draw[->,thick,mydarkblue] % barn right door
		(\xb+\wb,\yminb) -- (\xb+\wb,\ymax+0.15);
		\draw[->,thick,mydarkbrown] % rod left end
		(L)++(90-\ang:-\xmin) -- (L) -- (L') --++ (90-\ang:\ymaxp+0.2);

		% LADDER
		\draw[rod] (O) -- (L')
		node[pos=0.55,above=2,scale=0.8] {\contour{mylightred}{$2L$}};
		\draw[rod] (O) -- (L)
		node[pos=0.46,below=1,scale=0.8] {$L$};

		% LADDER IN BARN
		\draw[rod] (A) --++ (L');
		\draw[rod] (B) --++ (\ang:-\Lz);
		\draw[rod] (A) --++ (L);

		% LADDER RIGHT OF BARN
		\draw[rod] (C) --++ (L');
		\draw[rod] (C) --++ (L);

		% LABELS
		\node[mydarkblue,below=0,align=center,scale=0.8,yshift=1] at (\xb+\wb/2,0)
		{barn\\$L$};
		\node[mydarkpurple,right,align=left,scale=0.65,yshift=1.2] at (\xb+3.6*\d,\yA)
		{both doors closed in S};
		%{both doors\\[-3]close in S};
		\node[mydarkred,right,scale=0.65,yshift=1.8,rotate=\ang] at ($(A)+(\ang:\Lz+0.8*\D)$)
		{left door closed in S$'$};
		\node[mydarkred,right,scale=0.65,yshift=0.7,rotate=\ang] at ($(B)+(\ang:0.8*\D)$)
		{right door closed in S$'$};
	\end{tikzpicture}


	% SPACETIME DIAGRAM - LADDER PARADOX from perspective of S' (i.e. in the S' frame)
	% \begin{tikzpicture}[scale=2.5]
	%   \message{Ladder paradox from the perspective of S'^^J}

	%   % SETTINGS
	%   \def\ang{-33.5}   % angle between x and x' axes
	%   \def\Nxlines{9}   % number of world lines (at constant x)
	%   \def\Nylines{13}  % number of world lines (at constant t)
	%   \def\Nxplines{6}  % number of world lines (at constant x')
	%   \def\Nyplines{10} % number of world lines (at constant t')
	%   \def\xmin{0.2}
	%   \pgfmathsetmacro\D{2.6/13} % grid size
	%   \pgfmathsetmacro\d{\D/cos(\ang)/sqrt(1-tan(\ang)^2)} % grid size, boosted
	%   \pgfmathsetmacro\xmax{(\Nxlines+0.4)*\d}   % maximum of x axis in S
	%   \pgfmathsetmacro\ymax{(\Nylines+0.4)*\d}   % maximum of y = ct axis in S
	%   \pgfmathsetmacro\xmaxp{(\Nxplines+0.4)*\D} % maximum of x' axis in S'
	%   \pgfmathsetmacro\ymaxp{(\Nyplines+0.4)*\D} % maximum of y' = ct' axis in S'
	%   \pgfmathsetmacro\Lz{4*\D} % proper/rest length L0 of ladder in S'
	%   \pgfmathsetmacro\L{\Lz/cos(\ang)} % contracted length L in S
	%   \pgfmathsetmacro\xb{4.96*\d} % x coordinate of barn in S
	%   \pgfmathsetmacro\wb{3.08*\d} % width of barn in S
	%   \pgfmathsetmacro\yAp{(\xb+0.04*\d)*sin(\ang)*(1-cot(\ang)^2)} % y' = ct' coordinate when ladder is fully in barn in S
	%   \pgfmathsetmacro\yBp{\yAp+\L*sin(\ang)} % y' = ct' coordinate when ladder is fully in barn in S
	%   \coordinate (O) at (0,0);
	%   \coordinate (X) at (\ang:\xmax+0.05);
	%   \coordinate (T) at (90-\ang:\ymax+0.05);
	%   \coordinate (X') at (\xmaxp+0.15,0);
	%   \coordinate (T') at (0,\ymaxp+0.15);
	%   \coordinate (L) at (\ang:\L); % ladder end in S
	%   \coordinate (L') at (\Lz,0); % ladder end in S'
	%   \coordinate (A) at (0,\yAp); % left end of ladder when fully in barn in S
	%   \coordinate (B) at ($(A)+(L)$); % right end of ladder when fully in barn in S
	%   \coordinate (C) at (0,{(\xb+\wb+0.08*\d)*sin(\ang)*(1-cot(\ang)^2)}); % left end of ladder when fully passed through barn

	%   % FILL
	%   \fill[myfieldred]
	%     (-\xmin,0) -| (\xmaxp,\ymaxp) -| (0,-\xmin) -| cycle;
	%   \fill[mylightred] % ladder frame
	%     (0,-\xmin) |- (\Lz,\ymaxp) -- ($(L)+(0,-\xmin)$) -- cycle;
	%   \fill[mydarkblue!22] % barn frame
	%     (\ang:\xb)++(90-\ang:-\xmin) --++ (90-\ang:\xmin+\ymax)
	%     --++ (\ang:\wb) --++ (90-\ang:-\xmin-\ymax) -- cycle;

	%   % HIGHLIGHT DOORS OPEN/CLOSED
	%   \begin{scope}
	%     \clip (0,0) --++ (90-\ang:\ymax) -- (\xmaxp+1.8*\d,\ymaxp) --++ (0,-1.1*\ymaxp) -- cycle;
	%     \draw[myredhighlight,line width=3.1] % highlight simultaneity in S'
	%       ({\yAp*tan(\ang)-0.1},\yAp) -- (\xmaxp+1.6*\d,\yAp)
	%       ({\yBp*tan(\ang)-0.1},\yBp) -- (\xmaxp+1.8*\d,\yBp);
	%     \draw[mypurplehighlight,line width=3.1] % highlight simultaneity in S
	%       (A)++(\ang:-\xb-0.1) --++ (\ang:{\xb+\L+3.75*\d});
	%   \end{scope}

	%   % BOOSTED WORLD LINE GRID
	%   \message{  Making world lines for boosted frame...^^J}
	%   \foreach \i [evaluate={\x=\i*\D;}] in {1,...,\Nxplines}{
	%     \draw[world line]   (\x,0) -- (\x,\ymaxp);
	%   }
	%   \foreach \i [evaluate={\t=\i*\D;}] in {1,...,\Nyplines}{
	%     \draw[world line t] (0,\t) -- (\xmaxp,\t);
	%   }

	%   % WORLD LINE GRID
	%   \message{  Making world lines...^^J}
	%   \foreach \i [evaluate={\x=\i*\d;}] in {1,...,\Nxlines}{
	%     \draw[world line'] (\ang:\x) --++ (90-\ang:\ymax);
	%   }
	%   \foreach \i [evaluate={\t=\i*\d;}] in {1,...,\Nylines}{
	%     \draw[world line'] (90-\ang:\t) --++ (\ang:\xmax);
	%   }

	%   % WORLD LINES BARN & ROD
	%   \draw[->,thick,mydarkblue] % barn left door
	%     (\ang:\xb+\wb)++(90-\ang:-\xmin) --++ (90-\ang:\xmin+\ymax+0.2);
	%   \draw[->,thick,mydarkblue] % barn right door
	%     (\ang:\xb)++(90-\ang:-\xmin) --++ (90-\ang:\xmin+\ymax+0.2);
	%   \draw[->,thick,mydarkbrown] % rod right end
	%     (L)++(0,-\xmin) -- (\Lz,\ymaxp+0.15);

	%   % AXES
	%   \draw[->,thick] (90-\ang:-\xmin) -- (T) node[below left=-1] {$ct$};
	%   \draw[->,thick] (\ang:-\xmin) -- (X) node[below left=0] {$x$};
	%   \draw[->,thick,mydarkred] (0,-\xmin) -- (T')
	%     node[right=3,above=-1] {$ct'$};
	%   \draw[->,thick,mydarkred] (-\xmin,0) -- (X')
	%     node[anchor=140,inner sep=0.5] {$x'$};

	%   % LADDER
	%   \draw[rod] (O) -- (L)
	%     node[pos=0.45,below=2,scale=0.8] {$L$};
	%   \draw[rod] (O) -- (L')
	%     node[pos=0.45,above=0.6,scale=0.8] {\contour{mylightred}{$2L$}};
	%   \draw[rod] (O) -- (L');

	%   % LADDER IN BARN
	%   \draw[rod] (A) --++ (L);
	%   \draw[rod] (A) --++ (L');
	%   \draw[rod] (B) --++ (-\Lz,0);

	%   % LADDER RIGHT OF BARN
	%   \draw[rod] (C) --++ (L');
	%   \draw[rod] (C) --++ (L);r

	%   % LABELS
	%   \node[mydarkbrown,above=1,scale=0.8] at (\Lz/2,\ymaxp)
	%     {rod};
	%   \node[mydarkblue,below=0,scale=0.8]
	%     at ({(\xb+\wb/2)*cos(\ang)*(1-tan(\ang)^2)+0.07},0)
	%     {\contour{mydarkblue!22}{barn}};
	%   %\node[mydarkblue,anchor=90-\ang,inner sep=2,scale=0.8,rotate=\ang] at (\ang:\xb+\L/2)
	%   %  {barn}; %{barn\\$L$};
	%   \node[mydarkpurple,right,align=left,scale=0.65,yshift=1.6,rotate=\ang]
	%     at ($(B)+(\ang:0.4*\d)$) {both doors closed in S};
	%   \node[mydarkred,right,scale=0.65,yshift=1.8] at ($(A)+(\Lz+0.3*\d,0)$)
	%     {left door closed in S$'$};
	%   \node[mydarkred,right,scale=0.65,yshift=0.7] at ($(B)+(0.3*\d,0)$)
	%     {right door closed in S$'$};

	% \end{tikzpicture}
\end{solution}

\vfill
\pagebreak
