\documentclass[gr-notes.tex]{subfiles}

\begin{document}

\setcounter{chapter}{0}

\chapter{Special relativity}

\section{Fundamental principles of special relativity (SR) theory}

Special relativity can be summarized by two fundamental postulates:

\begin{enumerate}
\item The principle of relativity (Galileo), which states that no experiment
  may measure the absolute velocity of an observer.
\item The universality of the speed of light (Einstein), which states that
  the speed of light is constant when measured from any inertial reference
  frame.
\end{enumerate}

\section{Definition of an inertial observer in SR}

When we say ``observer'', what we really mean is a coordinate system. Thus an inertial observer is a coordinate system that meets the following 3 criteria:

\begin{enumerate}
\item The distance between two spatial points $P_1$ and $P_2$ is independent of
  time.
\item Time is synchronized and moves at the same rate at all spatial points.
\item At any constant time, space is Euclidean.
\end{enumerate}

It follows from these criteria that the observer must be \textbf{unaccelerated}.

\section{New units}

The speed of light, $c$, is approximately $\SI{3.00e8}{\meter\second^{-1}}$ in SI units. However, these units predate relativity, and are very inconvenient. Life becomes easier if we define our units around $c$, such that $c \equiv 1$.

This can be done by repurposing the meter as a measure of time as well. We thereby define the meter as ``the time it takes light to travel 1 meter''. Thus the speed of light becomes

\begin{displaymath}
  c = \frac{\SI{1}{\meter}}{\SI{1}{\meter}}.
\end{displaymath}

Indeed, it turns out in SR that time is most conveniently measured in distance ($c = \SI{3.00e10}{\centi\meter}$), and in GR mass is as well ($G/c^{-2} = \SI{7.425e-29}{\centi\meter\per\gram}$).

\section{Spacetime diagrams}

\section{Construction of the coordinates used by another observer}

\section{Invariance of the interval}

For two nearby events, we can define the \textbf{invariant interval}, defining a 4D Minskowski spacetime:

\begin{displaymath}
  \dd{s}^2 = -(c \dd{t})^2 + \dd{x}^2 + \dd{y}^2 + \dd{z}^2,
\end{displaymath}

or when we set $c \equiv 1$:

\begin{displaymath}
  \dd{s}^2 = -\dd{t}^2 + \dd{x}^2 + \dd{y}^2 + \dd{z}^2.
%
  \tag{Schutz 1.1}
  \label{schutz:1.1}
\end{displaymath}

This notation can be simplified be defining

\begin{displaymath}
  \eta_{\mu\nu} =
  \diag(-1, 1, 1, 1) =
  \mqty(-1 & 0 & 0 & 0 \\
         0 & 1 & 0 & 0 \\
         0 & 0 & 1 & 0 \\
         0 & 0 & 0 & 1);
  \quad
  \dd{s}^2 = \sum_{\mu=0}^3 \sum_{\nu=0}^3 \eta_{\mu\nu} \dd{x}^\mu \dd{x}^\nu
\end{displaymath}

When we want to find $\dd{\bar{s}}^2$, we can consider the fact that each of its components, $\dd{\bar{x}^\alpha}$, is a linear combination of the components of $\dd{s}^2$,
%
\begin{displaymath}
  \dd{\bar{x}^\alpha} = \sum_{\beta=0}^3 a_{\alpha\beta} x^\beta.
\end{displaymath}
%
Now, when we consider the square of $\dd{\bar{x}^\alpha}$, the cross terms make it a quadratic function. Since the sum of four quadratics (the four $\dd{\bar{x}^\alpha}$'s) is also a quadratic, we can write $\dd{\bar{s}}^2$ as
%
\begin{displaymath}
  \dd{\bar{s}} =
  \sum_{\alpha=0}^3 \sum_{\beta=0}^3
      M_{\alpha\beta} (\dd{x^\alpha}) (\dd{x^\beta})
%
  \tag{Schutz 1.2}
  \label{schutz:1.2}
\end{displaymath}
%
If are talking about light, $\dd{s}^2 = 0$, and so we can say
%
\begin{displaymath}
  \dd{s}^2 = 0 = -\dd{t}^2 + \dd{r}^2
  \implies
  \dd{t} = \dd{r}
\end{displaymath}
%
Now by looking at Exercise 8 in Section \ref{sec:ch1-exercises}, we see that
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &+
  2 \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \dd{r}
  \\ &+
  \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j},
  %
  \tag{Schutz 1.3}
  \label{schutz:1.3}
\end{align*}
%
where
\begin{displaymath}
  M_{0i} = 0
%
  \tag{Schutz 1.4a}
  \label{schutz:1.4a}
\end{displaymath}
%
and
%
\begin{displaymath}
  M_{ij} = -(M_{00}) \delta_{ij},
%
  \tag{Schutz 1.4b}
  \label{schutz:1.4b}
\end{displaymath}
%
where $\delta_{ij}$ is the Kronecker delta.

\section{Invariant hyperbolae}

\section{Particularly important results}

\section{The Lorentz transformation}

\section{The velocity-composition law}

\section{Paradoxes and physical intuition}

\section{Further reading}

\section{Appendix: The twin `paradox' dissected}

Consider two twins, Joe and Ed. Joe goes off in a straight line traveling at a speed of $(24/25) c$ for $7$ years, as measured on his clock, then instantaneously reverses and returns at half the speed. Ed remains at home. When they return, what is the difference in ages between Joe and Ed?

$\tau_1 = \SI{7}{yr}$. $t_1 = \tau_1 \gamma_1$, where $\gamma_1 = \qty[ 1 - \qty(\frac{24}{25})^2 ]^{-1/2}$. So $t_1 = \SI{25}{yr}$.

$t_2 = 2 t_1 = \SI{50}{yr}$.

$\tau_2 = t_2 \gamma_2^{-1}$, where $\gamma_1 = \qty[ 1 - \qty(\frac{12}{25})^2 ]^{-1/2}$. So $\tau_2 = 2 \sqrt{481} \si{yr} \approx \SI{44}{yr}$. Finally, $\tau = \tau_1 + \tau_2 \approx \SI{51}{yr}$, and $t = t_1 + t_2 = \SI{75}{yr}$, so Ed ages $t - \tau \approx \SI{24}{years}$ more than Joe.

\section{Exercises}
\label{sec:ch1-exercises}

\textbf{1}
Convert the following to units in which $c = 1$, expressing everything in terms of $\si{\meter}$ and $\si{\kilogram}$.

(Note that
$c = 1 \implies
 1 \approx \SI{3e8}{\meter\per\second}
   \approx (\num{3e8})^{-1}\si{\per\meter\second}$

(a) $\SI{10}{\joule}$
\begin{align*}
  \SI{10}{\joule} &=
  \SI{10}{\newton.\meter} =
  \SI{10}{\kilogram.\meter^2.\second^{-2}} \approx
  \SI{10}{\kilogram.\meter^2.\second^{-2}} \cdot
  ((\num{3e8})^{-1}\si{\meter^{-1}.\second})^2
  \\ &\approx
  \SI{10}{\kilogram} (\num{3e8})^{-2} =
  \SI{10}{\kilogram} \qty(\frac{1}{9} \times 10^{-16}) \approx
  \SI{1.11e-16}{\kilogram}
\end{align*}

(b) $\SI{100}{\watt}$
\begin{align*}
  \SI{100}{\watt} &=
  \SI{100}{\kilogram.\meter^2.\second^{-3}} \approx
  \SI{100}{\kilogram.\meter^2.\second^{-3}} \cdot
  ((\num{3e8})^{-1} \si{\meter^{-1}.\second})^3
  \\ &\approx
  \SI{100}{\kilogram\per\meter} (3^{-3} \times 10^{-24}) =
  \frac{100}{27} \times 10^{-24} \si{\kilogram\per\meter} \approx
  \SI{3.7e-24}{\kilogram\per\meter}
\end{align*}

\textbf{2}
Convert the following from natural units ($c = 1$) to SI units:

(a) A velocity $v = 10^{-2}$.
\begin{displaymath}
  v = 10^{-2} =
  10^{-2} c =
  10^{-2} \SI{3e8}{\meter\per\second} =
  \SI{3e6}{\meter\per\second}
\end{displaymath}

(b) Pressure $P = 10^{19} \si{\kilogram.\meter^{-3}}$.
\begin{align*}
  P &=
  10^{19} \si{\kilogram.\meter^{-3}} \approx
  10^{19} \si{\kilogram.\meter^{-3}} (\SI{3e8}{\meter\per\second})^2
  \\ &\approx
  10^{19} \si{kg.\meter^{-3}} (\SI{9e16}{\meter^2.\second^{-2}}) =
  \SI{9e35}{\newton.\meter^2}
\end{align*}

\textbf{3}
Draw the $t$ and $x$ axes of the spacetime coordinates of an observer $\obs$ and then draw:

(a) The world line of $\obs$'s clock at $x = \SI{1}{\meter}$.

\begin{figure}[h]
  \centering
  \includegraphics[width=0.95\textwidth]{img/problem_3}

  \caption*{Exercise 3}
\end{figure}

\textbf{4}
Write out all the terms of the following sums, substituting the coordinate names $(t, x, y, z)$ for $(x^0, x^1, x^2, x^3)$:

(a)
$\sum_{\alpha=0}^3 V_\alpha \dd{x^\alpha} =
 V_0 \dd{t} + V_1 \dd{x} + V_2 \dd{y} + V_3 \dd{z}$.

(b)
$\sum_{i=1}^3 (\dd{x^i})^2 =
 \dd{x}^2 + \dd{y}^2 + \dd{z}^2 = \dd{r}^2$.

\textbf{5}

(a) Use the spacetime diagram of an observer $\obs$ to describe the following experiment performed by $\obs$. Two bursts of particles of speed $v = 0.5$ are emitted from $x = 0$ at $t = \SI{-2}{\meter}$, one traveling in the $+x$ direction and the other in the $-x$ direction. These encounter detectors located at $x = \pm\SI{2}{\meter}$. After a delay of $\SI{0.5}{\meter}$ of time, the detectors send signals back to $x = 0$ at speed $v = 0.75$.

\emph{See figure below}

(b) The signals arrive back at $x = 0$ at the same event. (Make sure your spacetime diagram shows this!) From this the experimenter concludes that the particle detectors did indeed send out their signals simultaneously, since he knows they are equal distances from $x = 0$. Explain why this conclusion is valid.

Assuming he knows the signals traveled with equal speeds, and the detectors are an equal distance away, then they must have been emitted simultaneously, in order for them to arrive at $x = 0$ simultaneously.

(c) A second observer $\bar\obs$ moves with speed $v = 0.75$ in the $-x$ direction relative to $\obs$. Draw the spacetime diagram of $\bar\obs$ and in it depict the experiment performed by $\obs$. Does $\bar\obs$ conclude that particle detectors sent out their signals simultaneously? If not, which signal was sent first.

See the diagram below. On it, I have drawn lines $\bar{t}_{\rm left}$ and $\bar{t}_{\rm right}$ (note that they are parallel to the $\bar{x}$ axis). As you can see from the plot, the left emission occurs \emph{before} the right emission.

(d)

Using $\obs$, the distance is
%
\begin{displaymath}
\Delta s^2 = \Delta x^2 = \SI{16}{\meter^2}.
\end{displaymath}
%
Using $\bar\obs$, we first need to find $\bar{x}_{\{a,b\}}$ and $\bar{t}_{\{a,b\}}$. We use the Lorentz transformation to do this.
%
\begin{align*}
  \bar{t} &= \gamma (t - vx)
  \\
  \bar{x} &= \gamma (x - vt)
\end{align*}
%
Using this, we find
\begin{align*}
  \bar{t}_a &= \frac{16 \sqrt7}{7} &
  \bar{t}_b &= \frac{4 \sqrt7}{7}
  \\
  \bar{x}_a &= \frac{-31 \sqrt7}{14} &
  \bar{x}_b &= \frac{\sqrt7}{14}
\end{align*}
%
This gives us a distance of
%
\begin{displaymath}
  \Delta \bar{s}^2 = -(\Delta \bar{t})^2 + (\Delta \bar{x})^2 = \SI{16}{\meter^2},
\end{displaymath}
%
which is of course what we expect.

\begin{figure}[h]
  \centering
  \includegraphics[width=0.95\textwidth]{img/problem_5}

  \caption*{Exercise 5}
\end{figure}

\textbf{6}
Show that Equation (\ref{schutz:1.2}) contains only $M_{\alpha\beta} + M_{\beta\alpha}$ when $\alpha \neq \beta$, not $M_{\alpha\beta}$ and $M_{\beta\alpha}$ independently. Argue that this enables us to set $M_{\alpha\beta} = M_{\beta\alpha}$ without loss of generality.

When we expand the summation in (\ref{schutz:1.2}), there is no point where
%
\begin{displaymath}
  \dd{\bar{s}}^2 =
  \ldots +
  M_{\alpha\alpha} (\dd{x^\alpha})^2 +
  M_{\alpha\alpha} (\dd{x^\alpha})^2 +
  \ldots
\end{displaymath}
occurs, because a double summation only contains $M_{\alpha\alpha}$ once. If it did, we could absorb the two $M_{\alpha\beta}$ terms into a single one. Therefore we can assert the first point.

Now we consider the second point. If we expand the summation, assuming now that an $M_{\alpha\beta}$ and $M_{\beta\alpha}$ term only occur when $\alpha \neq \beta$, then we see
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  \ldots +
  M_{\alpha\beta} (\dd{x^\alpha}) (\dd{x^\beta}) +
  M_{\beta\alpha} (\dd{x^\beta}) (\dd{x^\alpha}) +
  \ldots
  \\ &=
  \ldots +
  (M_{\alpha\beta} + M_{\beta\alpha}) \qty[ (\dd{x^\alpha}) (\dd{x^\beta}) ] +
  \ldots
  \\ &=
  \ldots +
  \mathbf{X} \qty[ (\dd{x^\alpha}) (\dd{x^\beta}) ] +
  \ldots.
\end{align*}
%
Now, what really matters in this summation is the value of $\mathbf{X} = M_{\alpha\beta} + M_{\beta\alpha}$, not the individual values of $M_{\alpha\beta}$ and $M_{\beta\alpha}$. Therefore we can \emph{choose}, without loss of generality, $M_{\alpha\beta} = M_{\beta\alpha} = \mathbf{X}/2$, thereby asserting the second point.

\textbf{7}
In the discussion leading up to Equation (\ref{schutz:1.2}), assume that the coordinates of $\bar{\obs}$ are given as the following linear combinations of those $\obs$:
%
\begin{align*}
  \bar{t} &= \alpha t + \beta x,
  \\
  \bar{x} &= \mu t + \nu x,
  \\
  \bar{y} &= a y,
  \\
  \bar{z} &= b z,
\end{align*}
%
where $\alpha$, $\beta$, $\mu$, $\nu$, $a$, and $b$ may be functions of the velocity $\vec{v}$ of $\bar{\obs}$ relative to $\obs$, but they do not depend on the coordinates. Find the values of $M_{\alpha\beta}$ of Equation (\ref{schutz:1.2}).

\begin{align*}
  \dd{\bar{s}}^2 &=
  -(\dd{\bar{t}})^2 + (\dd{\bar{x}})^2 + (\dd{\bar{y}})^2 + (\dd{\bar{z}})^2
  \\ &=
  -(\alpha \dd{t} + \beta \dd{x})^2
  +(\mu \dd{t} + \nu \dd{x})^2
  +(a \dd{y})^2
  +(b \dd{z})^2
  \\ &=
  -\alpha^2 \dd{t}^2 -
  \alpha\beta \dd{t} \dd{x} -
  \beta^2 \dd{x}^2 +
  \mu^2 \dd{t}^2 +
  \mu \nu \dd{t} \dd{x} +
  \nu^2 \dd{x}^2 +
  a^2 \dd{y}^2 +
  b^2 \dd{z}^2
  \\ &=
  (\mu^2 - \alpha^2) \dd{t}^2 +
  (\mu \nu - \alpha \beta) \dd{t} \dd{x} +
  (\nu^2 - \beta^2) \dd{x}^2 +
  a^2 \dd{y}^2 +
  b^2 \dd{z}^2
  \\
  M_{00} &= \mu^2 - \alpha^2
  \\
  M_{01} &= M_{10} = \frac{\mu \nu - \alpha \beta}{2}
  \\
  M_{11} &= \nu^2 - \beta^2
  \\
  M_{22} &= a^2
  \\
  M_{33} &= b^2,
\end{align*}
and all other $M_{\alpha\beta} = 0$.

\textbf{8}

(a) Derive Equation (\ref{schutz:1.3}) from (\ref{schutz:1.2}) for general $M_{\alpha\beta}$.

Equation (\ref{schutz:1.3}) is just an expansion of the summation in (\ref{schutz:1.2}).

We start by taking out the $\dd{t}^2$ term, which corresponds to $\alpha = \beta = 0$, which gives us
%
\begin{displaymath}
  \dd{\bar{s}}^2 = M_{00} (\dd{t})^2 + \ldots,
\end{displaymath}
%
now we use the equivalence of $\dd{t}$ and $\dd{r}$ to make the substitution
%
\begin{displaymath}
  \dd{\bar{s}}^2 = M_{00} (\dd{r})^2 + \ldots.
\end{displaymath}

For the middle terms, we use the fact that $M_{\alpha\beta} = M_{\beta\alpha}$, and look at only the terms where \emph{one} of $\alpha$ and $\beta$ is zero. The symmetry means we can write $M_{0i} = M_{i0}$, and pull out a 2 because there are twice as many terms, giving us
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &+
  2 \qty( \sum_{i=1}^3 M_{0i} (\dd{x^i}) (\dd{t}) )
  \\ &+
  \ldots.
\end{align*}
%
Now we use the equivalence of $\dd{t}$ and $\dd{r}$ once again, and pull the term out of the sum, giving us
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &+
  2 \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \dd{r}
  \\ &+
  \ldots.
\end{align*}

Finally, we simply include the terms which have not yet been accounted for, which are all the \emph{spacial-only} terms, which arrives us back at Equation (\ref{schutz:1.3}):
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &+
  2 \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \dd{r}
  \\ &+
  \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j}.
\end{align*}

(b) Since $\dd{\bar{s}}^2 = 0$ in Equation (\ref{schutz:1.3}), for \emph{any} $\dd{x^i}$, replace $\dd{x^i}$ with $-\dd{x^i}$, and subtract that result from the original equation. This will establish that $M_{0i} = 0$.
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &-
  2 \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \dd{r}
  \\ &+
  \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j}.
\end{align*}
%
\begin{align*}
  \dd{\bar{s}}^2 - \dd{\bar{s}}^2 = 0 &=
  \cancel{0 \, M_{00} (\dd{r})^2}
  \\ &+
  4 \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \dd{r}
  \\ &+
  \cancel{0 \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j}}.
\end{align*}
%
\begin{displaymath}
  0 = \cancel{4} \qty( \sum_{i=1}^3 M_{0i} \dd{x^i} ) \cancel{\dd{r}}
\end{displaymath}
%
Now there are two possibilities. In one case, $\dd{x^i} \equiv 0$, but that is a trivial solution and in general is not true. The other case is that $M_{0i} \equiv 0$, which means we can simplify Equation (\ref{schutz:1.3}) to
%
\begin{align*}
  \dd{\bar{s}}^2 &=
  M_{00} (\dd{r})^2
  \\ &+
  \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j}.
\end{align*}

(c) Use the result of part (b) with $\dd{\bar{s}}^2 = 0$ to establish Equation (\ref{schutz:1.4b}).
%
\begin{align*}
  \dd{\bar{s}}^2 = 0 &=
  M_{00} (\dd{r})^2 + \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j}
  \\ \implies
  -M_{00} (\dd{r})^2 &=
  \sum_{i=1}^3 \sum_{j=1}^3 M_{ij} \dd{x^i} \dd{x^j},
\end{align*}
%
now if we expand $(\dd{r})^2$, we see that there can only be non-zero $M_{ij}$ when $i = j$, and so
%
\begin{align*}
  -M_{00} \qty( (\dd{x}^2) + (\dd{y}^2) + (\dd{z}^2) ) &=
  \sum_{i=1}^3 M_{ii} (\dd{x^i})^2
  \\ \implies
  -(M_{00}) \delta_{ij} &=
  M_{ij},
\end{align*}
%
which is simply Equation (\ref{schutz:1.4b}).

\textbf{9}
Explain why the line $\mathcal{P}\mathcal{L}$ in Figure 1.7 is drawn in the manner described in the text.

% The key here is that both $\mathcal{P}$ and $\mathcal{L}$ must emit or absorb a beam of light, which intersect the same reflection points at $\mathcal{A}$ and $\mathcal{B}$. This means that they occur at $t = \bar{t} = 0$. This also means that from $\bar{\obs}$, it appears that the light reflected from

\textbf{10}
For the pairs of events whose coordinates $(t,x,y,z)$ in some frame are given below, classify their separations as timelike, spacelike, or null.

(a) $(0,0,0,0)$ and $(-1,1,0,0)$:
\begin{displaymath}
  \dd{s}^2 =
  -(0 + 1)^2 + (0 - 1)^2 + (0 - 0)^2 + (0 - 0)^2 =
  -1 + 1 + 0 + 0 =
  0 \implies
  \mathrm{null}
\end{displaymath}

(b) $(1,1,-1,0)$ and $(-1,1,0,2)$:
\begin{displaymath}
  \dd{s}^2 =
  -(1 + 1)^2 + (1 - 1)^2 + (-1 - 0)^2 + (0 - 2)^2 =
  -4 + 0 + 1 + 4 =
  1 \implies
  \mathrm{spacelike}
\end{displaymath}

(c) $(6,0,1,0)$ and $(5,0,1,0)$:
\begin{displaymath}
  \dd{s}^2 =
  -(6 - 5)^2 + (0 - 0)^2 + (1 - 1)^2 + (0 - 0)^2 =
  -1 + 0 + 0 + 0 =
  -1 \implies
  \mathrm{timelike}
\end{displaymath}

(d) $(-1,1,-1,1)$ and $(4,1,-1,6)$:
\begin{displaymath}
  \dd{s}^2 =
  -(-1 - 4)^2 + (1 - 1)^2 + (-1 + 1)^2 + (1 - 6)^2 =
  -25 + 0 + 0 + 25 =
  0 \implies
  \mathrm{null}
\end{displaymath}

\textbf{11}
Show that the hyperbolae $-t^2 + x^2 = a^2$ and $-t^2 + x^2 = -b^2$ are asymptotic to the lines $t = \pm x$, regardless of $a$ and $b$.

We will generalize $a$ and $-b$ with a new constant, $\alpha \in \mathbb{R}$, and so we have: $-t^2 + x^2 = \alpha^2$. Now if we solve for $t$, we get $t = \pm \sqrt{x^2 - \alpha^2}$.

Now take the limit of $t$ as $x \to \infty$ (or $-\infty$, they are equivalent since $x$ is real and squared), which gives us:
\begin{align*}
  \lim_{x\to\infty} t &=
  \lim_{x\to\infty} \pm \sqrt{x^2 - \alpha^2} =
  \pm \sqrt{x^2} = \pm x.
\end{align*}

Note that we dropped the $\alpha^2$ term in the limit, as it was being subtracted from a number approaching infinity, and was therefore negligible.

\textbf{12}

(a) Use the fact that the tangent to the hyperbola $\mathcal{DB}$ in Figure 1.14 is the line of simultaneity for $\bar\obs$ to show that the time interval $\mathcal{AE}$ is shorter than the time recorded on $\bar\obs$'s clock as it moved from $\mathcal{A}$ to $\mathcal{B}$.

If we look at the figure, we see that $\mathcal{AD}$ and $\mathcal{AB}$ lie along the same hyperbola. This means that when $\obs$ measures $\dd{t} = \mathcal{AD}$, and $\bar\obs$ measures $\dd{\bar{t}} = \mathcal{AB}$, the two measurements are the same. Since $\dd{t} = \mathcal{AE}$ is clearly shorter than $\dd{t} = \mathcal{AD}$, then $\dd{t} = \mathcal{AD} < \dd{\bar{t}} = \mathcal{AB}$.

(b) Calculate that
%
\begin{displaymath}
  (\dd{s}^2)_{\mathcal{AC}} =
  (1 - v^2) (\dd{s}^2)_{\mathcal{AB}}
\end{displaymath}
%
\begin{align*}
  (\dd{s}^2)_{\mathcal{AC}} &=
  -(\dd{t})_{\mathcal{AC}}^2
  \\
  (\dd{s}^2)_{\mathcal{AB}} &=
  (\dd{\bar{s}}^2)_{\mathcal{AB}}
  \\ &=
  -(\dd{\bar{t}})_{\mathcal{AB}}^2
  \\ &=
  -(\gamma (\dd{t} - v \dd{x}))^2 =
  -(\gamma (\dd{t} - v \cdot 0))^2 =
  -(\gamma \dd{t})^2 =
  \gamma^2 [-(\dd{t})^2]
  \\ &=
  \gamma^2 (\dd{s}^2)_{\mathcal{AC}} =
  \frac{(\dd{s}^2)_{\mathcal{AC}}}{1 - v^2}
  \\ \implies
  (\dd{s}^2)_{\mathcal{AC}} &=
  (1 - v^2) (\dd{s}^2)_{\mathcal{AB}}
\end{align*}

\textbf{13}
The Half-life of the elementary particle called the $\pi$-meson (or pion) is $\SI{2.5e-8}{\second}$ when the pion is at rest relative to the observer measuring its decay time. Show, by the principle of relativity, that pions moving at speed $v = 0.999$ must have a half-life of $\SI{5.6e-7}{\second}$, as measured by an observer at rest.
%
\begin{displaymath}
  \dd{t} =
  \gamma \dd{\bar{t}} =
  \frac{\SI{2.5e-8}{\second}}{\sqrt{1 - 0.999^2}} \approx
  \SI{5.59e-7}{\second}
\end{displaymath}

\textbf{14}
Suppose the velocity $\vb{v}$ of $\bar\obs$ relative to $\obs$ is small, $\abs{\vb{v}} \ll 1$. Show that the time dilation, Lorentz contraction, and velocity-addition formulae can be approximated by respectively:

(a) $\dd{t} \approx (1 + \frac{1}{2} v^2) \dd{\bar{t}}$

\begin{align*}
  \gamma &=
  (1 - v^2)^{-1/2} =
  \sum_{k=0}^\infty \binom{-1/2}{k} x^k =
  1 + (-1/2) (-v^2) + \frac{(-1/2) (-1/2 - 1)}{2!} (-v^2)^2 + \ldots \approx
  1 + \frac{1}{2} v^2
  \\
  \dd{t} &=
  \gamma \dd{\bar{t}} \approx
  \qty(1 + \frac{1}{2} v^2) \dd{\bar{t}}
\end{align*}

(b) $\dd{x} \approx (1 - \frac{1}{2} v^2) \dd{\bar{x}}$

\begin{align*}
  \gamma^{-1} &=
  (1 - v^2)^{1/2} =
  \sum_{k=0}^\infty \binom{1/2}{k} x^k =
  1 + (1/2) (-v^2) + \frac{(1/2) (1/2 - 1)}{2!} (-v^2)^2 + \ldots \approx
  1 - \frac{1}{2} v^2
  \\
  \dd{x} &=
  \gamma^{-1} \dd{\bar{x}} \approx
  \qty(1 - \frac{1}{2} v^2) \dd{\bar{x}}
\end{align*}

(c) $W' \approx W + v - W v (W + v)$ (with $\abs{W} \ll 1$ as well)

\begin{align*}
  W' &=
  \frac{W + v}{1 + W v} =
  (W + v) (1 + W v)^{-1}
  \\
  (1 + W v)^{-1} &=
  \sum_{k=0}^\infty \binom{-1}{k} (W v)^k =
  1 -
  W v +
  \frac{1}{2} \cdot 1 (1 + 1) (W v)^2 -
  \frac{1}{6} \cdot 1 (1 + 1) (1 + 2) (W v)^3 + \ldots
  \\ &\approx
  1 - W v + (W v)^2
  \\
  W' &\approx
  (W + v) (1 - W v + (W v)^2) =
  W + v - W v (W + v) + (W v)^2 (W + v)
  \\ &\approx
  W + v - W v (W + v)
\end{align*}

What are the relative errors in these approximations when $\abs{\vb{v}} = W = 0.1$?

\textbf{TODO}

\textbf{15}
Suppose that the velocity $\vb{v}$ of $\bar\obs$ relative to $\obs$ is nearly that of light, $\abs{\vb{v}} = 1 - \varepsilon$, $0 < \varepsilon \ll 1$. Show that the same formulae of Exercise 14 become

(a) $\dd{t} \approx \dd{\bar{t}} / \sqrt{2 \varepsilon}$

\begin{align*}
  v &=
  1 - \varepsilon \implies
  v^2 = (1 - \varepsilon)^2 =
  1 - 2 \varepsilon + \varepsilon^2
  \\ \implies
  1 - v^2 &=
  1 - (1 - 2 \varepsilon + \varepsilon^2) =
  2 \varepsilon - \varepsilon^2 =
  2 \varepsilon \qty(1 - \frac{\varepsilon}{2})
  \\
  \gamma &=
  (1 - v^2)^{-1/2} =
  \qty(2 \varepsilon \qty(1 - \frac{\varepsilon}{2}))^{-1/2} =
  \frac{1}{\sqrt{2 \varepsilon}} \qty(1 - \frac{\varepsilon}{2})^{-1/2} \approx
  \frac{1}{\sqrt{2 \varepsilon}}
  \\
  \dd{t} &=
  \gamma \dd{\bar{t}} \approx
  \frac{\dd{\bar{t}}}{\sqrt{2 \varepsilon}}
\end{align*}

(b) $\dd{x} \approx \dd{\bar{x}} \sqrt{2 \varepsilon}$

\begin{align*}
  v &=
  1 - \varepsilon \implies
  v^2 = (1 - \varepsilon)^2 =
  1 - 2 \varepsilon + \varepsilon^2
  \\ \implies
  1 - v^2 &=
  1 - (1 - 2 \varepsilon + \varepsilon^2) =
  2 \varepsilon - \varepsilon^2 =
  2 \varepsilon \qty(1 - \frac{\varepsilon}{2})
  \\
  \gamma^{-1/2} &=
  (1 - v^2)^{1/2} =
  \qty(2 \varepsilon \qty(1 - \frac{\varepsilon}{2}))^{1/2} =
  \sqrt{2 \varepsilon} \qty(1 - \frac{\varepsilon}{2})^{1/2} \approx
  \sqrt{2 \varepsilon}
  \\
  \dd{x} &=
  \gamma^{-1} \dd{\bar{x}} \approx
  \dd{\bar{t}} \sqrt{2 \varepsilon}
\end{align*}

(c) $W' \approx 1 - \varepsilon (1 - W) / (1 + W)$

\textbf{TODO}

What are the relative errors on these approximations when $\varepsilon = 0.1$ and $W = 0.9$?

\textbf{TODO}

\textbf{16}
Use the Lorentz transformation, Equation 1.12, to derive (a) the time dilation, and (b) the Lorentz contraction formulae. Do this by identifying pairs of events where the separations (in time or space) are to be compared, and then using the Lorentz transformation to accomplish the algebra that the invariant hyperb b olae had been used for in the text.

(a)
To derive the time dilation formula, we choose two events that occur at $x = c$, and times $t_1$ and $t_2$. Thus, from $\obs$'s frame, the time elapsed between these two events is $\Delta t = t_2 - t_1$, and the distance between them is $\Delta x = 0$. Another observer, $\bar\obs$, moves with some velocity $v$ relative to $\obs$. As it passes through the lines $t = t_1$ and $t = t_2$, its clock moves forward by a time $\Delta \tau = \bar{t}_2 - \bar{t}_1$. We now use the Lorentz transformation to write $\Delta \tau$ in terms of $\obs$'s coordinates.
%
\begin{align*}
  \Delta \tau &=
  \bar{t}_2 - \bar{t}_1 =
  \gamma \qty[ (t_2 - v x_2) - (t_1 - v x_1) ] =
  \gamma \qty[ (t_2 - t_1) + (v x_1 - v x_2) ]
  \\ &=
  \gamma \qty[ \Delta t + v \Delta x ] =
  \gamma \qty[ \Delta t + v \cdot 0 ]
  \\ &=
  \gamma \Delta t
\end{align*}
%
and thus we have arrived at the formula for time dilation.

(b)
To derive the Lorentz contraction formula, we take a slightly different approach. In the $\obs$ frame, a stick lies parallel to $x$, such that its length $\ell = x_2 - x_1$. In this frame, the world lines of the two ends of the stick form vertical lines. Another observer, $\bar\obs$, moves with a velocity $v$, relative to $\obs$. Two events, $\mathcal{A}$ and $\mathcal{B}$ occur on either end of the stick, such that $\bar\obs$ observes the two events to be simultaneous. Thus, from the $\bar\obs$ frame, the events are located a distance $\Delta \bar{x} = \bar{\ell}$ apart, and $\Delta \bar{t} = 0$. However, from the $\obs$ frame, the events occur a distance $\Delta x = \ell$ apart, and a time separation $\Delta t \neq 0$.
%
\begin{align*}
  \ell &=
  x_2 - x_1 =
  \gamma \qty[ (\bar{x}_2 - v \bar{t}_2) - (\bar{x}_1 - v \bar{t}_1) ] =
  \gamma \qty[ (\bar{x}_2 - \bar{x}_1) + v (\bar{t}_1 - \bar{t}_2) ] =
  \gamma \bar{\ell}
  \\ \implies
  \bar{\ell} = \frac{\ell}{\gamma}
\end{align*}

\textbf{17}
A lightweight pole, $\SI{20}{\meter}$ long, lies on the ground next to a barn $\SI{15}{\meter}$ long. An Olympic athlete picks up the pole, carries it far away, and runs with it toward the end of the barn at a speed $0.8$. His friend remains at rest, standing by the door of the barn. Attempt all parts of this question, even if you can't answer some.

(a) How long does the friend measure the pole to be, as it approaches the barn?

We use the Lorentz contraction equation to find the length the friend measures.
%
\begin{align*}
  \bar\ell &=
  \ell / \gamma =
  \ell \sqrt{ 1 - v^2 } =
  \SI{20}{\meter} \sqrt{ 1 - 0.8^2 } =
  \SI{12}{\meter}
\end{align*}

(b) The barn door is initially open and, immediately after the runner and pole are entirely inside the barn, the friend shuts the door. How long after the door is shut does the front of the pole hit the other end of the barn, as measured by the friend? Compute the interval between the events of shutting the door and hitting the wall. Is it spacelike, timelike, or null?

From the runner's point of view, we must consider the length contraction of the barn

(c) In the reference frame of the runner, what is the length of the barn and the pole?

(d) Does the runner believe that the pole is entirely inside the barn when its front hits the end of the barn? Can you explain why?

(e) After the collision, the pole and runner come to rest relative to the barn. From the friend's point of view, the $\SI{20}{\meter}$ pole is now inside a $\SI{15}{\meter}$ barn, since the barn door was shut before the pole stopped. How is this possible? Alternatively, from the runner's point of view, the collision should have stopped the pole \emph{before} the door closed, so the door could not be closed at all. Was or was not the door closed with the pole inside?

(f) Draw a spacetime diagram from the friend's point of view and use it to illustrate and justify all your conclusions.

\textbf{18}

(a) The Einstein velocity-addition law, Equation 1.13, has a simpler form if we introduce the concept of the \emph{velocity parameter} $u$, defined by the equation
%
\begin{displaymath}
  v = \tanh u.
\end{displaymath}
%
Notice that for $-\infty < u < \infty$, the velocity is confined to the acceptable limits $-1 < v < 1$. Show that if
%
\begin{displaymath}
  v = \tanh u
\end{displaymath}
%
and
%
\begin{displaymath}
  w = \tanh U,
\end{displaymath}
%
then Equation 1.13 implies
%
\begin{displaymath}
  w' = \tanh(u + U).
\end{displaymath}
%
This means that velocity parameters add linearly.

There exists an identity:
%
\begin{displaymath}
  \tanh(x+y) = \frac{\tanh(x) + \tanh(y)}{1 + \tanh(x) \tanh(y)}.
\end{displaymath}
%
If we simply use $x=u$ and $y=U$, then we arrive at
%
\begin{displaymath}
  \tanh(u+U) = \frac{\tanh(u) + \tanh(U)}{1 + \tanh(u) \tanh(U)} = w'
\end{displaymath}

(b) Use this to solve the following problem. A star measures a second star to be moving away at speed $v = 0.9$. The second star measures a third to be receding in the same direction at $0.9$. Similarly, the third measures a fourth, and so on, up to some large number $N$ of stars. What is the velocity of the $N$th star relative to the first? Give an exact answer and an approximation useful for large $N$.

Let $w^N$ be the velocity of the $N$th star relative to the original star, which we will call star $0$. We will use an induction proof to find an expression for $w^N$. The base case is trivial, $w^0 = 0$, as the star does not move relative to itself. For the next case, $w^1 = v$, we still aren't really doing velocity addition, so we will skip to the $w^2$ case, where things get interesting, though we will later show that the general expression holds for $w^0$ and $w^1$.

For $w^2$, we simply use the Einstein velocity-addition law:
%
\begin{displaymath}
  w^2 =
  \tanh(u + U) =
  \tanh(\tanh^{-1} v + \tanh^{-1} w^1) =
  \tanh(2 \tanh^{-1} v).
\end{displaymath}
%
Now I will prove that this is one instance of a general expression, that $w^N = \tanh(N \tanh^{-1} v)$.
%
\begin{align*}
  & w^N =
  \tanh(N \tanh^{-1} v)
  \\ \implies &
  \tanh^{-1} w^N =
  N \tanh^{-1} v
  \\ \implies &
  \tanh^{-1} w^N + \tanh^{-1} v =
  N \tanh^{-1} v + \tanh^{-1} v
  \\ \implies &
  \tanh^{-1} w^N + \tanh^{-1} v =
  (N+1) \tanh^{-1} v
  \\ \implies &
  \tanh( \tanh^{-1} w^N + \tanh^{-1} v ) =
  \tanh( (N+1) \tanh^{-1} v )
  \\ \implies &
  w^{N+1} =
  \tanh( (N+1) \tanh^{-1} v ).
\end{align*}
%
If you can believe the last step, then this is proof that it works for all $N$. The last step is saying that, if we have a star $N$, moving away from star $0$ at a speed $w^N$, and another star $N+1$, moving away from star $N$ at a speed $v$, then star $N+1$ as observed from star $0$ is given by the Einstein velocity-addition law, meaning we can rewrite that expression as $w^{N+1}$.

Now I'd like to go back and show that this works for $N=0$ and $N=1$. For $N=1$, we get
%
\begin{displaymath}
  w^1 = \tanh( 1 \tanh^{-1} v ) = v,
\end{displaymath}
%
which is what we would expect, and for $N=0$, we get
%
\begin{displaymath}
  w^0 = \tanh( 0 \tanh^{-1} v ) = 0,
\end{displaymath}
%
which we also expect. So the general expression,
%
\begin{displaymath}
  w^N = \tanh( N \tanh^{-1} v ),
\end{displaymath}
%
holds true for all non-negative integers $N$. We can also write this more elegantly as
%
\begin{displaymath}
  w^N = \tanh( N u ).
\end{displaymath}

Now we want to consider the behaviour at large $N$. We first write $\tanh$ in its exponential form, as
%
\begin{displaymath}
  w^N = \frac{1 - \exp(-2 N u)}{1 + \exp(-2 N u)}.
\end{displaymath}
%
When $N$ is very large, then the exponential in the bottom term goes to zero, allowing us to rewrite it as
%
\begin{displaymath}
  w^N \approx 1 - \exp(-2 N u).
\end{displaymath}
%
We can go a step further. Since $v = 0.9$, $u \approx 1.47$, which we can neglect for large $N$, and so we finally arrive at
%
\begin{displaymath}
  w^N \approx 1 - \exp(-2 N).
\end{displaymath}

\textbf{19}

(a) Using the velocity parameter ($u$) introduced in Exercise 18, show that the Lorentz transformation equations, Equation 1.12, can be put in the form
%
\begin{align*}
  \bar{t} &=  t \cosh u - x \sinh u & \bar{y} &= y
  \\
  \bar{x} &= -t \sinh u + x \cosh u & \bar{z} &= z
\end{align*}

We start by putting $\gamma$ in terms of $u$.
%
\begin{align*}
  \gamma &=
  (1 - v^2)^{-1/2} =
  (1 - \tanh^2 u)^{-1/2} =
  \frac{1}{\sech u} =
  \cosh u.
\end{align*}
%
Now we can substitute this into the Lorentz transformation equations
%
\begin{align*}
  \bar{t} &=
  \gamma (t - v x) =
  \cosh u (t - x \tanh u) =
  t \cosh u - x \sinh u
  \\
  \bar{x} &=
  \gamma (x - v t) =
  \cosh u (x - t \tanh u) =
  x \cosh u - t \sinh u
\end{align*}

(b) Use the identity $\cosh^2 u - \sinh^2 u = 1$ to demonstrate the invariance of the interval from these equations.
%
\begin{align*}
  \dd{s}^2 &= -\dd{t}^2 + \dd{x}^2 + \dd{y}^2 + \dd{z}^2
  \\
  \dd{\bar{s}}^2 &=
  -\qty(\dd{t} \cosh u - \dd{x} \sinh u)^2
  +\qty(\dd{x} \cosh u - \dd{t} \sinh u)^2
  + \dd{y}^2 + \dd{z}^2
  \\ &=
  -\qty(\dd{t}^2 \cosh^2 u -
        \cancel{\dd{x} \dd{t} \sinh u \cosh u} +
        \dd{x}^2 \sinh^2 u)
  \\ &+
  \qty(\dd{x}^2 \cosh^2 u -
        \cancel{\dd{t} \dd{x} \sinh u \cosh u} +
        \dd{t}^2 \sinh^2 u)
  + \dd{y}^2 + \dd{z}^2
  \\ &=
  -\dd{t}^2 \cancel{\qty(\cosh^2 u - \sinh^2 u)} +
  \dd{x}^2 \cancel{\qty(\cosh^2 u - \sinh^2 u)}
  + \dd{y}^2 + \dd{z}^2
  \\ &=
  \dd{s}^2
\end{align*}

(c) Draw as many parallels as you can between the geometry of spacetime and ordinary two-dimensional Euclidean geometry, where the coordinate transformation analogous to the Lorentz transformation is
%
\begin{align*}
  \bar{x} &= +x \cos\theta + y \sin\theta,
  \\
  \bar{y} &= -x \sin\theta + y \cos\theta.
\end{align*}
%
What is the analog of the interval? Of the invariant hyperbolae?

The analog of the interval would be
%
\begin{align*}
  \dd{\bar{r}}^2 &=
  \dd{\bar{x}}^2 + \dd{\bar{y}}^2 =
  (\dd{x} \cos\theta + \dd{y} \sin\theta)^2 +
  (\dd{y} \cos\theta - \dd{x} \sin\theta)^2 +
  \\ &=
  \dd{x}^2 \cos^2 \theta +
  \cancel{2 \dd{x} \dd{y} \sin\theta \cos\theta} +
  \dd{y}^2 \sin^2 \theta
  \\ &+
  \dd{y}^2 \cos^2 \theta -
  \cancel{2 \dd{x} \dd{y} \sin\theta \cos\theta} +
  \dd{x}^2 \sin^2 \theta
  \\ &=
  \dd{x}^2 (\sin^2 \theta + \cos^2 \theta) +
  \dd{y}^2 (\sin^2 \theta + \cos^2 \theta)
  \\ &=
  \dd{x}^2 + \dd{y}^2
\end{align*}
%
The analog of the invariant hyperbola would be the invariant circle, as $\bar{x}$ and $\bar{y}$ are both equations of a circle.

\textbf{20}
Write the Lorentz transformation equations in matrix form.

\begin{align*}
  \bar{t} &= \gamma (t - v x) &
  \bar{t} &= \gamma t - \gamma v x + 0 y + 0 z
  \\
  \bar{x} &=  \gamma (x - v t) &
  \bar{x} &= -\gamma v t + \gamma x + 0 y + 0 z
  \\
  \bar{y} &= y & \bar{y} &= y
  \\
  \bar{z} &= z & \bar{z} &= z
  \\
  \mqty( \bar{t} \\ \bar{x} \\ \bar{y} \\ \bar{z} ) &=
  \mqty( \gamma   & -\gamma v & 0 & 0 \\
        -\gamma v &  \gamma   & 0 & 0 \\
         0        &  0        & 1 & 0 \\
         0        &  0        & 0 & 1 )
  \mqty( t \\ x \\ y \\ z )
\end{align*}

\textbf{21}

(a) Show that if the two events are timelike separated, there is a Lorentz frame in which they occur at the same point, i.e. at the same spatial coordinate values.

If the two events are timelike separated, then it must be possible to have an object with a worldline which crosses the two points, as it is inside the light cone. If such an object exists, then we can draw a Lorentz frame for it, so its time axis, $\bar{t}$ is that line, meaning $\bar{x} = 0$ for both events.

(b) Similarly, if the two events are spacelike separated, there is a Lorentz frame in which they occur simultaneously.

If the two events are spacelike separated, then it must be possible to draw a coordinate frame where $\bar{x}$ has slope $v$ in $\obs$'s frame. This means that $\bar{t} = 0$ for both events, and so they are simultaneous.

\end{document}


% -*- tex -*-

\documentclass[12pt]{article}

\begin{document}

\section*{Beam Smearing of Galaxy Velocity Fields}

% \bigskip\noindent
Version: PJT 22-jul-2019

\subsection*{Notation}

$N,V,S$ are the model density,velocity and velocity dispersion, and
$n,v,s$ those in the smoothed observed velocity field.  We align the
major axis of the tilted disk along the X axis (PA=90) where this
matters in the equations below.  The radius and velocity
if often normalized to $R_0$ and $V_0$.

\section{V(R): Rotation Curve (mom1)}

For convenience we've parameterized our input model rotation curves. We use the notation $r = R/R_0$, where $R_0$
is a radius scale factor.  All rotation curves have the property they are linear near the center, and
either flatten off, or drop at larger radii.

\noindent
The first one is an unrealistic but convenient ``fixed shape'' exponentially (but see Greisen's eq.(2))
$$
V = V_0 ( 1 - e^{-r} )         \eqno(1)
$$
Here is a family of curves defined by a shape parameter via
the exponent $m$ (for $m -> \infty$ the linear+flat toy model is reproduced):
$$
V_m = V_0 {   {r}  \over  { (1+r^m)^{1/m} } }     \eqno(2a)
$$
Solving for the radius where a fraction $f$ of the peak is reached (Greisen uses 99\% to denote
this as $R_{max}$) one finds
$$
     R_f = R_0 { f \over { (1-f^m)^{1/m} } }     \eqno(2b)
$$
For $m=2$ this is the familiar logarithmic potential (BT, pp.45, eq. 2.54 and eq. 3.77)
$$
    \Phi = {1\over 2} V_0^2
                     \ln{ \left( R_0^2 + R^2 \right) }  \eqno(2a)
$$
Greisen's paper also mentions the very old Brandt curves eq. (4) (using our notation):
$$
V_m = V_o {   r \over { (1/3 + 2/3 r^m)^{3/(2m)}   }    }     \eqno(3)
$$
where $m$ is the ``Brandt index''. Note that Brandt curves at large radii have no dark matter, i.e. $v \propto r^{-1/2}$.
Levy's paper uses the universal Persic rotation curve profiles, with the $L_B/L_{B*}$ shape parameter.

\section{N(R): Density Profile (mom0)}

The gas density profile is assumed independent of the rotation curve, so these need to be parameterized as well.
Currently we have a exponential dropoff option (for constant take a very large $R_e$):
$$
   N(R) = N_0 e^{-R/R_e}     \eqno(4)
$$
where roughly $R_e/R_{to} \approx 1.93 \pm 0.96$. Note the turnover radius $R_{to}$ and the
beforementioned $R_0$ are not the same, their ratio $R_{to}/R_0 > 1$ but will approach 1 as
$m$ gets very large. We could equate $R_{to} = R_{99}$ ($R_{max}$ in Greisen).

\section{S(R): Velocity Dispersion (mom2)}

We normally assume the velocity dispersion of the gas to be constant as function of radius, but in order
to study any possible degeneracy, we could relax this and e.g. assume a larger velocity dispersion in the
central bulge regions.  We can use the same scaling radius ($R_0$ for this).   In the current modeling
code we keep the velocity dispersion constant:
$$
   S(R) = S_0
$$

\section{Beam Smearing Correction (BSC): $\delta$}

Begeman's 1989 BSC algorithm uses an implicit relationship between the Observed velocity, $v$, and the Model velocity, $V$,
which we summarize here as follows:
$$
   v = V + \delta     \eqno(5)
$$
where the BSC term $\delta$ is given by
$$
\delta = {b^2 \over n} ( {\partial{V}\over\partial{x}} {\partial{N}\over\partial{x}} + {\partial{V}\over\partial{y}} {\partial{N}\over\partial{y}}
 + N ({\partial^2{V}\over\partial{x^2}} + {\partial^2{V}\over\partial{y^2}}) / 2)       \eqno(6a)
$$
or our shorthand notation
$$
     \delta = {b^2 \over n} ( V_x N_x + V_y N_y + N (V_{xx} + V_{yy}) / 2)        \eqno(6b)
$$
which contains a 1st and 2nd order derivative term.  Here $b$ the size of the beam (FWHM/2.355)
in terms of the pixel size, a dimensionless number of order 1-2. Begeman (priv.comm.) tried the
Lucy method to compute $V$ from $v$ but did not succeed. A little better were the
gaussian profile fits using the Schwarz method (need ref).

We now discuss a few common cases where $\delta$ can be evaluated analytically:

\subsection{Constant Density}

For the simplified case where the density is constant,
the 1st order terms drop out and with $n=N$ we are left with:
$$
    \delta = {b^2\over 2} ( V_{xx} + V_{yy}) = {b^2\over 2} \nabla V      \eqno(7)
xs$$
which looks like the Inhomogeneous Helmholtz equation with wavenumber $\sqrt{2}/b$.

For a flat rotation curve (and probably all) this term will have a $3\phi$ type
pattern.

\subsection{Linear rotation curve}

It is also easy to see now that for a linearly rising rotation curve
$$
V(x,y) = \Omega x     \eqno(8)
$$
and with a constant density the BSC term is 0.

In the case where the density is not constant, a linearly rising rotation curve follows
$$
   \delta =  b^2   \Omega  {N_x \over n}     \eqno(9)
$$

\subsection{Flat rotation curve}

For a flat rotatation curve the velocity field only depends on the position angle
$$
V(r,\phi) = V(\phi) = V_0 \sqrt{1-{\sin^2\phi \over \cos^2i}} \sin i          \eqno(10)
$$
and in a constant density disk this simplifies to
$$
\delta =  {b^2\over 2} \nabla V =  {b^2\over 2} {1\over r^2}   {\partial^2{V}\over\partial{\phi^2}}        \eqno(11)
$$
or if my math was done right
$$
\delta =  {-\alpha} { b^2\over 2} {1\over r^2}
  {  { (1-\alpha \sin^2\phi)(\cos^2\phi-\sin^2\phi) + \alpha \sin^2\phi \cos^2\phi}   \over { (1-\alpha \sin^2\phi)^{3/2}} }        \eqno(12)
$$

\section{Pragmatic Fitting}

The explicit nature of eq. (5) means we cannot compute the model directly from the observations,
except under special circumstances, e.g. assuming a flat rotation curve [sic] and/or
constant density disk. However, for a parameterized rotation curve a model can be derived as
follows:

Using the family of models in eq.(2) we have three model parameters
($V_0,R_0,m$), of which only $m$ is a scale-free (shape) parameter.
For given beam size $B$ this will result in a new
rotation curve, but generally with a different shape,
will affect mostly $R_0$
and $m$, but not much, if any, $V_0$.   We call the fitted
values ($V_1,R_1,m_1$). We can create a grid of such models,
and retrieve the input model
($V_0,R_0,m$) from this. Degeneracies are of course possible.

\section{Random Notes}

\subsection{exp vs. core}

Comparing Greisen's ``exp'' curve with the ``core-m'' family, the m=2 curve crosses over around $R/R_0 \approx 3$. Doing a fit
of the exp to core-m has the usual mixed results:   shape=(V0=102.43,R0=154.07,m=2.05),
mod=(102.9,146.7,1.91), slit=(102.7,146.7,1.91) and ring=(103.9,136.3,1.72), which certainly visually agrees with $m \approx 1.8-2.2$.
See also {\tt model\_rot\_curve.py}.

\subsection{kinematic inclination}

In our fits we fix the inclination to the morphological inclination. The kinematic inclination is typically a few degrees lower
than the morphological one, see {\tt smooth\_inc.py}. Either way, a residual velocity field always shows the familiar $3\phi$ symmetry.

\subsection{rotcur fitting}

Fitting using rotcur often over-estimates. Near the center this is understandable, since there are few points, but in some cases
in the outer parts this is also visible. Hence we started using rotcurshape, but given the kinematic inclination effect, the slit
and shape will then give different results.

\subsection{Missing Features in these Models}

There are still a few things missing about these models that make them look somewhat unrealistic.  Perhaps the most obvious one being
the absence of spiral arms, bars, or clumps in general. We do have an option to create clumpy galaxies and study the rotation curves
under different seeds.
Another feature of galaxies is thin and thick disks rotatating at
different speeds. The models discussed here are all infinitesimally thin, but the modeling code has options to change this.

\end{document}


% Lecture for ph2a Caltech 2017: Vibrations and Waves
\documentclass[pdf,hideothersubsections]{beamer}
\usepackage{beamerthemeshadow}
\mode<presentation>
  {
    \usefonttheme{structuresmallcapsserif}
    \usetheme{CambridgeUS}
    \usecolortheme{seahorse}
  }

\usepackage{svg}
\usepackage{xmpmulti}

\usepackage{hyperref}
\hypersetup{
    pdffitwindow=true,     % window fit to page when opened
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=orange,          % color of internal links (change box color with linkbordercolor)
    citecolor=green,        % color of links to bibliography
    filecolor=magenta,      % color of file links
    urlcolor=blue           % color of external links
}

% Fonts/encoding
\renewcommand{\UrlFont}{\tiny}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage[sc,medium,raggedright]{titlesec}
\usepackage{newtxmath}
%\usepackage{libertine}
\usepackage[osf]{ebgaramond}

\graphicspath{{Figures/}}

\begin{document}
\title{Superposition}
\author{Caltech: ph2a}
\date{28 - Sep - 2017}
%\logo{\includegraphics[height=0.5cm]{../caltech_logo.png}}

\frame{\titlepage}

\frame{\frametitle{Table of contents}\tableofcontents}

\setbeamerfont{footnote}{size=\tiny}

\section{Previous Summary}
\begin{frame}
\frametitle{Tuesday}
\begin{itemize}
\item Many physical systems involving small vibrations can be represented as a Simple Harmonic Oscillator.

\item Complex exponentials can be used to solve oscillator problems.

\item Guess solutions; set constants by setting (Dirichlet, Neumann, Cauchy) boundary conditions.

\item Imaginary part of the complex frequency corresponds to damping.
\end{itemize}
\end{frame}

\section{Damped Electrical Circuit}
\begin{frame}
\frametitle{Complex approach to damped SHO}
Use the same approach as before:
\begin{itemize}
\item $L \ddot{Q} + R \dot{Q} + Q/C = 0$
\pause
\item $\tilde{Q}(t) = A e^{i (\omega t + \phi_0)}$
\pause
\item $-L \omega^2 \tilde{Q} + i \omega R \tilde{Q} + \tilde{Q}/C = 0$
\end{itemize}
\pause
Dividing by $L \tilde{Q}$, we get a quadratic equation for $\omega$: \\
\pause
\begin{center}
$\omega = \sqrt{\omega_0^2 - \Big(\frac{R}{2 L}\Big)^2} + i \frac{R}{2 L}$ \\
\end{center}
\pause
Let's call the real part $\omega$ and plug back into the guess for x(t):
\pause
\begin{center}
$\tilde{x} = A e^{i (\omega t + \phi_0)} e^{-(R/2 L) t}$\\
\end{center}
\pause
We can define the time constant: $\tau \equiv 2 L/R$, so that: \\
\pause
Taking the real part, we find the solution as before (with the damping): \\
\pause
\begin{center}
$Re\left\{\tilde{Q}\right\} = Q = A \cos(\omega t + \phi_o) e^{-t/\tau}$
\end{center}

\end{frame}

\begin{frame}
\frametitle{Decaying Oscillation}

\centering
\includegraphics[width=\textwidth]{damped_sine_wave.pdf}

\end{frame}

\subsection{Damped Oscillations of a Black Hole}
\begin{frame}
\frametitle{Black Hole Vibrations: Yesterday's Press Release}
\centering
\includegraphics[width=\textwidth]{GW170814-TF.jpg}

\begin{itemize}
   \item \url{https://www.ligo.caltech.edu/video/ligo20160211v10}
   %\item \url{http://demonstrations.wolfram.com/DrivenDampedOscillator/}
   %\item \url{http://demonstrations.wolfram.com/SimpleHarmonicMotionForASpring/}
\end{itemize}
\end{frame}

\subsection{Applying Boundary Conditions}

\frame{\frametitle{Boundary Conditions}
In both cases, there are two free constants (A \& B, or D \& $\phi_0$). \\
\pause
These constants are set to force the solution to match any 'Boundary' conditions: \pause
\begin{itemize}
\item initial displacement \pause
\item initial velocity \pause
\item e.g., mass is released at t=0 with x = x$_0$
\end{itemize}

}

\frame{\frametitle{Boundary Conditions: Example}

}

\section{Sum of Vibrations}
\begin{frame}
\frametitle{Adding sinusoids}
Addition of two sinusoidal signals can be handled by vector addition of complex \emph{phasors}.
\pause
\begin{columns}[T]
  \begin{column}{0.5\textwidth}
    \begin{centering}
      \includegraphics[width=4cm]{RotatingVectors2.png}
    \end{centering}
  \end{column}
  \pause
  \begin{column}{0.5\textwidth}
    \begin{centering}
      \includegraphics[width=4cm]{phasoraddition1a.png}
    \end{centering}
  \end{column}

\end{columns}

\end{frame}

\subsection{Two Vibrations}
\begin{frame}
\frametitle{Two Sine Waves}

\begin{itemize}
\item Different Phases (demo)
\item Different Frequencies (demo)
\end{itemize}

\end{frame}
%\subsection{Many vibrations with random phase}

%\subsection{Acoustic Beats}

\section{The Pendulum}
\begin{frame}
\frametitle{Pendula}

\begin{columns}[T]
   \begin{column}{0.5\textwidth}
    The LIGO detectors which were used to detect those black hole signals, use lasers and mirrors\footnotemark to detect those tiny vibrations in the space-time continuum. To isolate the mirrors from the ground motion, the mirrors are hung with
glass fibers as pendula\footnotemark.

   \end{column}

   \pause
   \begin{column}{0.5\textwidth}
   \includegraphics[height=6cm]{LIGO-Pendulum-diagram.png}

   %\pause
   %\includegraphics[height=4cm]{LIGO-Mirror.jpg}
   \end{column}

\end{columns}
\footnotetext[1]{\url{https://www.ligo.caltech.edu/video/ligo20170216v}}
 \footnotetext[2]{\url{https://www.khanacademy.org/science/physics/mechanical-waves-and-sound/harmonic-motion/v/pendulum}}

\end{frame}

\begin{frame}
\frametitle{Pendula}

\begin{columns}[T]
   \begin{column}{0.5\textwidth}
    The LIGO detectors which were used to detect those black hole signals, use lasers and mirrors\footnotemark
to detect those tiny vibrations in the space-time continuum. To isolate the mirrors from the ground motion, the mirrors are hung with
glass fibers as pendula\footnotemark.

   \end{column}

   \pause
   \begin{column}{0.5\textwidth}
   %\includegraphics[height=6cm]{LIGO-Pendulum-diagram.png}

   %\pause
   \includegraphics[height=4cm]{LIGO-Mirror.jpg}
   \end{column}

\end{columns}
\footnotetext[1]{\url{https://www.ligo.caltech.edu/video/ligo20170216v}}
 \footnotetext[2]{\url{https://www.khanacademy.org/science/physics/mechanical-waves-and-sound/harmonic-motion/v/pendulum}}

\end{frame}

\subsection{Analysis}
\begin{frame}
\frametitle{Construct the Diff. Eq.}
\begin{columns}[T]

  \begin{column}{0.3\textwidth}
     \includegraphics[width=\textwidth]{Simple_pendulum_generalized_coordinates.pdf}

  \end{column}
\pause
  \begin{column}{0.7\textwidth}
  \begin{enumerate}
  \item Motion of pendulum is \emph{rotational}, not translational, so instead of $F = m a$, use $\tau = I \ddot{\theta}$, where $\tau$ is the torque, and $\theta$ is the angle of the pendulum wire. \\
    \pause
  \item In the case of a point mass rotating around an origin, $I = m r^2$. \\
    \pause
  \item The torque is the cross product of the Force and the lever arm: $\vec{\tau} = \vec{r} \times \vec{F}$, so: \\
  \end{enumerate}
  \pause
  \begin{align*}
I \ddot{\theta} &= \vec{r} \times \vec{F} \\
m L^2 \ddot{\theta} &= -m g L \sin{\theta} \\
\ddot{\theta} &= -\frac{g}{L} \sin{\theta} \\
  \end{align*}
  %\pause
  %Ugh - sine is not a linear function...
  \end{column}

\end{columns}

\end{frame}
\subsection{Simulation}
\begin{frame}
\frametitle{Numerically Solve the Pendulum Problem}
\begin{itemize}
\item $\ddot{\theta} = -\frac{g}{L} \sin{\theta}$
\pause
\item $\dot{\theta} = \int_{t_1}^{t_1 + \delta t} \ddot{\theta}(u) du $
\pause
\item $\theta = \int_{t_1}^{t_1 + \delta t} \dot{\theta}(u) du $
\pause
\item Interactive Demo: \url{https://phet.colorado.edu/en/simulation/pendulum-lab}
\end{itemize}
\end{frame}

\subsection{Linearized Solution}
\begin{frame}
\frametitle{Linearizing the Pendulum: I}
\begin{itemize}
\item In many physical situations (not just black holes), the restoring force is not linear; i.e. the potential energy is not just quadratic.
\pause
\item Luckily, many interesting and useful analyses can be done by linearization:
\pause
\item Assume that: (1) The potential exists, (2) We're analyzing the equilibrium position, and (3) we care only about small motions around equilibrium.
\end{itemize}
\pause

\begin{block}{Taylor Series expansion: Ch.1 (Eq. 1-9)}
$V(x) = V(0) + V'(0) x + \frac{1}{2} V''(0) x^2 + \ldots$
\end{block}
\pause

Equilibrium $\Rrightarrow V'(0) = 0$, \& $F = -\frac{dV}{dx}$, so...
\pause
$F = - k_{eff} x$

\end{frame}

\begin{frame}
\frametitle{Linearizing the Pendulum: II}
Equation for the frictionless pendulum:
\begin{align*}
\onslide<1->{\ddot{\theta} &= -\frac{g}{L} \sin{\theta} \\}
\onslide<2->{  &\simeq -\frac{g}{L} \Big[\theta - \frac{\theta^3}{3 !} + \ldots \Big] \\}
\onslide<3->{  &\simeq -\frac{g}{L} \theta}
\end{align*}
\onslide<4-> {Which has the same form as SHO equation for the mass-spring and RLC systems and so, as before, $\tilde{\theta} = A e^{i (\omega t + \phi_0)}$}

\end{frame}

\section{Summary}
\begin{frame}
\frametitle{Summary}
\begin{enumerate}
\item For linear systems, the resultant of two vibrations is just their sum.
\pause
\item Summation of two oscillations with same period but different phase can be solved by vector addition of their complex phasors.
\pause
\item Sum of two oscillations with different frequencies leads to \emph{beats}.
\pause
\item Many non-linear systems can be analyzed by linearization.
\pause
\item Beating is apparent in physical systems even without non-linearity.
\end{enumerate}
\end{frame}

\end{document}


\documentclass[main.tex]{subfiles}
\begin{document}

\section*{Thu Oct 10 2019}

Last lecture we introduced tensors.

An example of those is the EM tensor \(F_{\mu \nu}\):

\begin{equation}
  F_{\mu \nu} = \left[\begin{array}{cccc}
  0 & E_{x}/c & E_y/c & E_z/c \\
  -E_x/c & 0 & -B_x & B_y \\
  -E_y/c & B_x & 0 & -B_z \\
  -E_z/c & -B_y & B_z & 0
  \end{array}\right]\,,
\end{equation}
%
which, it can be checked, transforms as a \((0,2)\) tensor. Also, we can define the current vector \(j^{\mu} = (c \rho, j^{i})\). Then, the Maxwell equations read:

\begin{equation}
  \partial_{\mu} F^{\mu \nu }= \mu_0 j^{\nu}
  \qquad \text{and} \qquad
  \partial_{[\mu} F_{\nu \rho]}\,.
\end{equation}

They are covariant!

\subsection{Particles in motion}

In Newtonian mechanics, the motion of a particle is described by a function of time \(x^{i} = x^{i}(t)\).

In special relativity, we introduce the concept of \emph{worldline} of a particle: the one-dimensional set of spacetime events in which the particle is found.
It must be parametrized with respect to some parameter \(\lambda\), such that \(x^{\mu} = x^{\mu}(\lambda)\). A preferred choice for \(\lambda\) is the proper time of the particle, \(\lambda = \tau\), which is defined by \( \dd{s^2} = - \dd{\tau^2}\).

We then define the 4-velocity:
%
\begin{equation}
  u^\mu = \dv{x ^\mu}{\tau} \,.
\end{equation}

It is a tensor since it is the product of a scalar and a tensor.

Multiplying \(u^\mu u_{\mu}\) we always get \(-c^{2}\), since:

\begin{equation}
  u^{\mu} u_{\mu} = \frac{\dd{x^{\mu}} \dd{x_{\mu}}}{\dd{\tau^{2}}} = -c^2 \frac{\dd{s^{2}}}{\dd{s^2}}
\end{equation}

We can make the expression of the 4-velocity explicit using \(\dd{\tau} = \gamma \dd{t}\), which gives us \(u^{\mu} = (\gamma c, \gamma v^{i})\).
In the frame of the particle the particle is not moving, therefore \(u^{\mu} = (c, 0)\).

The \emph{four-momentum} of a massive particle with mass \(m\) is defined as:

\begin{equation}
  p^{\mu} = m u^{\mu} = (m \gamma c, m \gamma v^{i})\,.
\end{equation}

The component \(p^{0}\) is equal to \(mc\) at \(v=0\). What does it look like in the nonrelativistic approximation? we can expand it for small \(v/c\):

\begin{equation}
  \frac{mc}{\sqrt{1 - \frac{v^{2}}{c^{2}}}} \sim
  mc \qty(1 + \frac{v^{2}}{2 c^{2} } )
  = mc + \frac{1}{c} \frac{mv^{2}}{2}\,.
\end{equation}

We get the mass, plus a kinetic energy term: more explicitly, \(cp^0 = mc^{2} + \frac[i]{1}{2} m v^{2}\).

We can rewrite Newton's first law in SR:

\begin{proposition}[Newton I]
A free particle moves with constant \(u^{\mu}\), or

\begin{equation}
  \dv{u^{\mu}}{\tau} = 0
\end{equation}
\end{proposition}

To express this in an easier way we introduce the 4-acceleration:

\begin{equation}
  a^{\mu} \defeq \dv{u^{\mu}}{\tau} = \dv[2]{x^{\mu}}{\tau}
\end{equation}

We now wish to introduce the concept of a path minimizing proper time.
Recall Snell's law, which allows us to relate the angles of incidence of light when it passes between one medium to another, if they have different indices of refraction:

\begin{equation}
  n_1 \sin(\theta_1 ) = n_2 \sin(\theta_2 )
  \qquad \text{or} \qquad
  \frac{\sin(\theta_{2})}{\sin(\theta_{1})} = \frac{n_1}{n_2 } = \frac{v_2}{v_1 }\,.
\end{equation}

It can be shown that a beam of light following this law is equivalent to the beam minimizing the time it takes to move from a point in one medium to a point in the other.

Analogously, saying that a massive particle travels along the worldline which minimizes \(\tau\) is equivalent to Newton's first principle.

We want to perturb a generic  worldline \(x^{\mu}\) with some \(\dd{x^{\mu}}\), and consider the proper time functional \(\tau\) which gives the proper time of a generic trajectory: we impose

\begin{equation}
  \frac{\tau \qty[x^{\mu} + \varepsilon^\mu] - \tau \qty[x^{\mu}]}{\abs{\varepsilon ^\mu} } = \frac{\delta \tau}{\delta x^\mu} \overset{!}{=}  0\,,
\end{equation}
%
where a limit \(\abs{\varepsilon^{\mu}} \rightarrow 0 \) is implied, and only the linear terms are considered.

The proper time functional for paths between \(A\) and \(B\) is given \(\tau = \int _A^B \dd{\tau}\).
We can rewrite it as:

\begin{equation}
  \tau = \int_A^B \dd{\tau} \frac{\dd{\tau^2}}{\dd{\tau^2}}
  = \int_A^B \dd{\tau} \frac{-\eta_{\mu \nu}\dd{x^{\mu} \dd{x^{\nu}}}}{\dd{\tau^2}}\,.
\end{equation}

We now consider a perturbation \(\varepsilon^{\mu} = \delta^{\mu}_1 \delta x\):

\begin{equation}
  \tau_{AB}[x + \varepsilon] = \int_A^B \dd{\tau}
  \qty[\qty(\dv{t}{\tau})^2
  - \frac{1}{c^{2}} \qty(\dv{t}{\tau} + \dv{\delta x}{\tau})^2
  - \frac{1}{c^{2}} \qty(\dv{y}{\tau})^2
  - \frac{1}{c^{2}} \qty(\dv{z}{\tau})^2]\,.
\end{equation}

We can discard a second order term \(\qty(\dv*{\delta x}{\tau})^2\), and subtract off \(\tau_{AB}[x]\): we are left with

\begin{equation}
  \delta \tau = - \frac{2}{c^{2}} \int_A^B \dd{\tau} \dv{x}{\tau} \dv{\delta x}{\tau}
\end{equation}

Now, we integrate by parts, disregard the boundary terms since the endpoints of the path cannot be deformed, and get:

\begin{equation}
  \frac{\delta \tau_{AB}}{\delta x} = + \frac{2}{c^{2}} \int_A^B \dd{\tau} \dv[2]{x}{\tau} \,,
\end{equation}

which proves the equivalence for this type of perturbation, the others are analogous.

\begin{bluebox}
Let us write a more general sequence of equations, somewhat informally:
%
\begin{subequations}
\begin{align}
\delta \qty(\int_{A}^{B} \dd{\tau }) &=
- \delta \int  \frac{ \dd{x^{\mu }} \dd{x_{\mu }}}{ \dd{\tau^2}} \dd{\tau^2}  \marginnote{Expand \(\dd{s^2}\)} \\
&= - \int \frac{\qty( \dd{x_{\mu }} + \dd{\epsilon_{\mu }}) \qty( \dd{x^{\mu }} + \dd{\epsilon^{\mu }})}{ \dd{\tau^2}} \dd{\tau }  \marginnote{Perturb}\\
&= - 2 \int \frac{ \dd{\epsilon_{\mu } \dd{x^{\mu }}}}{ \dd{\tau^2}} \dd{\tau }  \marginnote{Discard terms of order different than 1 in the perturbation}\\
&= + 2 \int \epsilon_{\mu } \dv[2]{x^{\mu }}{\tau } \dd{\tau }
\overset{!}{=} 0
\marginnote{Integrate by parts}
\,,
\end{align}
\end{subequations}
%
which must hold for any \(\epsilon_{\mu }\): so, by the fundamental lemma of variational calculus, we must have
%
\begin{align}
\dv[2]{x^{\mu }}{\tau } = 0
\,.
\end{align}
\end{bluebox}

The generalization of Newton's second law, which at low speeds is \(F^{i} = m a^{i}\), can be similarly restated as \(\delta S = 0\), for the action \(S = \int L \dd{\tau}\), where \(L\) is the Lagrangian for the system.

\subsection{Motion of light rays}

For light we cannot compute \(u^{\mu}\) with the previous definition, since its proper time is always zero.

Instead, we \emph{define} \(u^{\mu}\) to be a normalized null-like vector, such that locally \(x^{\mu} = \lambda u^{\mu}\) for some \(\lambda\).

We know from quantum mechanics that \(E = \hbar \omega\), where \(\hbar = h / (2 \pi)\) and \(\omega = 2 \pi / T = 2 \pi f\).

The momentum is proportional to the wavevector \(k^{i}\): \(p^{i} = \hbar k^{i} / c\). The relativistic generalization of this fact is

\begin{equation}
  p^{\mu} = \qty(\frac{\hbar \omega}{c}, \frac{\hbar k^{i}}{c}) = \frac{\hbar k^{\mu}}{c}\,.
\end{equation}

Since the momentum of light must be null-like (\(p_{\mu } p^{\mu } = 0\)) we have that necessarily \(\omega = \abs{k} \).

\subsection{Doppler effect}

We take a special case: radiation goes in the same direction as the observer.
In the \(O\) frame we have \(k^{\mu} = (\omega, \omega,0,0)\).

The observer, moving with velocity \(v\), measures \(k^{\prime \mu}\). This can be easily computed with a Lorentz transformation: \(k^{\prime \mu} = \tensor{\Lambda}{^\mu_\nu} k^\nu\).

We are mostly interested in \(k^{\prime 0} = \omega'\): it comes out to be \(\omega' = \gamma \omega + (- \gamma \beta)\omega = (1- v/c) \gamma \omega\).

Some notes: at slow speeds \(\omega' \approx (1-v/c) \omega\); we have \(f'<f\) when source and observer are moving away from each other. This can be readily proven by considering either \(k^{\mu } = (\omega , -\omega , 0,0)\) or \(\beta \rightarrow - \beta \).

\end{document}


\subsection{Invariance of convolutional layers (rotation, translation)}


\section{Alternating Series}\label{sec:AlternatingSeries}

Next we consider series with both positive and negative terms, but in
a regular pattern: they alternate, as in the \dfont{alternating
  harmonic series}:
$$
  \sum_{n=1}^\infty {(-1)^{n-1}\over n}=
  {1\over1}+{-1\over2}+{1\over3}+{-1\over4}+\cdots=
  {1\over1}-{1\over2}+{1\over3}-{1\over4}+\cdots.
$$

In this example the magnitude of the terms decrease, that is,
$\ds |a_n|$ forms a decreasing sequence, although this is not required in an
alternating series. Recall that for a series with positive terms, if the limit
of the terms is not zero, the series cannot converge; but even if the limit
of the terms is zero, the series still may not converge. It turns out that for
alternating series, the series converges exactly when the limit of the terms is zero.
In Figure~\ref{fig:alternating harmonic series}, we illustrate what happens to
the partial sums of the alternating harmonic series. Because the sizes of
the terms $\ds a_n$ are decreasing, the odd partial sums $\ds s_1$, $\ds s_3$, $\ds s_5$,
and so on, form a decreasing sequence that is bounded below by
$\ds s_2$, so this sequence must converge.
Likewise, the even partial sums $\ds s_2$, $\ds s_4$, $\ds s_6$,
and so on, form an increasing sequence that is bounded above by
$\ds s_1$, so this sequence also converges. Since all the even numbered
partial sums are less than all the odd numbered ones, and since the
``jumps'' (that is, the $\ds a_i$ terms) are getting smaller and smaller,
the two sequences must converge to the same value, meaning the entire
sequence of partial sums $\ds s_1,s_2,s_3,\ldots$ converges as well.

\begin{figure}[H]
\centerline{
%\texonly
\vbox{\beginpicture
\normalgraphs
%\ninepoint
\setcoordinatesystem units <15truecm,1.5truecm>
\setplotarea x from 0.25 to 1.1, y from -1 to 1
\axis bottom shiftedto y=0 ticks withvalues {$1\over4$} / at 0.25 / /
\axis bottom shiftedto y=0 ticks from 1 to 1 by 1 /
\put {$1=s_1=a_1$} [tl] <-2pt,-9pt> at 1 0
\put {$a_2=-{1\over 2}$} [b] <0pt,3pt> at 0.75 1
\put {$s_2={1\over 2}$} [tr] <-3pt,-3pt> at 0.5 0
\put {$a_3$} [t] <0pt,-3pt> at 0.667 -1
\put {$s_3$} [tl] <3pt,-3pt> at 0.833 0
\put {$a_4$} [b] <0pt,3pt> at 0.708 0.667
\put {$s_4$} [tr] <-3pt,-3pt> at 0.583 0
\put {$a_5$} [b] <0pt,2pt> at 0.683 -0.667
\put {$s_5$} [tl] <3pt,-3pt> at 0.783 0
\put {$a_6$} [b] <0pt,3pt> at 0.7 0.333
\put {$s_6$} [tl] <1pt,-3pt> at 0.6167 0
\putrule from 1 0 to 1 1
%\putrule from 1 1 to 0.5 1
\arrow <4pt> [0.35, 1] from 1 1 to 0.5 1
\putrule from 0.5 1 to 0.5 -1
%\putrule from 0.5 -1 to 0.833 -1
\arrow <4pt> [0.35, 1] from 0.5 -1 to 0.833 -1
\putrule from 0.833 -1 to 0.833 0.67
%\putrule from 0.833 0.67 to 0.583 0.67
\arrow <4pt> [0.35, 1] from 0.833 0.67 to 0.583 0.67
\putrule from 0.583 0.67 to 0.583 -0.67
%\putrule from 0.583 -0.67 to 0.783 -0.67
\arrow <4pt> [0.35, 1] from 0.583 -0.67 to 0.783 -0.67
\putrule from  0.783 -0.67 to  0.783 0.33
%\putrule from  0.783 0.33 to 0.6167 0.33
\arrow <4pt> [0.35, 1] from 0.783 0.33 to 0.6167 0.33
\putrule from  0.6167 0.33 to  0.6167 0
\endpicture}}
%\endtexonly
%\figrdef{fig:alternating harmonic series}
%\htmlfigure{Sequences_series-alternating_harmonic.html}
\caption{The alternating harmonic series.}
\label{fig:alternating harmonic series}
\end{figure}

The same argument works for any alternating sequence with terms that decrease in absolute value.
The alternating series test is worth calling a theorem.

\begin{theorem}{Alternating Series Test}{AltSeriesTest}
Suppose that $\ds\{a_n\}_{n=1}^\infty$ is a non-increasing
sequence of positive numbers and $\ds\lim_{n\to\infty}a_n=0$. Then the
alternating series $\ds\sum_{n=1}^\infty (-1)^{n-1} a_n$ converges.
\end{theorem}
\begin{proof}
The odd-numbered partial sums, $\ds s_1, s_3, s_5,\ldots, s_{2k+1},\ldots$,
form a non-increasing sequence, because
$\ds s_{2k+3}=s_{2k+1}-a_{2k+2}+a_{2k+3}\le s_{2k+1}$, since
$\ds a_{2k+2}\ge a_{2k+3}$. This sequence is bounded below by
$\ds s_2$, so it must converge, to some value $L$.
Likewise, the partial sums $\ds s_2, s_4, s_6,\ldots,s_{2k},\ldots$,
form a non-decreasing sequence that is bounded above by
$\ds s_1$, so this sequence also converges, to some value $M$.
Since $\ds\lim_{n\to\infty} a_n=0$ and
$\ds s_{2k+1}= s_{2k}+a_{2k+1}$,
$$
  L=\lim_{k\to\infty}s_{2k+1}=\lim_{k\to\infty}(s_{2k}+a_{2k+1})=
  \lim_{k\to\infty}s_{2k}+\lim_{k\to\infty}a_{2k+1}=M+0=M,
$$
so $L=M$; the two sequences of partial sums converge to the same
limit, and this means the entire sequence of partial sums also
converges to $L$.
\end{proof}

Another useful fact is implicit in this discussion. Suppose that
$$L=\sum_{n=1}^\infty (-1)^{n-1} a_n$$
and that we approximate $L$ by a finite part of this sum, say
$$L\approx \sum_{n=1}^N (-1)^{n-1} a_n.$$
Because the terms are decreasing in size, we know that the true value
of $L$ must be between this approximation and the next one, that is,
between
$$
  \sum_{n=1}^N (-1)^{n-1} a_n \quad \hbox{and}\quad
  \sum_{n=1}^{N+1} (-1)^{n-1} a_n.
$$
Depending on whether $N$ is odd or even, the second will be larger or
smaller than the first.

\begin{example}{}{}
Approximate the sum of the alternating harmonic series to within 0.05.
\end{example}
\begin{solution}
We need to go to the point at which the next term to be added
or subtracted is $1/10$. Adding up the first nine and the first ten
terms we get approximately $0.746$ and $0.646$. These are $1/10$
apart, so the value halfway between them, 0.696, is within 0.05 of the correct value.
\end{solution}

We have considered alternating series with first index 1, and in which
the first term is positive, but a little thought shows this is not
crucial. The same test applies to any similar series, such as
$\ds\sum_{n=0}^\infty (-1)^n a_n$, $\ds\sum_{n=1}^\infty (-1)^n a_n$,
$\ds\sum_{n=17}^\infty (-1)^n a_n$, etc.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Opensolutionfile{solutions}[ex]
\section*{Exercises for \ref{sec:AlternatingSeries}}

\begin{enumialphparenastyle}

Determine whether the following series converge or diverge.

\begin{multicols}{2}
\begin{ex}
$\ds\sum_{n=1}^\infty {(-1)^{n-1}\over 2n+5}$
\begin{sol}
converges
\end{sol}
\end{ex}

\begin{ex}
$\ds\sum_{n=4}^\infty {(-1)^{n-1}\over \sqrt{n-3}}$
\begin{sol}
converges
\end{sol}
\end{ex}

\begin{ex}
$\ds\sum_{n=1}^\infty (-1)^{n-1}{n\over 3n-2}$
\begin{sol}
diverges
\end{sol}
\end{ex}

\begin{ex}
$\ds\sum_{n=1}^\infty (-1)^{n-1}{\ln n\over n}$
\begin{sol}
converges
\end{sol}
\end{ex}

\end{multicols}

\begin{ex}
Approximate $\ds\sum_{n=1}^\infty (-1)^{n-1}{1\over n^3}$ to within 0.005.
\begin{sol}
$0.90$
\end{sol}
\end{ex}

\begin{ex}
Approximate $\ds\sum_{n=1}^\infty (-1)^{n-1}{1\over n^4}$ to within 0.005.
\begin{sol}
$0.95$
\end{sol}
\end{ex}

\end{enumialphparenastyle}


%!TEX root = ../thesis.tex
% ******************************* Thesis Appendix C ********************************
\ifpdf
\graphicspath{{Appendix3/figs/}}
\else
\graphicspath{{Appendix3/figs/}}
\fi

\chapter{Finding Exponents}
\section{Algorithm}
	\subsection{Specific Heat and Susceptibility}
		\subsubsection{exponent for scaling the $y$-values}
		To find the best exponent for scaling the $y$-values of specific heat and susceptibility the following approach is pretty helpful.\\
		\textbf{Finding approximate value of the exponent}
		\begin{enumerate}
			\item get the $x$ and $y$ values of the convoluted data for all lengths ($L$)
			\item get the maximum value or the peak value of $y$ as $y_{max}=max(y)$ for each length
			\item now plot $\log(y_{max})$ vs $\log(L)$
			\item slope of this graph is the approximate value of the exponent
		\end{enumerate}
		\textbf{Finding the best exponent}\\
		Now that we know the approximate value of the exponent, $ex_{approx}$, we can find the best exponent in the following way
		\begin{enumerate}
			\item take a list of all the exponent in the range $E = [ex_{approx}-\epsilon, ex_{approx}+\epsilon]$ where $\epsilon$ is a small number (usually $\sim 0.05$)
			\item for each value of the exponent $a$ in the range above do the following
			\begin{enumerate}
				\item get the $x$ and $y$ values of the convoluted data for all lengths (L)
				\item scale the $y$ value with the exponent and call it $y^{\prime} = y*L^{-a}$
				\item get the maximum value or the peak value of $y^{\prime}$ as $y^{\prime}_{max}=max(y^{\prime})$ for each length

				\item find the standard deviation of all the $y^{\prime}_{max}$'s and call it $std_{a}$ where the subscript denotes the current selected exponent
			\end{enumerate}
			\item out of a number of selected exponent find the one with the minimum standard deviation and the exponent corresponding to this deviation is the best exponent denoted as $a^*$. Symbolically
			\begin{equation}
				a^* = argmin_{a \in E}\ std_{a}
			\end{equation}
		\end{enumerate}
		\subsubsection{exponent for scaling the $x$-values}
		Usually the exponent that scales the $x$-values is called $1/\nu$. The critical point is denoted as $x_c$
		To find an estimate from the data that looks like the graph of specific heat or susceptibility, the following algorithm is very helpful
		\begin{enumerate}
			\item get the $x$ and $y$ values of the convoluted data for all lengths (L)
			\item get the $x$ value at a specific height, $h$, and call it $x_h$
			\item plot a graph of $\log( \left|x_h - x_c\right| )$ vs $\log(L)$.
			\item slope of this graph is the estimate for the exponent $1/\nu$
		\end{enumerate}
		Now to find the exponent that best collapses the data is the main goal. To do this the following algorithm can be followed.\\
		Finding the standard deviation of the points at height $h$ after scaling $x$-values with an approximate value of the exponent $(1/\nu{_approx})$ that is obtained from the graph of $\log( \left|x_h - x_c\right| )$ vs $\log(L)$.
		\begin{enumerate}
			\item write a function that takes $h$, $x_{scaler}$, $y_{scaler}$, $lr$ as argument where, $h$ is the height at which we will be taking $x$-values, $x_{scaler}$ is the exponent that scales the $x$-values, $y_{scaler}$ is the exponent that scales the $y$-values and $lr$ is the argument that tells if the left or right side of the critical point should be taken under consideration. call this function \textit{find\_x\_deviation}

			\item take $x^\prime = (x-x_c) L^{x_{scaler}}$ and $y^\prime = y L^{-y_{scaler}}$. Note that there is a minus sign used for scaling $y$ values because the $y_{max}$ increases as $L$ increases in our present case which is observed when finding $y_{scaler}$ previously.

			\item at height $h$ we draw a horizontal straight line and the intersection of this line with the curve gives corresponding $x$ value at $h$. For each length $L$ we obtain the $x$ value and denote it with $x_L$.

			\item after that we find the standard deviation of all $x_L$'s that we have found and this function returns the standard deviation

			\item if $lr$ is $0$ then the left points of the critical point is considered and if $lr$ is $1$ then the right points of the critical point is considered for getting $x_L$'s.
		\end{enumerate}
		 Note that at a specific height there are two points on on the left of the critical point and another is on the right. So if we find the exponent that best collapses the points on the left, it might not best collapse the points on the right \ref{fig:solving_left_right_dillema}.

	 	To resolve this problem we take following approach
	 	\begin{enumerate}
	 		\item take a range $ex=[(1/nu)_{approx}- \epsilon, (1/nu)_{approx}+\epsilon]$, where $\epsilon$ is usually $\sim 0.05$.
	 		\item for each value in this range find the standard deviation for left and right points of the critical point and call it $d_{left}$ and $d_{right}$ respectively
	 		\item plot $d_{left}$ vs $ex$ and $d_{right}$ vs $ex$ on the same graph
	 		\item the minima of line corresponding to $d_{left}$ vs $ex$ graph gives the exponent that collapses left points of the critical point at best.
	 		\item the minima of line corresponding to $d_{right}$ vs $ex$ graph gives the exponent that collapses right points of the critical point at best.
	 		\item the intersection of the graph is the value where both left and right points of the critical point fits better.
	 	\end{enumerate}
		The figure \ref{fig:solving_left_right_dillema} gives the visual of the above process.
		\begin{figure}
			\centering
			\includegraphics[width=0.5\linewidth]{{{network_ba_explosive_M3_susceptibility_minimizing_one_by_nu}}}
			\caption{Minimizing exponent for scaling $x$-values}
			\label{fig:solving_left_right_dillema}
		\end{figure}


\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}

\title{A Simple Solver for Matrix Equations}
\author{Andrew Winkler, Ph.~D.}

\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}

\begin{document}

\maketitle

\section{Abstract}

We derive a solver for linear systems $Ax=b$, which works for real, complex, rational,
and certain other scalars. It is related to the Cholesky decomposition, but sidesteps creating a factorization
to directly construct the solution. We include a C implementation of the most important case, that where
real numbers are represented as double precision numbers and the matrix $A$ is symmetric and positive semi-definite.

\section{Definitions}

The adjoint of a matrix, denoted $A^*$, is equivalent to the transpose when the
matrix has real entries. The transpose is exchanging the rows and columns of the
matrix, so that $A_{i, j} = A^*_{j, i}$.

A symmetric matrix is symmetric along its diagonal, so that $A_{i, j} = A_{j,
  i}$. Notice that this is equivalent to saying that $A = A^*$.

A positive definite matrix $A$ satisfies the property that for any non-zero
vector $x$, $x^*Ax > 0$. A positive semi-definite matrix only needs to satisfy
$x^tAx \geq 0$. Notice that for any matrix $A$, we have $(A^*A) = A^* A^{**} =
A^*A$, and $x^*(A^*A)x = (Ax)^*(Ax) \geq 0$ for any $x$. So $A^*A$ is always
symmetric and positive semi-definite.

\section{Linear Equations}

We seek all $x$ for which $Ax=b$. We start by noticing that if
$Ax=b$, then also $A^*Ax=A^*b$. The converse need not be true,
but $\{x|Ax=b\} \subset \{x|A^*Ax = A^*b\}$, and in fact it's the simplest sort of subset:
it's either empty, or it's everything. To see this, note that if $A^*Ax_1 = A^*Ax_2 $,
then $$0 = A^*A(x_1-x_2)
0=(x_1-x_2)^*A^*A(x_1-x_2)=(A(x_1-x_2))^*(A(x_1-x_2)) $$ But then $A(x_1-x_2)=0
$, so $Ax_1 = Ax_2 $. Thus any solutions $x_1, x_2$ to $A^*Ax = A^*b$ must satisfy
$Ax_1 = Ax_2$, and so they are either all equal to $b$ or there is no solution.

So if we find any solution to $A^*Ax = A^*b$, we can then compare $Ax$ to $b$
and either $x$ is a solution, or there is no solution.

But recall that $A^*A$ is positive and semidefinite, and so an algorithm for
solving positive semidefinite linear equations can easily be adapted to solve
any linear equation through the conversion described above. We describe such an
algorithm in the next section.

\section{Linear Positive Equations}

Let $A$ be a symmetric and positive semidefinite matrix in $n$ dimensions. We want to find a solution to
$Ax = b$.

We write $A = A_n$ as $\bmat{\alpha_n & a^*_{n - 1} \\ a_{n - 1} & A_{n
    - 1}}$, tagging each element with their dimension.
If $n = 1$, then all expressions involving $A_{n-1}$, $a_{n - 1}$, or $b_{n - 1]}$ are
empty sums, and therefore 0. Otherwise, $A_{n - 1}$ is $n-1$ by $n-1$, and $a_{n
- 1}$ and $b_{n - 1}$ are $n-1$ column vectors, while $\alpha_n$ is a scalar.

Since $A_n=A^*_n$, we have
$$ \bmat{\alpha_n & a^*_{n-1} \\ a_{n - 1} & A_{n - 1}} =
   \bmat{\alpha_n & a_{n-1}^* \\ a_{n-1} & A_{n-1}}^* =
   \bmat{\alpha_n^* & a_{n-1}^* \\ a_{n-1} & A_{n-1}} $$
and it follows that $\alpha_n^*=\alpha_n$, $A_{n-1}^{*} = A_{n-1}$.

Moreover,
$$
0 \leq \bmat{1\\0}^*\bmat{\alpha_n & a_{n-1}^* \\ a_{n-1} & A_{n-1}}\bmat{1\\0}
= \bmat{1&0}\bmat{\alpha_n \\ a_{n-1}}
= \alpha_n
$$
There are then two cases to consider, $\alpha = 0$ and $\alpha > 0$. In either
case, we will reduce the problem to a new equation $A'x = b'$, where $A'$ in
$b'$ are in $n - 1$ dimensions, and then recursively apply the algorithm until
the problem is solved.

\subsection{Case 1}
Suppose $\alpha_n=0$. Then in fact it's also true that $a_{n-1}=0$, since for
any $\chi$ we must have
\begin{align*}
  0 &\leq \bmat{\chi\\a_{n-1}}^*\bmat{0 & a_{n-1}^*
  \\ a_{n-1} & A_{n-1}}\bmat{\chi\\a_{n - 1}} \\&= \bmat{\chi^* & a_{n-1}^*} \bmat{a_{n-1}^*a_{n-1}\\a_{n-1}\chi+A_{n-1}a_{n-1}}
\\&= \chi^*a_{n-1}^*a_{n-1} + a_{n-1}^*a_{n-1}\chi + a_{n-1}^*A_{n-1}a_{n-1}
\end{align*}

Notice that the first inequality relies on the assumption that $A_n$ was
positive semidefinite. To see that this equation forces $a_{n-1}$ to be zero,
notice that this is the equation of a line. The only lines that have no negative
values are horizontal, so the slope $2a_{n-1}^*a_{n-1}$ must be zero, which means $a_{n-1}$ must
be zero.

Our equation then simplifies to
$$\bmat{0 & 0 \\ 0 & A_{n-1}}\bmat{\chi_n\\x_{n-1}} =\bmat{\beta_n\\b_{n-1}}$$,
or $0=\beta_n$, and$A_{n-1}x_{n-1}=b_{n-1} $. The first equation tells us that
there can be no solution unless $\beta_n=0$. If, however, it is, then any
solution $x_{n-1}$ of the second equation, which we note, satisfies the same
properties we required of $A_n$, can be combined with any number $z_n$ into a
solution, $A_n\bmat{z_n\\x_{n-1}} = b_n$

In particular, we can always take $z_n$ to be 0.

\subsection{Case 2}
Suppose $\alpha_n>0$. Then
\begin{align*}
&\bmat{\alpha_n & a_{n-1}^* \\ a_n & A_{n-1}}\bmat{\chi_n\\x_{n-1}}=\bmat{\beta_n\\b_{n-1}}
\\\iff&
\alpha_n\chi_n + a_{n-1}^*x_{n-1} = \beta_n &\text{ and }\hspace{2em}&
a_n\chi_n + A_{n-1}x_{n-1} = b_{n-1}
\\\iff&
\alpha_n\chi_n= \beta_n - a_{n-1}^*x_{n-1}  &\text{ and }\hspace{2em}&
a_n\chi_n + A_{n-1}x_{n-1} = b_{n-1}
\\\iff&
\chi_n= \alpha_n^{-1}(\beta_n - a_{n-1}^*x_{n-1}) &\text{ and }\hspace{2em}&
a_n\alpha_n^{-1}(\beta_n - a_{n-1}^*x_{n-1}) + A_{n-1}x_{n-1} = b_{n-1}
\\\iff&
\chi_n= \alpha_n^{-1}(\beta_n - a_{n-1}^*x_{n-1}) &\text{ and }\hspace{2em}&
a_n\alpha_n^{-1}(- a_{n-1}^*x_{n-1}) + A_{n-1}x_{n-1} = b_{n-1}-a\alpha_n^{-1}\beta_n
\\\iff&
\chi_n= \alpha_n^{-1}(\beta_n - a_{n-1}^*x_{n-1}) &\text{ and }\hspace{2em}&
(A_{n-1} - a_{n-1}\alpha_n^{-1}a_{n-1}^*)x_{n-1} = b_{n-1}-a_{n-1}\alpha_n^{-1}\beta_n
\end{align*}

So if we can solve the second equation, the first equation shows us how to convert it into a solution
of the original equation. Notice that if
$b_n =0 $, then so is the derived right hand side; a homogeneous problem generates
a homogeneous subproblem.

But this second equation is again of the same form, because
\begin{gather}{}(A_{n-1} - a_{n-1}\alpha_n^{-1}a_{n-1}^*)^* =
A_{n-1}^{*} - a_{n-1}^{**}\alpha_n^{-1}a_{n-1}^* =
A_{n-1} - a_{n-1}\alpha_n^{-1}a_{n-1}^*
\end{gather}
and moreover, for any vector $x$ we have
\begin{gather}{}
0 \leq \bmat{-\alpha_n^{-1}a_{n-1}^*x\\x}^*\bmat{\alpha_n & a_{n-1}^* \\ a_{n-1} & A_{n-1}}\bmat{-\alpha_n^{-1}a_{n-1}^*x\\x}
=
x^*(A_{n-1} - a_{n-1}\alpha_n^{-1}a_{n-1}^*)x
\end{gather} So the derived submatrix is nonnegative, and positive if the original matrix is.

As in either case we have reduced to either the base case of dimension one or to a similar problem in one dimension smaller, the solution, whether it exists or
not, and whether or not multiple solutions exist, is complete.
\newpage
\section{Example}

We'll run the algorithm to find a solution to the following equation:
$$ Ax = \bmat{1 & -4 & 3\\-2 & 3 & 0\\3 & 1 & 1}x = \bmat{ 2\\ -3 \\ 1 } = b $$

We first compute
$$A^*A = \bmat{14 & -7 & 6\\ -7 & 26 & -11\\6 & -11 & 10} = A_3 \hspace{5em} A^*b =
\bmat{11\\ -16\\ 7} = \bmat{\beta_3\\b_2}$$
and then we have
$$\alpha_3 = 14 \hspace{3em} a_2 = \bmat{-7\\6} \hspace{3em} A_2 = \bmat{26 &
  -11\\-11 & 10}$$
Since $\alpha_3 > 0$, we're in case 2, which tells us that that $\chi_n$, the
first entry in $x$, will be equal to $\alpha_3^{-1}(\beta_3 - a^*_2x_2) = (11 -
\bmat{-7 & 6}x_2)/14$, and we can find $x_2$ by solving the smaller equation
$$ (A_2 - a_2\alpha_3^{-1}a_2^*)x_2 = b_2 - a_2\alpha_3^{-1}\beta_3$$
We compute
$$ A_2 - a_2\alpha_3^{-1} a_2^* = \bmat{26 & -11\\-11 & 10} - \bmat{-7 \\
  6}\bmat{-7&6}/14 = \bmat{26 & -11\\-11 & 10} - \bmat{7/2 & -3\\-3 & 18/7} =
\bmat{45/2 & -8\\-8 & 52/7}$$
and
$$ b_2 - a_2\alpha_3^{-1}\beta_3 = \bmat{-16\\7} - \tfrac{11}{14}\bmat{-7\\6} =
\bmat{-21/2\\ 16/7} = \bmat{\beta_2\\b_1} $$

We now have $\alpha_2 = 45/2$, $a_1 = -8$, $A_1 = 52/7$, and from case 2
we know $\chi_2 = \alpha_2^{-1}(\beta_2 - a_1x_1)$ and $(A_1 - a_1^2/\alpha_2)x_1
= b_1 - a_1\beta_2/\alpha_2$. This is a linear equation which we can solve to
get
$$ x_1 = \frac{16/7 - (-8)(-21/2)/(45/2)}{52/7 - (-8)^2/(45/2)} =
\frac{-6}{19} $$
Substituting $x_1$ into our above equation for $\chi_2$, we find
$$ \alpha_2^{-1}(\beta_2 - a_1x_1) = (-21/2 - (-8)(-6/19))/(45/2) = \frac{-11}{19} $$
Plugging everything back into the first equation for $\chi_3$ we find
$$(\beta_3 - a_2^*x_2)/\alpha_3 = (11 - \bmat{-7 & 6}\bmat{-11/19\\-6/19})/14
= 12/19$$
It remains to check that this solution is valid for $A$ and $b$, and indeed
$$ \bmat{1 & -4 & 3\\-2 & 3 & 0\\3 & 1 & 1}\bmat{12/19\\-11/19\\-6/19} =
\bmat{2\\ -3 \\ 1}  $$

\section{Generalizing}

We'll here describe how to generalize the algorithm to fields beyond the reals.
$A^*$ now denotes the adjoint operation, which is transposing and then
conjugating the elements of a matrix. If $a$ is a single number, then $a^*$ is
just its conjugate.

The algorithm works perfectly well for finite dimensional Hilbert spaces over various fields, to be described. However, since the method implicitly constructs a basis for the vector space, for ease of exposition and with no real loss of generality, we assume already chosen an orthonormal basis, with respect to which A is a matrix, and x and b are column vectors.

We can view rational numbers as lying in the larger field of real numbers; likewise the real numbers in the complex numbers, and the complex numbers in the quaternions. A quaternion satisfies $(a + bi +cj + dk)^* = (a -bi -cj -dk)$, from which it is immediate that $q^*q = a^2 + b^2 + c^2 + d^2 >= 0$. Moreover if $q^*q =0$ then $q =0$.
$q* = q$ if and only if $q$ is real.

The algorithm assumes only that the field is some subfield of the quaternions, which is closed under this conjugation operation, which is the same thing as saying that if $\alpha$ is in the field, so is $\alpha^*\alpha$, or equivalently $\alpha + \alpha^*$. This is of course true of the rationals, the reals, any subfield of the reals, the complexes, and the quaternions.

\section{After-thought}
This section can be safely skipped by anyone whose interest is confined to
the real numbers, the complex numbers, the rational numbers, or even the quaternions.

As described above, the method works provided the scalars are taken from any subfield of the
quaternions which is closed under the * operation. More precisely, we really
need $\alpha^* = \alpha$ if and only if $\alpha$ is real, that $\alpha^*\alpha >= 0$, and that
$\alpha^*\alpha = 0$ only if $\alpha=0$.

But the method works, at least in some cases, even if the field is not *-closed.We can take the *-closure of any subfield of the quaternions, by intersecting all *-closed subfields containing it. Since the quaternions are *-closed, that *-closure is a *-closed subfield of the quaternions. We can then find all solutions composed of vectors having entries in the closure; it remains to determine
which of those solutions, if any, lie in the original field. In the case where
$A$ is positive, the solution is unique, and a solution whose entries lie in the original field does exist, so must coincide with the solution obtained by this method, which then must necessarily also have entries lying in the original field.
\newpage
\section{Implementation Notes}
\subsection{Code}
At each level of recursion, we only need to retain
$a_n$,
$\alpha_n$
and
$\beta_n$, allowing us to overwrite
$A_{n-1}$
with $(A_{n-1} - a_n\alpha_n^{-1}a_n^*)$
and
$b_{n-1}$ with
$b_{n-1}-a_n\alpha_n^{-1}\beta_n$
.

We conclude with a C-language implementation of a solver for the positive semi-definite case, where
$x^*Ax >=0 $ for all $x$.

\begin{verbatim}
static int _positive_solver_rec(
    double ** A,
    double * x,
    double * b,
    int n
    )
{
  int status = 0;
  /// printf("The alpha is %f\n", A[0][0]);
  if (n < 1) { go_BYE(-1); }
  if (n == 1) {
    if (A[0][0] == 0.0) {
        if (b[0] != 0.0) { go_BYE(-1); }
        x[0] = 0.0;
        return 0;
    }
    x[0] = b[0] / A[0][0];
    return 0;
  }

  double * bvec = b + 1;
  double * Avec = A[0] + 1;
  double ** Asub = A + 1;
  double * xvec = x + 1;

  int m = n -1;

  if (A[0][0] != 0.0) {
    for(int i=0; i < m; i++){
      bvec[i] -= Avec[i] * b[0] / A[0][0];
      for(int j=0; j < m - i; j++)
        Asub[i][j] -= Avec[i] * Avec[i+j] / A[0][0];
    }
  } /* else check that Avec is 0 */

  status = _positive_solver_rec(Asub, xvec, bvec, m);
  cBYE(status);
  if ( status < 0 ) { return status; }

  if (A[0][0] == 0.0) {
      if (b[0] != 0.0) { go_BYE(-1); }  /* or close enough... */
      x[0] = 0.0;
      return status;
  }

  double p = 0;
  for ( int k = 0; k < m; k++ ) {
    p += Avec[k] * xvec[k];
  }

  x[0] = (b[0] - p) / A[0][0];

BYE:
  return status;
}
\end{verbatim}

\subsection{Benchmarks}

In the following table, $n$ is the dimension of the matrix,
POSDEF refers to solvers that only work on positive
semi-definite matrices, FULL refers to solvers that work on any matrix, and SLOW
and FAST differentiates whether the solver copies its input to avoid destroying
it.

The numbers given are in CPU cycles, as reported by the RDTSC function.

There are two additional functions in the API not included in the table, which
work on fully specified positive definite matrices (rather than the compact
symmetric form which our work function expects). Their performance was
equivalent to the corresponding POSDEF functions.

The benchmarking was done on a VirtualBox instance which was given full access
to one core of a 2.80GHZ i7-4980HQ.
\\

\makebox[\textwidth][c]{
  \begin{tabular}{c | c | c | c | c | c}
    $n$ & POSDEF\_SLOW & POSDEF\_FAST & LAPACK\_POSDEF & FULL & LAPACK\_FULL\\\hline
    $2^6$ & 3.145e05 & 2.767e05 & 1.344e05 & 5.400e05 & 2.295e05\\
    $2^7$ & 2.082e06 & 2.245e06 & 0.816e06 & 4.860e06 & 1.522e06\\
    $2^8$ & 1.705e07 & 1.645e07 & 0.679e07 & 3.560e07 & 1.176e07\\
    $2^9$ & 1.280e08 & 1.252e08 & 0.520e08 & 2.822e08 & 0.833e08\\
    $2^{10}$ & 1.010e09 & 0.995e09 & 0.420e09 & 2.288e09 & 0.683e09\\
    $2^{11}$ & 7.709e09 & 7.784e09 & 3.281e09 & 17.73e09 & 4.674e09\\
    $2^{12}$ & 6.115e10 & 6.152e10 & 2.742e10 & 14.63e10 & 4.039e10
  \end{tabular}
}
\end{document}


\section{Nets and Basic Search}

A \textbf{search tree} is a representation, that is a semantic tree, in which:
\begin{itemize}
  \item Nodes denote paths
  \item Branches connect paths to one-set path extensions
\end{itemize}
With writers that:
\begin{itemize}
  \item Connect a path to a path description
\end{itemize}
WIth reades that:
\begin{itemize}
  \item Produce a path's description
\end{itemize}

Each child denotes a path that is a one-city extension of the path denoted by its parent.

If a node has \textit{b} children, it is said to have a \textbf{branching}
factor of \textit{b}. If the number of children is always \textit{b}
for every nonleaf node, the the tree is said to have a branching
factor of \textit{b}.

Each path that does not reach the goal is called a \textbf{partial path}.
Each path that does reach the goal is called a \textbf{complete path},
and the corresponding node is called a \textbf{goal node}.

Nodes are said to be \textbf{open} until they can be expanded,
whereupon they become \textbf{closed}.

\subsection{Blind methods}

\subsubsection{Depth-first Search}

\begin{itemize}
  \item Form a one-element queue consisting of a zero-length path
    that contains only the root node
  \item Until the first path in the queue terminates at the goal node or the queue is empty,
    \begin{itemize}
      \item Remove the first path from the queue; create new paths
        by extending the first path to all the neighbors of the
        terminal node
      \item Reject all new paths with loops
      \item Add the new paths, if any to the \textbf{front} of the queue
    \end{itemize}
  \item If the goal node is found, annouce success; otherwise, annouce
    failure
\end{itemize}

Good when you are confident that all partial paths either reach dead ends
or become complete paths after a reasonable number of steps.

Bad with long or infinite paths, that neither reach dead ends
nor become complete paths.

\subsubsection{Breadth-first Search}

\begin{itemize}
  \item Form a one-element queue consisting of a zero-length path
    that contains only the root node
  \item Until the first path in the queue terminates at the goal node
    or the queue is empty,
    \begin{itemize}
      \item Remove the first path from the queue; create new paths
        by extending the first path to all the neighbors of the
        terminal node
      \item Reject all new paths with loops
      \item Add the new paths, if any to the \textbf{back} of the queue
    \end{itemize}
  \item If the goal node is found, annouce success; otherwise, annouce
    failure
\end{itemize}

Works with trees with infinitely deep paths.

Wasteful when all paths lead to the goal node at more or less the same depth.

\subsubsection{Nondeterministic search}

\begin{itemize}
  \item Form a one-element queue consisting of a zero-length path
    that contains only the root node
  \item Until the first path in the queue terminates at the goal node
    or the queue is empty,
    \begin{itemize}
      \item Remove the first path from the queue; create new paths
        by extending the first path to all the neighbors of the
        terminal node
      \item Reject all new paths with loops
      \item Add the new paths \textbf{at random places in the queue}
    \end{itemize}
  \item If the goal node is found, annouce success; otherwise, annouce
    failure
\end{itemize}

\subsection{Heuristically informed methods}

\subsubsection{Hill climbing}

\begin{itemize}
  \item Form a one-element queue consisting of a zero-length path
    that contains only the root node
  \item Until the first path in the queue terminates at the goal node
    or the queue is empty,
    \begin{itemize}
      \item Remove the first path from the queue; create new paths
        by extending the first path to all the neighbors of the
        terminal node
      \item Reject all new paths with loops
      \item \textbf{Sort the new paths, if any, by the estimated distances
        between their terminal nodes and the goal}
      \item Add the new paths, if any to the \textbf{front} of the queue
    \end{itemize}
  \item If the goal node is found, annouce success; otherwise, annouce
    failure
\end{itemize}

Possible issues:
\begin{itemize}
  \item Foothills: an optimal point is found, but it is a local maximum
  \item Plateaus: for all but a small number of positions, all standard-step
    probes leave the quality measurement unchanged
  \item Ridges
\end{itemize}

\subsubsection{Beam search}

Like BFS in that ir progresses level by level. Unlike BFS, beam
search moves downward only through the best \textit{w}
nodes at each level; the other nodes are ignored.

\subsubsection{Beast-first search}

While hill climbing demands forward motion from the most recently created
open node. In the best-first seach, \textbf{forward motion is
from the best open node so far} no matter where that node is i the
partially developed tree.

\subsection{Which search type is good for me?}
\begin{itemize}
  \item Depth-first search is good when unproductive partial
    paths are never too long
  \item Breadth-first search is good when the branching
    factor is never too large
  \item Nondeterministic search is good when you are not sure whether
    depth-first search or breadth-first search would be better
  \item Hill climbing is good when there is a natural measurement
    of goal distance form each place to the goal and a good path is
    likely to be among the partial paths that appear to be good at
    all levels
  \item Beam search is good when there is a natural measure of
    goal distance and a good path is likely to be among the
    partial paths that appear to be good at all levels
  \item Best-first search is good when there is a natural measure
    of the goal distance and a good partial path may look like
    a bad option before more promising partial paths are played
    out
\end{itemize}