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

\begin{document}

\setcounter{chapter}{1}

\chapter{Vector analysis in special relativity}

\section{Definition of a vector}

\section{Vector algebra}

\section{The four-velocity}

An object's four velocity, denoted $\vec{U}$, is the vector tangent to its world line, with unit length. This means it extends one unit in time, and zero in space, so it is timelike.

For an \emph{accelerated} particle (which we have not considered up to now), we may not be able to define an inertial frame, but we \emph{can} define a \textbf{momentarily comoving reference frame} (MCRF) which, as the name suggests, moves with the same velocity as the observer for an infinitesimal period of time. We can therefore construct a continuous sequence of MCRFs for any object. If an object has MCRF $\obs$, then its four-velocity is \emph{defined} to be the basis vector $\vec{e}_0$.

\section{The four-momentum}

Analogous to the three-momentum, we define the four-momentum to be
%
\begin{displaymath}
  \vec{p} = m \vec{U}.
%
  \tag{Schutz 2.19}
  \label{schutz:2.19}
\end{displaymath}
%
It has components
%
\begin{displaymath}
  \vec{p} \underset{\obs}{\to} (E, p^1, p^2, p^3).
%
  \tag{Schutz 2.20}
  \label{schutz:2.20}
\end{displaymath}
%
Calling $p^0$ ``$E$'' is no accident, it is in fact the energy. There is an interesting consequence to this: since vectors are invariant with respect to reference frame, but vector components are not, this means that the four-momentum does not change in different reference frames, but the energy \emph{does}. One example would be the doppler effect, which causes the color (or energy) of a photon to shift depending on the radial velocity of the source and observer.

\section{Scalar product}

\begin{displaymath}
  \vec{A} \cdot \vec{B} =
  -(A^0 B^0) + (A^1 B^1) + (A^2 B^2) + (A^3 B^3)
\end{displaymath}

\section{Applications}

\section{Photons}

$\vec{x} \cdot \vec{x} = 0$, so we cannot define $\vec{U}$ for photons. We can, however, define $\vec{p}$. Since $\vec{p} \cdot \vec{p} = -m^2$, and photons are massless, we have $\vec{p} \cdot \vec{p} = 0$.

\section{Further reading}

\section{Exercises}

\textbf{2}
Identify the free and dummy indices in the following equations, and write equivalent expressions with different indices. Also, write how many equations are represented by each expression.

\emph{Note, I will express the set of free indices by $\mathcal{F}$ and the set of dummy indices as $\mathcal{D}$, and I will use the original index names.}

\begin{enumerate}[(a)]
\item $\tensor{A}{^\alpha} \tensor{B}{_\beta} = 5 \implies
       \tensor{A}{^\beta} \tensor{B}{_\alpha} = 5$
      (16 equations,
       $\mathcal{F} = \{ \alpha, \beta \}$,
       $\mathcal{D} = \O$)

\item $\tensor{A}{^{\bar\mu}} =
       \tensor{\Lambda}{^{\bar\mu}_\nu} \tensor{A}{^\nu} \implies
       \tensor{A}{^{\bar\nu}} =
       \tensor{\Lambda}{^{\bar\nu}_\mu} \tensor{A}{^\mu}$
      (4 equations,
       $\mathcal{F} = \{ \bar\mu \}$,
       $\mathcal{D} = \{ \nu \}$).

\item $\tensor{T}{^{\alpha\mu\lambda}}
       \tensor{A}{_\mu}
       \tensor{C}{_\lambda^\gamma} =
       \tensor{D}{^{\gamma\alpha}} \implies
       \tensor{T}{^{\eta\phi\theta}}
       \tensor{A}{_\phi}
       \tensor{C}{_\theta^\zeta} =
       \tensor{D}{^{\zeta\eta}}$
      (16 equations,
       $\mathcal{F} = \{ \alpha, \gamma \}$,
       $\mathcal{D} = \{ \mu, \lambda \}$)

\item $\tensor{R}{_{\mu\nu}} - \frac{1}{2} \tensor{g}{_{\mu\nu}} =
       \tensor{G}{_{\mu\nu}} \implies
       \tensor{R}{_{\chi\epsilon}} - \frac{1}{2} \tensor{g}{_{\chi\epsilon}} =
       \tensor{G}{_{\chi\epsilon}}$
      (16 equations,
       $\mathcal{F} = \{ \mu, \nu \}$,
       $\mathcal{D} = \O$)
\end{enumerate}

\textbf{4}
Given vectors $\vec{A} \to_\obs (5, -1, 0, 1)$ and $\vec{B} \to_\obs (-2, 1, 1, -6)$, find the components in $\obs$ of

\begin{enumerate}[(a)]
\item $-6\vec{A} \to_\obs (-30, 6, 0, -6)$

\item $3\vec{A} + \vec{B} \to_\obs (13, -2, 1, -3)$

\item $-6\vec{A} + 3\vec{B} \to_\obs (-36, 9, 3, -24)$
\end{enumerate}

\textbf{6}
Draw a spacetime diagram from $\obs$'s reference frame. There are two other frames, $\bar\obs$ and $\bar{\bar\obs}$, which are each moving with velocity $0.6$ in the $+x$ direction from each respective frame. Plot each frame's basis vectors, as observed by $\obs$.

See Figure \ref{fig:exercise-6}.

\begin{figure}[h]
  \centering
  \includegraphics[width=0.9\textwidth]{img/problem6}
  \caption{Exercise 6}
  \label{fig:exercise-6}
\end{figure}

\textbf{9}
Prove, by writing out all the terms that
%
\begin{displaymath}
  \sum_{\bar\alpha = 0}^3 \qty(
    \sum_{\beta = 0}^3
      \tensor{\Lambda}{^{\bar\alpha}_\beta}
      \tensor{A}{^\beta}
      \vec{e}_{\bar\alpha}
  ) =
  \sum_{\beta = 0}^3 \qty(
    \sum_{\bar\alpha = 0}^3
      \tensor{\Lambda}{^{\bar\alpha}_\beta}
      \tensor{A}{^\beta}
      \vec{e}_{\bar\alpha}
  )
\end{displaymath}
%
\begin{align*}
  \sum_{\bar\alpha = 0}^3 \qty(
    \sum_{\beta = 0}^3
      \tensor{\Lambda}{^{\bar\alpha}_\beta}
      \tensor{A}{^\beta}
      \vec{e}_{\bar\alpha}
  ) &=
  \sum_{\bar\alpha = 0}^3 \qty(
    \tensor{\Lambda}{^{\bar\alpha}_0} \tensor{A}{^0} \vec{e}_{\bar\alpha} +
    \tensor{\Lambda}{^{\bar\alpha}_1} \tensor{A}{^1} \vec{e}_{\bar\alpha} +
    \tensor{\Lambda}{^{\bar\alpha}_2} \tensor{A}{^2} \vec{e}_{\bar\alpha} +
    \tensor{\Lambda}{^{\bar\alpha}_3} \tensor{A}{^3} \vec{e}_{\bar\alpha}
  )
  \\ &=
  \tensor{\Lambda}{^{\bar0}_0} \tensor{A}{^0} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar0}_1} \tensor{A}{^1} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar0}_2} \tensor{A}{^2} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar0}_3} \tensor{A}{^3} \vec{e}_{\bar0}
  \\ &+
  \tensor{\Lambda}{^{\bar1}_0} \tensor{A}{^0} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar1}_1} \tensor{A}{^1} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar1}_2} \tensor{A}{^2} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar1}_3} \tensor{A}{^3} \vec{e}_{\bar1}
  \\ &+
  \tensor{\Lambda}{^{\bar2}_0} \tensor{A}{^0} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar2}_1} \tensor{A}{^1} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar2}_2} \tensor{A}{^2} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar2}_3} \tensor{A}{^3} \vec{e}_{\bar2}
  \\ &+
  \tensor{\Lambda}{^{\bar3}_0} \tensor{A}{^0} \vec{e}_{\bar3} +
  \tensor{\Lambda}{^{\bar3}_1} \tensor{A}{^1} \vec{e}_{\bar3} +
  \tensor{\Lambda}{^{\bar3}_2} \tensor{A}{^2} \vec{e}_{\bar3} +
  \tensor{\Lambda}{^{\bar3}_3} \tensor{A}{^3} \vec{e}_{\bar3}
  \\ &=
  \tensor{\Lambda}{^{\bar0}_0} \tensor{A}{^0} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar1}_0} \tensor{A}{^0} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar2}_0} \tensor{A}{^0} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar3}_0} \tensor{A}{^0} \vec{e}_{\bar3}
  \\ &+
  \tensor{\Lambda}{^{\bar0}_1} \tensor{A}{^1} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar1}_1} \tensor{A}{^1} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar2}_1} \tensor{A}{^1} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar3}_1} \tensor{A}{^1} \vec{e}_{\bar3}
  \\ &+
  \tensor{\Lambda}{^{\bar0}_2} \tensor{A}{^2} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar1}_2} \tensor{A}{^2} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar2}_2} \tensor{A}{^2} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar3}_2} \tensor{A}{^2} \vec{e}_{\bar3}
  \\ &+
  \tensor{\Lambda}{^{\bar0}_3} \tensor{A}{^3} \vec{e}_{\bar0} +
  \tensor{\Lambda}{^{\bar1}_3} \tensor{A}{^3} \vec{e}_{\bar1} +
  \tensor{\Lambda}{^{\bar2}_3} \tensor{A}{^3} \vec{e}_{\bar2} +
  \tensor{\Lambda}{^{\bar3}_3} \tensor{A}{^3} \vec{e}_{\bar3}
  \\ &=
  \sum_{\beta = 0}^3 \qty(
    \tensor{\Lambda}{^{\bar0}_\beta} \tensor{A}{^\beta} \vec{e}_{\bar0} +
    \tensor{\Lambda}{^{\bar1}_\beta} \tensor{A}{^\beta} \vec{e}_{\bar1} +
    \tensor{\Lambda}{^{\bar2}_\beta} \tensor{A}{^\beta} \vec{e}_{\bar2} +
    \tensor{\Lambda}{^{\bar3}_\beta} \tensor{A}{^\beta} \vec{e}_{\bar3}
  )
  \\ &=
  \sum_{\beta = 0}^3 \qty(
    \sum_{\bar\alpha = 0}^3
      \tensor{\Lambda}{^{\bar\alpha}_\beta}
      \tensor{A}{^\beta}
      \vec{e}_{\bar\alpha}
  )
\end{align*}

\textbf{11}
Let $\tensor{\Lambda}{^{\bar\alpha}_\beta}$ be the matrix of the Lorentz transformation from $\obs$ to $\bar\obs$, given in Equation 1.12. Let $\vec{A}$ be an arbitrary vector with components $(A^0, A^1, A^2, A^3)$ in frame $\obs$.
%
\begin{enumerate}[(a)]
\item Write down the matrix of $\tensor{\Lambda}{^\nu_{\bar\mu}}(-v)$.

Intuitively, it should appear the same as $\tensor{\Lambda}{^{\bar\alpha}_\beta}$, but with the negative signs removed. More rigorously, it is given by the matrix inverse of $\tensor{\Lambda}{^{\bar\alpha}_\beta}$, as their product should be the identity matrix. I have used a computer algebra system (Wolfram Alpha) to take the inverse of this matrix symbolically, confirming my suspicion:
%
\begin{displaymath}
  \tensor{\Lambda}{^\nu_{\bar\mu}}(-v) =
  \mqty(
    \gamma  & v\gamma & 0 & 0
    \\
    v\gamma & \gamma  & 0 & 0
    \\
    0       & 0       & 1 & 0
    \\
    0       & 0       & 0 & 1
  ).
\end{displaymath}

\item Find $\tensor{A}{^{\bar\alpha}}$ for all $\bar\alpha$.

\begin{align*}
  \tensor{A}{^{\bar\alpha}} &=
  \tensor{\Lambda}{^{\bar\alpha}_\beta} \tensor{A}{^\beta}
  \\
  \tensor{A}{^{\bar0}} &= \gamma (\tensor{A}{^0} - v \tensor{A}{^1})
  \\
  \tensor{A}{^{\bar1}} &= \gamma (\tensor{A}{^1} - v \tensor{A}{^0})
  \\
  \tensor{A}{^{\bar2}} &= \tensor{A}{^2}
  \\
  \tensor{A}{^{\bar3}} &= \tensor{A}{^3}
\end{align*}

\item Verify Equation 2.18 by performing the sum for all values of $\nu$ and $\alpha$.

To simplify things, I do this via matrix multiplication
%
\begin{align*}
  \tensor{\Lambda}{^{\bar\alpha}_\beta}(v)
  \tensor{\Lambda}{^\nu_{\bar\mu}}(-v) &=
  \mqty(
    \gamma^2 - v^2 \gamma^2 & v \gamma^2 - v \gamma^2 & 0 & 0
    \\
    v \gamma^2 - v \gamma^2 & \gamma^2 - v^2 \gamma^2 & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    0 & 0 & 0 & 1
  )
  \\ &=
  \mqty(
    \gamma^2 (1 - v^2) & 0 & 0 & 0
    \\
    0 & \gamma^2 (1 - v^2) & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    0 & 0 & 0 & 1
  )
  \\ &=
  \mqty(\imat{4}) =
  \tensor{\delta}{^\nu_\alpha}
\end{align*}

\item Write down the Lorentz transformation matrix from $\bar\obs$ to $\obs$, justifying each term.

It should just be $\tensor{\Lambda}{^\nu_{\bar\mu}}(-v)$. I'm not sure what else to say at this point.

\item Using the result from part (d), find $A^\beta$ from $A^{\bar\alpha}$. How does this relate to Equation 2.18?

\begin{align*}
  \tensor{\Lambda}{^\beta_{\bar\alpha}} A^{\bar\alpha} &=
  \mqty(  \gamma & v \gamma & 0 & 0 \\
        v \gamma &   \gamma & 0 & 0 \\
               0 &        0 & 1 & 0 \\
               0 &        0 & 0 & 1)
  \mqty(\gamma (A^0 - v A^1) \\
        \gamma (A^1 - v A^0) \\
        A^2 \\
        A^3) =
  \mqty(  \gamma^2 (A^0 - v A^1) + v \gamma^2 (A^1 - v A^0) + 0 + 0 \\
        v \gamma^2 (A^0 - v A^1) +   \gamma^2 (A^1 - v A^0) + 0 + 0 \\
        A^2 \\
        A^3)
  \\ &=
  \mqty(A^0 (  \gamma^2 - v^2 \gamma^2) + A^1 (v \gamma^2 - v \gamma^2) \\
        A^0 (v \gamma^2 - v^2 \gamma^2) + A^1 (  \gamma^2 - v \gamma^2) \\
        A^2 \\
        A^3) =
  \mqty(A^0 (\gamma^2 - v^2 \gamma^2) \\
        A^1 (\gamma^2 - v^2 \gamma^2) \\
        A^2 \\
        A^3) =
  \mqty(A^0 \\ A^1 \\ A^2 \\ A^3) =
  A^\beta
\end{align*}

Since $A^{\bar\alpha} = \tensor{\Lambda}{^{\bar\alpha}_\beta}(v)$, this goes to show that $\tensor{\Lambda}{^\nu_{\bar\beta}}(-v) \tensor{\Lambda}{^{\bar\beta}_\alpha}(-v) A^\lambda = A^\lambda \implies \tensor{\Lambda}{^\nu_{\bar\beta}}(-v) \tensor{\Lambda}{^{\bar\beta}_\alpha}(-v) = \tensor{\delta}{^\nu_\alpha}$.

\item Verify in the same manner as (c) that

  \begin{displaymath}
    \tensor{\Lambda}{^\nu_{\bar\beta}}(v)
    \tensor{\Lambda}{^{\bar\alpha}_\nu}(-v) =
    \tensor{\delta}{^{\bar\alpha}_{\bar\beta}}
  \end{displaymath}

  My matrix multiplication approach will just give me the same result as before. Perhaps another approach was intended?

\item Establish that

  \begin{align*}
    \vec{e}_\alpha &=
    \tensor{\Lambda}{^{\bar\beta}_\alpha} \vec{e}_{\bar\beta} =
    \tensor{\Lambda}{^{\bar\beta}_\alpha} \tensor{\Lambda}{^\nu_{\bar\beta}}
    \vec{e}_\nu =
    \tensor{\delta}{^\nu_\alpha} \vec{e}_\nu
    \\
    A^{\bar\beta} &=
    \tensor{\Lambda}{^{\bar\beta}_\alpha} A^\alpha =
    \tensor{\Lambda}{^{\bar\beta}_\alpha} \tensor{\Lambda}{^\alpha_{\bar\mu}}
    A^{\bar\mu} =
    \tensor{\delta}{^{\bar\beta}_{\bar\mu}} A^{\bar\mu}
  \end{align*}

\end{enumerate}

\textbf{14}
The following matrix gives a Lorentz transformation from $\obs$ to $\bar\obs$:
\begin{displaymath}
  \mqty(
    1.25 & 0 & 0 & 0.75
    \\
    0 & 1 & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    0.75 & 0 & 0 & 1.25
  )
\end{displaymath}

\begin{enumerate}[(a)]

\item What is the velocity of $\bar\obs$ relative to $\obs$?

This would correspond to a Lorentz boost along the $z$-axis, meaning
%
\begin{displaymath}
  \tensor{\Lambda}{^{\bar\alpha}_\beta}(v) =
  \mqty(
    \gamma & 0 & 0 & -v\gamma
    \\
    0 & 1 & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    -v\gamma & 0 & 0 & \gamma
  ),
\end{displaymath}
%
and thus we have $\gamma = 1.25$ and $-v\gamma = 0.75$. Solving for $v$, we get
%
\begin{displaymath}
  -v \gamma =
  \frac{3}{4} \implies
  v =
  -\frac{3}{4 \gamma} =
  -\frac{3 \cdot 4}{4 \cdot 5} =
  -\frac{3}{5}.
\end{displaymath}
%
So $\bar\obs$ is moving with speed $0.6$ relative to the $-z$-axis of $\obs$.

\item What is the inverse matrix to the given one?

Numerically, it comes out to be
\begin{displaymath}
  \mqty(
    1.25 & 0 & 0 & -0.75
    \\
    0 & 1 & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    -0.75 & 0 & 0 & 1.25
  ),
\end{displaymath}
which makes sense, when you consider that the inverse matrix should be a Lorentz transformation with the velocity negated.

\item Find the components in $\obs$ of $\vec{A} \to_{\bar\obs} (1, 2, 0, 0)$.
%
\begin{displaymath}
  \vec{A} \underset{\obs}{\to}
  \mqty(
    1.25 & 0 & 0 & -0.75
    \\
    0 & 1 & 0 & 0
    \\
    0 & 0 & 1 & 0
    \\
    -0.75 & 0 & 0 & 1.25
  )
  \mqty( 1 \\ 2 \\ 0 \\ 0 ) =
  \mqty( 1.25 \\ 2 \\ 0 \\ -0.75 )
\end{displaymath}

\end{enumerate}

\textbf{15}

\begin{enumerate}[(a)]
\item Compute the four-velocity components in $\obs$ of a particle whose speed is $v$ in the $+x$-direction relative to $\obs$, using the Lorentz transformation.
%
\begin{align*}
  \vec{U} &= \vec{e}_{\bar0}
  \\
  \tensor{U}{^\alpha} &=
  \tensor{\Lambda}{^\alpha_{\bar\beta}} (\vec{e}_{\bar0})^{\bar\beta} =
  \Lambda^\alpha_{\bar0},
  \\
  U^0 &= \gamma
  \\
  U^1 &= v \gamma
  \\
  U^2 &= U^3 = 0
\end{align*}

\item Generalize to arbitrary velocities $\boldsymbol{v}$, where $\abs{v} < 1$.

\begin{align*}
  \tensor{\Lambda}{^\alpha_{\bar\beta}}(\boldsymbol{v}) &=
  \mqty(\gamma     & \gamma v_x & \gamma v_y & \gamma v_z \\
        \gamma v_x & \gamma     & 0          & 0          \\
        \gamma v_y & 0          & \gamma     & 0          \\
        \gamma v_z & 0          & 0          & \gamma     ).
  \\
  U^0 &= \gamma
  \quad
  U^1 = \gamma v_x
  \quad
  U^2 = \gamma v_y
  \quad
  U^3 = \gamma v_z
\end{align*}

% Consider three Lorentz boosts, one along each of the $x$, $y$, and $z$ axes. We can accomplish this by imagining an observer $\bar\obs$, moving at a velocity $v_x$ relative to $\obs$'s $x$-axis. Then imagine another observer, $\bar{\bar\obs}$, moving at a velocity $v_y$ along $\bar\obs$'s $y$-axis. Finally, imagine an observer $\bar{\bar{\bar\obs}}$, moving at a velocity $v_z$ aong $\bar{\bar\obs}$'s $z$-axis. The total Lorentz transformation can be written by
% %
% \begin{displaymath}
%   \tensor{U}{^{\bar{\bar{\bar\alpha}}}} =
%   \tensor{\Lambda}{^{\bar{\bar{\bar\alpha}}}_{\bar{\bar\beta}}}(v_z)
%   \tensor{\Lambda}{^{\bar{\bar{\beta}}}_{\bar\gamma}}(v_y)
%   \tensor{\Lambda}{^{\bar\gamma}_\delta}(v_x)
%   \tensor{U}{^\delta} =
%   \tensor{\Lambda}{^{\bar{\bar{\bar\alpha}}}_\delta}(\boldsymbol{v})
%   \tensor{U}{^\delta}
% \end{displaymath}

\item Use this result to express $\boldsymbol{v}$ as a function of the components $\{ U^\alpha \}$.

\begin{align*}
  \boldsymbol{v} &=
  v_x \vec{e}_1 + v_y \vec{e}_2 + v_z \vec{e}_3
  \\
  v_i &= \frac{U^i}{\gamma}
  \\
  \boldsymbol{v} &= \frac{1}{\gamma} U^i \vec{e}_i
\end{align*}

\item Find the three-velocity $\boldsymbol{v}$ of a particle with four-velocity components $(2, 1, 1, 1)$.

$U^0 = \gamma = 2$, and $U^i = 1$, so
%
\begin{displaymath}
  \boldsymbol{v} = \frac{1}{2} \vec{e}_i
\end{displaymath}

\end{enumerate}

\textbf{17}

\textbf{Not sure how to approach this problem.}

\begin{enumerate}[(a)]
\item Prove that any timelike vector $\vec{U}$ for which $U^0 > 0$ and $\vec{U} \cdot \vec{U} = -1$ is the four-velocity of \emph{some} world line.

\item Use this to prove that for any timelike vector $\vec{V}$ there is a Lorentz frame in which the $\vec{V}$ has zero spatial components.
\end{enumerate}

\textbf{19}
A body is uniformly accelerated if the four-vector $\vec{a}$ has constant spatial direction and magnitude, $\vec{a} \cdot \vec{a} = \alpha^2 \geq 0$.

(a) Show that this implies the components of $\vec{a}$ in the body's MCRF are all constant, and that these are equivalent to the Galilean ``acceleration''.

We normalize the vector $\vec{a}$ by dividing each of its terms by the magnitude of the vector, so
%
\begin{displaymath}
  \frac{a^\lambda}{\alpha}.
\end{displaymath}
%
Since $\alpha$ is constant, and also the \emph{direction} is constant, this means that the above expression is \emph{also} constant, as the normalized components tell you about the direction. If we multiply a constant by a constant, we should still get a constant, so we multiply the above expression by $\alpha$, getting $a^\lambda$ to be constant.

In the MCRF of an object, $\dd\tau = \dd{t}$, and so we can write
%
\begin{displaymath}
  \vec{a} = \dv{\vec{U}}{t} = \qty(0, \dv{U^1}{t}, \dv{U^2}{t}, \dv{U^3}{t}),
\end{displaymath}
%
which is analogous to the Galilean acceleration.

(b) A body is uniformly accelerated with $\alpha = \SI{10}{\meter\per\second^2}$. It starts from rest, and falls for a time $t$. Find its speed as a function of $t$, and find the time to reach $v = 0.999$.

\begin{align*}
  \vec{U} &\underset{\rm MCRF}{\to}
  (1, 0, 0, 0)
  \\ &\underset{\obs}{\to}
  (\gamma, \gamma v, 0, 0)
  \\
  \dv{\vec{U}}{\tau} &\underset{\rm MCRF}{\to}
  (0, \alpha, 0, 0)
  \\ &\underset{\obs}{\to}
  (\gamma, \gamma \alpha, 0, 0)
  \\
  U^x &=
  \int_0^t \dv{U^x}{\tau} \dd\tau =
  \int_0^t \gamma \alpha \frac{\dd{t}}{\gamma} =
  \int_0^t \alpha \dd{t} =
  \alpha t
  \\ &=
  \gamma v =
  \frac{v}{\sqrt{1 - v^2}}
  \\
  v^2 &=
  (\alpha t)^2 (1 - v^2) =
  (\alpha t)^2 - (\alpha t v)^2
  \\
  v^2 (1 + (\alpha t)^2) &=
  (\alpha t)^2
  \\
  v^2 &=
  \frac{(\alpha t)^2}{1 + (\alpha t)^2} \implies
  v = \sqrt{\frac{(\alpha t)^2}{1 + (\alpha t)^2}}
\end{align*}
%
To find the time to reach $v = 0.999$, we go back to the expression $\gamma v = \alpha t$, solve for $t$, and substitute for $v$ and $\alpha$. Note that in natural units, $\alpha = \SI{10}{\meter\per\second^2} c^{-2} \approx \SI{1.11e-16}{\per\meter}$
%
\begin{align*}
  t &=
  \frac{v}{\alpha \sqrt{1 - v^2}} =
  \frac{0.999}{\SI{1.11e-16}{\per\meter} \sqrt{1 - 0.999^2}} \approx
  \SI{2.01e17}{\meter}.
\end{align*}

\textbf{24}
Show that a positron and electron cannot annihilate to form a single photon, but they can annihilate to form two photons.

We consider the center of momentum frame, where $\sum \vec{p}_{(i)} \to_{\mathrm{CM}} (E_{\mathrm{total}}, 0, 0, 0)$. Without loss of generality, we assume that the velocities of the two particles are equal and opposite, such that
%
\begin{align*}
  \vec{p}_{e^+} &\to_{\mathrm{CM}} m_e (\gamma,  \gamma v, 0, 0), &
  \vec{p}_{e^-} &\to_{\mathrm{CM}} m_e (\gamma, -\gamma v, 0, 0).
\end{align*}
%
The photon they create will have to have a momentum of $\vec{p}_{\gamma,\mathrm{single}} \to_{\mathrm{CM}} (h \nu, h \nu, 0, 0)$. By conservation of four-momentum, we have
%
\begin{align*}
  \vec{p}_{e^+} + \vec{p}_{e^-} &= \vec{p}_{\gamma,\mathrm{single}}
  \\
  (\vec{p}_{e^+} + \vec{p}_{e^-}) \cdot (\vec{p}_{e^+} + \vec{p}_{e^-}) &=
  \vec{p}_{\gamma,\mathrm{single}} \cdot \vec{p}_{\gamma,\mathrm{single}}
  \\
  (\vec{p}_{e^+} \cdot \vec{p}_{e^+}) +
  (\vec{p}_{e^-} \cdot \vec{p}_{e^-}) +
  (\vec{p}_{e^+} \cdot \vec{p}_{e^-}) &=
  0
  \\
  -m_e^2 - m_e^2 - m_e^2 &= 0
  \implies m_e = 0!
\end{align*}
%
Since we know that $m_e$ is in fact non-zero, this cannot possibly happen.

Now consider the scenario wherein two photons are created, moving in opposite directions. Then they would have momenta: $\vec{p}_{\gamma,1} \to_{\mathrm{CM}} (h \nu, h \nu, 0, 0)$ and $\vec{p}_{\gamma,2} \to_{\mathrm{CM}} (h \nu, -h \nu, 0, 0)$. Invoking conservation of four-momentum as before, we get
%
\begin{align*}
  \vec{p}_{e^+} + \vec{p}_{e^-} &= \vec{p}_{\gamma,1} + \vec{p}_{\gamma,2}
  \\
  (\vec{p}_{e^+} + \vec{p}_{e^-}) \cdot
  (\vec{p}_{e^+} + \vec{p}_{e^-}) &=
  (\vec{p}_{\gamma,1} + \vec{p}_{\gamma,2}) \cdot
  (\vec{p}_{\gamma,1} + \vec{p}_{\gamma,2})
  \\
  -3 m_e^2 &=
  (\vec{p}_{\gamma,1} \cdot \vec{p}_{\gamma,1}) +
  (\vec{p}_{\gamma,1} \cdot \vec{p}_{\gamma,2}) +
  (\vec{p}_{\gamma,2} \cdot \vec{p}_{\gamma,2})
  \\ &=
  0 + (-h^2 \nu^2 - h^2 \nu^2) + 0 =
  -2 h^2 \nu^2,
\end{align*}
%
so we end up with $3 m_e^2 = 2 h^2 \nu^2$, meaning two photons are produced with $E^2 = \frac{3}{2} m_e^2$, which is entirely reasonable.

\textbf{25}

(a) Consider a frame $\bar\obs$ moving with a speed $v$ along the $x$-axis of $\obs$. Now consider a photon moving at an angle $\theta$ from $\obs$'s $x$-axis. Find the ratio of its frequency in $\bar\obs$ and in $\obs$.

We must first construct the particle's four-momentum. In the case where the photon was moving along the $x$-axis (see Section 2.7), it had been found that the four-momentum was
%
\begin{displaymath}
  \vec{p} \underset{\obs}{\to} (E, E, 0, 0),
\end{displaymath}
%
as this satisfied
%
\begin{displaymath}
  \vec{p} \cdot \vec{p} =
  -E^2 + E^2 =
  0.
%
  \tag{Schutz 2.37}
  \label{schutz:2.37}
\end{displaymath}
%
Now that the photon is moving at an angle $\theta$ from the $x$-axis, we need to redistribute the 3-momentum accordingly. No specification was given as photon's angle in the $y$- or $z$-axis, so without loss of generality, I assume it is constrained to the $x$-$y$ plane. This means we can write the four-momentum as
%
\begin{displaymath}
  \vec{p} \underset{\obs}{\to} (E, E \cos\theta, E \sin\theta, 0),
\end{displaymath}
%
which you can easily confirm satisfies $\vec{p} \cdot \vec{p} = 0$.

Now we may apply the Lorentz transformation $\tensor{\Lambda}{^{\bar0}_\alpha}(v)$ to find the photon's energy as observed by $\bar\obs$, and from that the frequency.
%
\begin{align*}
  p^{\bar0} =
  \bar{E} &=
  \tensor{\Lambda}{^{\bar0}_\alpha} p^\alpha =
  \gamma p^0 - v \gamma p^1 + 0 + 0 =
  \gamma E - v \gamma E \cos\theta
  \\ \implies
  h \bar\nu &=
  \gamma h \nu - v \gamma h \nu \cos\theta
  \\ \implies
  \frac{\bar\nu}{\nu} &=
  \gamma - v \gamma \cos\theta =
  \frac{1 - v \cos\theta}{\sqrt{1 - v^2}}
\end{align*}

(b) Even when the photon moves perpendicular to the $x$-axis ($\theta = \pi/2$) there is a frequency shift. This is the \emph{transverse Doppler shift}, which is a result of time dilation. At which angle $\theta$ must the photon move such that there is no Doppler shift between $\obs$ and $\bar\obs$?

To do this, we simply set $\bar\nu / \nu = 1$, and solve for $\theta$.
%
\begin{align*}
  1 &=
  \frac{1 - v \cos\theta}{\sqrt{1 - v^2}} \implies
  \cos\theta = 1 - \sqrt{1 - v^2}
  \\ \implies
  \theta &=
  \pm \arccos(1 - \sqrt{1 - v^2})
\end{align*}

(c) Now use Equations 2.35 and 2.38 to find $\bar\nu / \nu$.

Recall that $\vec{U} \to_\obs (\gamma, v \gamma, 0, 0)$. Using Equation 2.35 we have
%
\begin{align*}
  \bar{E} =
  h \bar\nu &=
  -(E, E \cos\theta, E \sin\theta, 0) \cdot (\gamma, v \gamma, 0, 0)
  \\ &=
  -(-(E \gamma) + E \gamma v \cos\theta) =
  E \gamma (1 - v \cos \theta) =
  h \nu \gamma (1 - v \cos \theta)
  \\
  \frac{\bar\nu}{\nu} &=
  \frac{1 - v \cos\theta}{\sqrt{1 - v^2}}
\end{align*}

\textbf{26}
Calculate the energy required to accelerate a particle of rest mass $m > 0$ from speed $v$ to speed $v + \var{v}$ ($\var{v} \ll v$), to first order in $\var{v}$. Show that it would take infinite energy to accelerate to $c$.

From the four-momentum we have $E_v = m \gamma$, and from that
%
\begin{displaymath}
  E_{v + \var{v}} = \frac{m}{\sqrt{1 - (v + \var{v})^2}}.
\end{displaymath}
%
If we do a Taylor expansion on $(1 - (v + \var{v})^2)^{-1/2}$ we get
%
\begin{displaymath}
  \frac{1}{\sqrt{1 - v^2}} +
  \frac{v \var{v}}{(1 - v^2)^{3/2}} +
  \order{v^2},
\end{displaymath}
%
so
\begin{align*}
  E_{v + \var{v}} &\approx
  \frac{m}{\sqrt{1 - v^2}} +
  \frac{m v \var{v}}{(1 - v^2)^{3/2}}
  \\
  \Delta E &=
  E_{v + \var{v}} - E_v \approx
  \frac{m v \var{v}}{(1 - v^2)^{3/2}} =
  m \gamma^3 v \var{v}.
\end{align*}
%
As $v \to c$, $\gamma \to \infty$ and therefore $\Delta E \to \infty$.

\textbf{30}
A rocket ship has four-velocity $\vec{U} \to_\obs (2, 1, 1, 1)$, and it passes a cosmic ray with four-momentum $\vec{p} \to\obs (300, 299, 0, 0) \times 10^{-27} \si{kg}$. Compute the energy of the ray as measured by the rocket, using two different methods.

(a) Find the Lorentz transformation from $\obs$ to the rocket's MCRF, and from that find the components $p^{\bar\alpha}$.

The Lorentz transformation for a boost in the $x$, $y$, and $z$ directions is given by
%
\begin{displaymath}
  \tensor{\Lambda}{^{\bar\beta}_\alpha} =
  \mqty(\gamma     & \gamma v_x & \gamma v_y & \gamma v_z \\
        \gamma v_x & \gamma     & 0          & 0          \\
        \gamma v_y & 0          & \gamma     & 0          \\
        \gamma v_z & 0          & 0          & \gamma     ).
\end{displaymath}
%
If we write out the terms of
%
\begin{displaymath}
  \mqty(1 \\ 0 \\ 0 \\ 0) =
  \mqty(\gamma     & \gamma v_x & \gamma v_y & \gamma v_z \\
        \gamma v_x & \gamma     & 0          & 0          \\
        \gamma v_y & 0          & \gamma     & 0          \\
        \gamma v_z & 0          & 0          & \gamma     )
  \mqty(2 \\ 1 \\ 1 \\ 1),
\end{displaymath}
%
then we are left with a system of equations
\begin{align*}
  1 &= \gamma (2 + v_x + v_y + v_z), \\
  0 &= \gamma (2 v_x + 1), \\
  0 &= \gamma (2 v_y + 1), \\
  0 &= \gamma (2 v_z + 1).
\end{align*}
%
Since $\gamma$ may never be zero, we divide the last 3 terms by $\gamma$ to obtain
%
\begin{displaymath}
  2 v_i + 1 = 0 \implies v_i = -\frac{1}{2},
\end{displaymath}
%
and plugging into the first equation gives $\gamma = 2$. From this we see that our Lorentz transformation matrix is
%
\begin{displaymath}
  \tensor{\Lambda}{^{\bar\beta}_\alpha} =
  \mqty( 2 & -1 & -1 & -1 \\
        -1 &  2 &  0 &  0 \\
        -1 &  0 &  2 &  0 \\
        -1 &  0 &  0 &  2).
\end{displaymath}
%
Now to find the energy as observed by the rocket, we need to find $\bar{E} = p^{\bar0}$
%
\begin{align*}
  p^{\bar0} &=
  \tensor{\Lambda}{^{\bar0}_\alpha} p^\alpha =
  2 p^0 - p^1 - p^2 - p^3
  \\ &=
  (2 \cdot 300 - 1 \cdot 299 - 1 \cdot 0 - 1 \cdot 0) \times 10^{-27} \si{kg} =
  \SI{3.01e-25}{kg} = \bar{E}
\end{align*}

(b) Use Schutz's Equation 2.35.

\begin{align*}
  \bar{E} &=
  - \vec{p} \cdot \vec{U}_{\mathrm{obs}} =
  -(-(300 \cdot 2) +
     (299 \cdot 1) +
     (  0 \cdot 1) +
     (  0 \cdot 1)) \times 10^{-27} \si{kg}
  \\ &=
  \SI{3.01e-25}{kg}
\end{align*}

(c) Which is quicker? Why?

Using Equation 2.35 was \emph{much} quicker, as it was derived to handle this special case.

\textbf{32}
Consider a particle with charge $e$ and mass $m$, which begins at rest, but scatters a photon with frequency $\nu_i$ (Compton scattering). The photon comes off at an angle $\theta$ from the direction of the initial photon's path. Use conservation of four-momentum to find the scattered photon's frequency, $\nu_f$.

We will invoke: conservation of four-momentum and $\vec{p} \cdot \vec{p} = -m^2$. $\vec{p}_i$ and $\vec{p}_f$ denote the initial and final photon, and $\vec{p}_e$ and $\vec{p}_{e'}$ denote the electron before and after collision.

\begin{align*}
  \vec{p}_i &\underset{\obs}{\to} (E_i, E_i, 0, 0)
  \\
  \vec{p}_e &\underset{\obs}{\to} (m, 0, 0, 0)
  \\
  \vec{p}_f &\underset{\obs}{\to} (E_f, E_f \cos\theta, E_f \sin\theta, 0)
  \\
  \vec{p}_i + \vec{p}_e &= \vec{p}_f + \vec{p}_{e'}
  \\
  \vec{p}_{e'} &= \vec{p}_i + \vec{p}_e - \vec{p}_f
  \\
  \vec{p}_{e'} \cdot \vec{p}_{e'} &=
  (\vec{p}_i + \vec{p}_e - \vec{p}_f) \cdot (\vec{p}_i + \vec{p}_e - \vec{p}_f)
  \\
  -m^2 &=
  \vec{p}_i \cdot \vec{p}_i +
  \vec{p}_e \cdot \vec{p}_e +
  \vec{p}_f \cdot \vec{p}_f +
  2 (\vec{p}_i \cdot \vec{p}_i -
     \vec{p}_i \cdot \vec{p}_f -
     \vec{p}_e \cdot \vec{p}_f)
  \\ &=
  0 - m^2 + 0 +
  2 (\vec{p}_i \cdot \vec{p}_i -
     \vec{p}_i \cdot \vec{p}_f -
     \vec{p}_e \cdot \vec{p}_f)
  \\
  0 &=
  \vec{p}_i \cdot \vec{p}_i -
  \vec{p}_i \cdot \vec{p}_f -
  \vec{p}_e \cdot \vec{p}_f
  \\ &=
  - E_i m - (-E_i E_f + E_i E_f \cos\theta) + E_f m
  \\ &=
  m (E_f - E_i) + E_i E_f (1 - \cos\theta)
  \\
  m (E_i - E_f) &=
  E_i E_f (1 - \cos\theta)
  \\
  m h (\nu_i - \nu_f) &=
  h^2 \nu_i \nu_f (1 - \cos\theta)
  \\
  \frac{\nu_i - \nu_f}{\nu_i \nu_f} &=
  h \frac{1 - \cos\theta}{m}
  \\
  \frac{1}{\nu_f} - \frac{1}{\nu_i} &=
  h \frac{1 - \cos\theta}{m}
  \\
  \frac{1}{\nu_f} &=
  \frac{1}{\nu_i} +
  h \frac{1 - \cos\theta}{m}
\end{align*}

\end{document}


\begin{abox}
	EXAM-PHY001\\ \vspace{0.6cm}
VECTOR CALCULUS
\end{abox}

\section*{\centering{\color{futuringtheme} \underline{SECTION A (MCQ)}}}
$\left. \right.$ {\exyear{Q. No. 1-10 (3.5 Marks)}}
\begin{enumerate}[label=\color{ocre}\textbf{\arabic*.}]

\item A curve is given by $\vec{r}(t)=t \hat{i}+t^{2} \hat{j}+t^{3} \hat{k}$. The unit vector of the tangent to the curve at\\$t=1$ is
\begin{tasks}(4)
	\task[\textbf{A.}] $\frac{\hat{i}+\hat{j}+\hat{k}}{\sqrt{3}}$
	\task[\textbf{B.}] $\frac{\hat{i}+\hat{j}+\hat{k}}{\sqrt{6}}$
	\task[\textbf{C.}] $\frac{\hat{i}+2 \hat{j}+2 \hat{k}}{3}$
	\task[\textbf{D.}] $\frac{\hat{i}+2 \hat{j}+3 \hat{k}}{\sqrt{14}}$
\end{tasks}
\begin{answer}
	Let $\hat{n}$ be a unit vector tangent to the curve at t.\\
	By definition
	\begin{align*}
	\hat{n}&=\frac{d \vec{r} / d t}{|d \vec{r} / d t|}\\
	\text{ So } \hat{n}&=\frac{d \vec{r} / d t}{|d \vec{r} / d t|}=\frac{\hat{i}+2t \hat{j}+3 t^{2} \hat{k}}{\sqrt{1+4 t^{2}+9 t^{4}}}\\
	\text{ At } t&=1, \hat{n}=\frac{\hat{i}+2 j+3 \hat{k}}{\sqrt{14}}
	\end{align*}
	So the correct answer is \textbf{Option d}
\end{answer}
	\item The divergence of $\vec{c} \times(\vec{r} \times \vec{c})$ where $\vec{c}$ is a numerical vector is given by

\begin{tasks}(4)
	\task[\textbf{A.}] zero
	\task[\textbf{B.}]  $|\vec{c}|^{2}$
	\task[\textbf{C.}] $2|\vec{c}|^{2}$
	\task[\textbf{D.}] $-2|\vec{c}|^{2}$
\end{tasks}
\begin{answer}
	According to vector triple product,
	\begin{align*} \vec{c} \times(\vec{r} \times \vec{c})&= \vec{r}(\vec{c} \cdot \vec{c})-\vec{c}(\vec{c} \cdot \vec{r}) \\ \therefore \quad \vec{\nabla} \cdot[\vec{c} \times(\vec{r} \times \vec{c})] &=c^{2} \vec{\nabla} \cdot \vec{r}-\vec{\nabla} \cdot[\vec{c}(\vec{c} \cdot \vec{r})] \\ &=3 c^{2}-[\vec{\nabla}(\vec{c} \cdot \vec{r}) \cdot \vec{c}+(\vec{c} \cdot \vec{r})(\vec{\nabla} \cdot \vec{c})] \\ &=3 c^{2}-[\vec{c} \cdot \vec{c}+0]=2 c^{2} \end{align*}
	Correct option is (c)
\end{answer}

\item  Find the equation to the tangent plane to the surface , $x^{2}+y^{2}-z^{2}=7 $ { at the point } \ $ (2,2,1)$.
\begin{tasks}(2)
	\task[\textbf{a.}] $ 4(x-1)-4(y-1)+2(z-1)=0.  $
	\task[\textbf{b.}]$ 2(x-4)+2(y-4)-(z-2)=0. $
	\task[\textbf{c.}] $ 2(x-2)+2(y-2)-(z-1)=0. $
	\task[\textbf{d.}] $ 4(x-2)+4(y-2)-2(z-1)=0. $
\end{tasks}
\begin{answer}
	\begin{align*}
	\left(x-x_{0}\right) \frac{\partial \phi}{\partial x}+\left(y-y_{0}\right) \frac{\partial \phi}{\partial y}+\left(z-z_{0}\right) \frac{\partial \phi}{\partial z}&=0\\
	\text{Here,}\ \phi\Rightarrow x^{2}+y^{2}-z^{2}&=7\\
	\frac{\partial \phi}{\partial x}|_{(x=2)}&=2x=4\\
	\frac{\partial \phi}{\partial y}|_{(y=2)}&=2y=4\\
	\frac{\partial \phi}{\partial z}|_{(z=1)}&=-2z=-2
	\intertext{Thus the equation of tangent plane is, } 4(x-2)+4(y-2)-2(z-1)&=0.
	\end{align*}
	Correct answer is \textbf{option (d)}.
\end{answer}

\item
{ Let the position vector be given by,}$  r=x i+y j+z k $. {With,}  $ r=|r|=\sqrt{x^{2}+y^{2}+z^{2}} $. {Compute the gradient of the  scalar field } $ \phi(x, y, z)=\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}} $ {in terms of} \ $  \vec{r}  $\ {and } $ r $.
\begin{tasks}(4)
	\task[\textbf{a.}] $ -\frac{\vec{r}}{r^{3}}$
	\task[\textbf{b.}]$-\frac{\vec{r}}{r^{2}}$
	\task[\textbf{c.}] $\frac{\vec{r}}{r^{3/2}}$
	\task[\textbf{d.}]$\frac{\vec{r}}{r}$
\end{tasks}
\begin{answer}
   \begin{align*}
	\text{Let,}\ \phi(x, y, z)&=\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}}.\intertext{ The \ gradient \ is \ given\ by,}\\
	\nabla \phi &=\nabla\left(\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}}\right) \\
	&=-\frac{x}{\left(x^{2}+y^{2}+z^{2}\right)^{3 / 2}} i-\frac{y}{\left(x^{2}+y^{2}+z^{2}\right)^{3 / 2}} j-\frac{z}{\left(x^{2}+y^{2}+z^{2}\right)^{3 / 2}} k\\
	&=-\frac{x\hat{i}+y\hat{j}+z\hat{k}}{\left(x^{2}+y^{2}+z^{2}\right)^{3 / 2}}
	\intertext{In \ terms\ of\ position \ vector,}
	\nabla\left(\frac{1}{r}\right)&=-\frac{\vec{r}}{r^{3}}
\end{align*}
Correct answer is \textbf{option (a)}.
\end{answer}

\item The directional derivative of the scalar function $f(x, y, z)=x^{2}+2 y^{2}+z$ at point $P=(1,1,2)$ in the direction of the vector $\vec{a}=3 \hat{i}-4 \hat{j}$ is,
\begin{answer}
	\begin{align*}
	\text{We know that,}
	\nabla f&=\frac{\partial f}{\partial x} i+\frac{\partial f}{\partial y} j+\frac{\partial f}{\partial z} k=2 x \hat{i}+4 y \hat{j}+\hat{k}\\
	\text{	At point $P(1,1,2)$}\ \nabla f&=2 \hat{i}+4 \hat{j}+\hat{k}
	\intertext{Now directional derivative of $f$ at $P(1,1,2)$ in the direction of vector $a=3 \hat{i}-4 \hat{j}$ is given by,}
	\frac{a}{|a|} \text { grad } f &=\left(\frac{3 \hat{i}-4 \hat{j}}{\sqrt{25}}\right) \cdot(2 \hat{i}+4 \hat{j}+\hat{k}) \\
	&=\frac{1}{5}(6-16+0)\\&=-2
	\end{align*}
\end{answer}
\item  Let  $ u=y \hat{i}+x \hat{j} $.\ The value of \ $ \oint_{C} {u} \cdot d {r} $,\ where  $ C $ is the unit circle centered at the origin, is given by,
\begin{answer}
	\begin{align*}
	\nabla \times {u}&={\nabla} \times(y {i}+x {j})\\&=0\Rightarrow   \text{u is  a conservative field.}
	\intertext{ Then\  the\ line\ integral   around\ any\ closed\ curve\ is\ zero.}
	\oint_{C} {u} \cdot d {r}&=0
	\end{align*}
\end{answer}
\item {Find the line integral of the vector field} $ \vec{F}=\left(x^{2}+y^{2}\right) \hat{i}-2 x y \hat{j} $ \ {along a path } \ $ y=\sqrt{x} $ {from}$  (0,0) $ \ {to}  \ $ (1,1) $.
\begin{answer}
	\begin{align*}
	\int_{0}^{1} F.dr&=\int_{0}^{1}\left(x^{2}+y^{2}\right) \hat{i}-2 x y \hat{j}\cdot \left(dx\hat{i}+dy \hat{j} \right)\\
	&= \int_{0}^{1}\left(x^{2}+y^{2}\right)dx-2 x y  dy\\
	\intertext{ Substituting $  y=\sqrt{x}, x=y^{2} $ the line integral can be expressed as, }
	\int_{0}^{1} F.dr&= \int_{0}^{1}\left(x^{2}+x\right) d x-2 \int_{0}^{1} y^{3} d y\\&=\frac{1}{3}\\&=0.33.
	\end{align*}
\end{answer}
\item {Let }$ u=-x^{2} y i+x y^{2} j $ {Compute} $ \oint_{C} {u} \cdot d r $ {for a unit square in the first quadrant with vertex at the origin. Here, it is simpler to compute an area integral. The answer is}
\begin{answer}
	\begin{align*}
	u&=-x^{2} y \hat{i}+x y^{2} \hat{j}\\ \text{We have ,}\nabla \times u&=\left(x^{2}+y^{2}\right) \hat{k}.\intertext{According\ to\  Stokes\ theorem},
	\oint_{C} {u} \cdot d {r}&=\int_{S}({\nabla} \times {u}) \cdot d {S}\Rightarrow d {S}= d x d y\hat{k}\\&=\int_{0}^{1} \int_{0}^{1}\left(x^{2}+y^{2}\right) d x d y\\&=\int_{0}^{1} x^{2} d x \int_{0}^{1} d y+\int_{0}^{1} d x \int_{0}^{1} y^{2} d y\\&=\frac{2}{3}=0.666\\
	\end{align*}
\end{answer}
\item Find the directional derivative of the function $ f(x, y)=3 x^{2} y $ at a point $ (-2,1) $ along the direction $ 4 \hat{i}+3 \hat{j} $.
\begin{answer}
	\begin{align*}
	\intertext{The\ unit\ vector\ along $ 4 \hat{i}+3 \hat{j} \ is $,}
	\hat{u}&=\frac{4 i+3 \hat{j}}{5}
	\intertext{Gradient\ of\ the\ given\ function\ is}
	\nabla f&=6 x y \hat{i}+3 x^{2} \hat{j}
	\intertext{ Thus\ the\ directional\ derivative\ at\ $ (x, y) $ is}
	\nabla f\cdot \hat{u}&=\left(\frac{24}{5}\right) x y+\left(\frac{9}{5}\right) x^{2}\\
	{At\ (-2,1)\ \text{it's \ value\ is}\ \frac{-12 }{5}=-2.4.}
	\end{align*}
\end{answer}
\item The directional derivative of $f(x, y, z)=2 x^{2}+3 y^{2}$ $+z^{2}$ at point $P(2,1,3)$ in the direction of the vector $a=i-2 k$ is $\cdots$

\begin{answer}
	\begin{align*}
	\text{We have} \ f &=2 x^{2}+3 y^{2}+z^{2}, P(2,1,3) \\
	a &=i-2 k \\
	\nabla f &=i \frac{\partial f}{\partial x}+j \frac{\partial f}{\partial y}+k \frac{\partial f}{\partial z} \\
	&=4 x i+6 y j+2 z k\\
	\text { at } P(2,1,3) \quad \nabla f &=4 \times 2 \times i+6 \times 1 \times j+2 \times 3 \times k \\
	&=8 i+6 j+6 k
	\intertext{The directional derivative of $f$ in direction of vector $a=i-2 k$ is the component of grad $f$ in the direction of vector $a$ and is given by $\frac{a}{|a|} \cdot$ grad $f$}
	&=\left[\frac{i-2 k}{\sqrt{1^{2}+(-2)^{2}}}\right] \cdot(8 i+6 j+6 k) \\
	&=\frac{1}{\sqrt{5}}[1.8+0.6+(-2) 6]=\frac{-4}{\sqrt{5}}
	\end{align*}
\end{answer}
$\left. \right.$ \section*{\centering{\color{futuringtheme} \underline{SECTION B (MCQ)}}}
$\left. \right.$ {\exyear{Q. No. 10-15 (5 Marks)}}

	\item What is the angle (in degrees) between the surfaces $y^{2}+z^{2}=2$ and $y^{2}-x^{2}=0$ at the
point $(1,-1,1)$

\begin{answer}
	\begin{align*}
	\intertext{The equations of two surfaces are,}
	f(x, y, z)&=2 \text { and } g(x, y, z)=0\\
	\text{where} f(x . y, z)&=y^{2}+z^{2} \ \text{and}\quad g(x, y, z)=y^{2}-x^{2}
	\intertext{The normal to the first surfaces is}
	\overrightarrow{\nabla f}&=\frac{\partial f}{\partial x} \hat{i}+\frac{\partial f}{\partial y} \hat{j}+\frac{\partial f}{\partial z} \hat{k} \Rightarrow \overrightarrow{\nabla f}=2 y \hat{j}+2 z \hat{k} \\
	\overrightarrow{\nabla g}&=\frac{\partial g}{\partial x} \hat{i}+\frac{\partial g}{\partial y}+\hat{j}+\frac{\partial g}{\partial z} \hat{k} \Rightarrow \overrightarrow{\nabla g}=-2 x \hat{i}+2 y \hat{j}\\
	\text{At point} (1,-1,1), \overrightarrow{\nabla f}&=-2 \hat{j}+2 \hat{k} \ \text{and}\quad \overrightarrow{\nabla g}=-2 \hat{i}-2\hat{j}
	\intertext{Hence the angle between the two surfaces is}
	\theta&=\cos ^{-1} \frac{\vec{\nabla} \vec{f} \cdot \overrightarrow{\nabla g}}{|\overrightarrow{\nabla f}||\overrightarrow{\nabla g}|}\\&=\cos ^{-1} \frac{(-2 \hat{j}+2 \hat{k}) \cdot(-2 \hat{i}-2 \hat{j})}{\sqrt{8} \sqrt{8}}\\
	\text{Or}\quad  \theta&=\cos ^{-1} \frac{4}{8}\\&=\cos ^{-1 }\frac{1}{2} \\&=60^{\circ}
	\end{align*}
	Correct option is (C)
\end{answer}

\item If $\vec{r}$ is position vector of a point, for what value of $n$, the vector $r^{n} \vec{r}$ is solenoidal?

\begin{answer}
\begin{align*}
\text{We know that,}\\
\nabla \cdot f(r) \hat{r}&=\frac{1}{r^{2}} \frac{\partial}{\partial r} r^{2} f(r)\quad- \text{(radial component of divergence)}\\
\text{Here,}\ f(r) \hat{r}&=r^{n} \vec{r}\\
&=r^{n} r \hat{r}\\
&=r^{n+1} \hat{r}\\
\text{Then,}\ \nabla \cdot f(r) \hat{r}&=\frac{1}{r^{2}} \frac{\partial}{\partial r} r^{2} r^{n+1}\\
&=\frac{1}{r^{2}} \frac{\partial}{\partial r} r^{n+3}=\frac{n+3}{r^{2}} r^{n+2}\\
&=(n+3) r^{n}\\
\text{To be solenoidal,}\ \nabla f(r) \hat{r}&=0\\
\Rightarrow(n+3) r^{n}&=0\\
\Rightarrow \quad n&=-3
\end{align*}
Correct option is (B)
\end{answer}

\item If a vector field is given by $F=\sin y \hat{i}+x(1+\cos y) \hat{j}$,
then evaluate the line integral over a circular path given by $x^{2}+y^{2}=a^{2}, z=0$.
\begin{tasks}(4)
	\task[\textbf{a.}] $\frac{\pi}{2} a$
	\task[\textbf{b.}] $2 \pi$
	\task[\textbf{c.}] $2 \pi^{2} a^{2}$
	\task[\textbf{d.}] $\pi a^{2}$
\end{tasks}
\begin{answer}
	\begin{align*}
	\text{The particle moves in $x y$ plane,} z&=0\\
	\text{Now, let}\ R&=x \hat{i}+y \hat{j}\\
	\text{Then,}\ d R&=d x \hat{i}+d y \hat{j}\\
	\text{Also, path given is}\  x^{2}+y^{2}&=a^{2}\\
	\text{So, let}\ x&=a \cos t \ \text{and}\ y=a \sin t,  \intertext{$t$ varies from 0 to $2 \pi$}
	\text{Therefore,}
	\oint_{C} F \cdot d R&=\oint_{C}(\sin y \hat{i}+x(1+\cos y) \hat{j}) \cdot(d x \hat{i}+d y \hat{j})\\&=\oint_{C}[\sin y \cdot d x+x(1+\cos y) d y] \\
	&=\oint_{C}[[\sin y \cdot d x+x \cos y d y]+x d y] \\
	&=\oint_{C}[d(x \sin y)+x d y]
	\intertext{Now, substituting the values of $x$ and $y$, we get,}
	\int_{0}^{2 \pi}\left[d(a \cos t \sin (a \sin t))+a^{2} \cos ^{2} t d t\right]
	&=|a \cos t \sin (a \sin t)|_{0}^{2 \pi}+\frac{a^{2}}{2}\left|t+\frac{\sin 2 t}{2}\right|_{0}^{2 \pi} \\
	\quad\left[\because \cos ^{2} t=1+\cos 2t\right] \\
	&=0+\frac{a^{2}}{2}[2 \pi+0-(0+0)] \\
	&=\pi a^{2}
	\end{align*}
	Correct answer is \textbf{option (d)}
\end{answer}
\item  Which one of the following vectors lie along the line of intersection of the two planes $x+3 y-z=5$ and $2 x-2 y+4 z=3 ?$

\begin{tasks}(2)
\task[\textbf{A.}] $10 \hat{i}-2 \hat{j}+5 \hat{k}$
\task[\textbf{B.}] $10 \hat{i}-6 \hat{j}-8 \hat{k}$
\task[\textbf{C.}]$10 \hat{i}+2 \hat{j}+5 \hat{k}$
\task[\textbf{D.}]$10 \hat{i}-2 \hat{j}-5 \hat{k}$
\end{tasks}
\begin{answer}
\begin{align*}
\text{Unit vector normal to } x+3 y-z=5 :\ \hat{n}_{1}&=\frac{\vec{\nabla} \phi}{|\vec{\nabla} \phi|}=\frac{\hat{i}+3 \hat{j}-\hat{k}}{\sqrt{1+9+1}}\\&=\frac{\hat{i}+3 \hat{j}-\hat{k}}{\sqrt{11}}\\
\text{Unit vector normal to } 2 x-2 y+4 z=3 :\ \hat{n}_{2}&=\frac{\vec{\nabla} \phi}{|\vec{\nabla} \phi|}=\frac{2 \hat{i}-2 \hat{j}+4 \hat{k}}{\sqrt{4+4+16}}\\&=\frac{2 \hat{i}-2 \hat{j}+4 \hat{k}}{\sqrt{24}}
\intertext{Let's check for option (B) }
\  \hat{n}&=10 \hat{i}-6 \hat{j}-8 \hat{k}\\
\hat{n}_{1} \cdot \hat{n}&=\frac{10-18+8}{\sqrt{11}}=0 \quad \\\hat{n}_{2} \cdot \hat{n}&=\frac{20+12-32}{\sqrt{24}}=0
\end{align*}
Correct option is (B)
\end{answer}
\item Four forces are given below in Cartesian and spherical polar coordinates
\begin{tasks}(2)
	\task[\textbf{i.}] $\vec{F}_{1}=K \exp \left(\frac{-r^{2}}{R^{2}}\right) \hat{r}$
	\task[\textbf{ii.}] $\vec{F}_{2}=K\left(x^{3} \hat{y}-y^{3} \hat{z}\right)$
	\task[\textbf{iii.}]$\vec{F}_{3}=K\left(x^{3} \hat{x}+y^{3} \hat{y}\right)$
	\task[\textbf{iv.}]$\vec{F}_{4}=K\left(\frac{\hat{\phi}}{r}\right)$.
\end{tasks}
 where $K$ is a constant Identify the correct option
\begin{tasks}(1)
	\task[\textbf{A.}] (iii) and (iv) are conservative but (i) and (ii)are not.
	\task[\textbf{B.}] (i) and (ii) are conservative but (iii) and (iv) are not.
	\task[\textbf{C.}](ii) and (iii) are conservative but (i) and (iv) are not.
	\task[\textbf{D.}](i) and (iii) are conservative but (ii) and (iv)-are not.
\end{tasks}
\begin{answer}
	\begin{align*}
	\vec{\nabla} \times \vec{F}_{1}&=\frac{1}{r^{2} \sin \theta}\left|\begin{array}{ccc}
	\hat{r}&r \hat{\theta} & r \sin \theta \hat{\phi} \\
	\frac{{\partial}}{\partial r} & \frac{{\partial}}{{\theta} \theta} & \frac{{\partial}}{\partial \hat{\theta}} \\
	k \exp \left(-\frac{r^{2}}{R^{2}}\right)& 0&0
	\end{array}\right|=0\\
	\vec{\nabla} \times \vec{F}_{2}&=\left|\begin{array}{ccc}\hat{i} & \hat{j} & \hat{k} \\\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\0 & k x^{3} & -k y^{3}\end{array}\right|=\hat{i}\left(-3 k y^{2}-0\right)=-3 k y^{2} \hat{i}\\
	\vec{\nabla} \times \vec{F}_{3}&=\left|\begin{array}{ccc}x & y & \hat{z} \\\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\k x^{3} & k y^{3} & 0\end{array}\right|=0\\
	\vec{\nabla} \times \vec{F}_{4}&=\frac{1}{r^{2} \sin \theta}\left|\begin{array}{ccc}
	\hat{r}&r \hat{\theta} & r \sin \theta \hat{\phi} \\
	\frac{{\partial}}{\partial r} & \frac{{\partial}}{{\theta} \theta} & \frac{{\partial}}{\partial \hat{\theta}} \\
	0& 0&{r sin \theta K}/{r}
	\end{array}\right|=Kr\cos\theta
	\end{align*}
	Correct answer is option(D)
\end{answer}

\end{enumerate}

EXAM - CSIR/chapter/Vector calculus CSIR exam.tex


%!TEX root =  ../main.tex

\objective{Ability to simplify rational exponents and complex fractions}

Fractions are often shunned by students, who state they prefer decimals.  But decimals really
are fractions to, only in tenths, hundredths, thousandth, etc.  Because 10 has so few divisors,
decimals can actually obscure factors and other structures that would simplify a problem.
Being comfortable --- even conversant --- with fractions, can make mathematics much more
enjoyable, or at least, less difficult.

\personfeature[0.5in]{\chapdir/pics/Ada_Lovelace_Chalon_portrait.jpg}{Ada Lovelace}{1815-1852}{was an English mathematician and writer, chiefly known as the first to recognize that computation machines had applications beyond pure calculation, and created the first algorithm intended to be carried out by such a machine. As a result, she is often regarded as seeing the full potential of a "computing machine" and the first computer programmer. \href{https://en.wikipedia.org/wiki/Ada_Lovelace}{Wikipedia}}

\subsection{Clear the Fraction}
First, fractions within fractions are often quite unclear and awkward.  It may be tempting to
find a common denominator amongst the terms on the top-half, so that they can be
added together, and then do the same on the bottom.  However, you will still have a four-part
fraction by the end of that process.  In and of itself, this isn't so bad, since you will simply
flip the lower fraction upside-down and multiply against upper fraction.  Is there a shorter way?

\begin{example}
	\exProblem
Simplify the top and bottom half separately, then the whole: $\cfrac{5}{\frac{25}{4}+\frac{5}{2}}$.

\exSolution
The common denominator of the terms in the denominator is 4, so only the fraction in the
``southeast'' needs alteration: $\cfrac{5}{\frac{25}{4}+\frac{5}{2}\cdot\frac{2}{2}} =
\cfrac{5}{\frac{25}{4}+\frac{10}{4}} = \cfrac{5}{\frac{35}{4}} = \frac{5}{1}\cdot\frac{4}{35}
=\frac{4}{7}$.
\end{example}

Before we answer the question of complex expressions, let us consider what may be
gleaned from equations involving fractions:

\begin{equation}
\frac{x}{5}+\frac{2}{3}=\frac{11}{6}
\end{equation}

``How many fifths must be added to two-thirds to get eleven-sixths?''  As before, we might might
be a common denominator (30), subtract and then divide.  Of course, your aversion to fractions
might serve you well here, and lead you do solve this problem by \emph{clearing the fraction}.
This process consists of nothing more than ascertaining the Lowest Common Denominator (LCD)
and then multiplying both side of the equation by it:

\begin{align*}
30\cdot\left[\frac{x}{5}+\frac{2}{3}\right] &= \frac{11}{6}\cdot30\\
6x+20 &= 55\\
x &=\frac{35}{6}
\end{align*}

Everyone agrees this is more painless way to approach the problem.  Now, back to our
complex fraction.  Is there an analogous situation going on there?  Yes, you consider the
process linearly.  The fractions on the top half will eventually interface with the fractions on
the bottom.  It is best to begin treat the top and bottom denominators as related as soon
as possible, and multiply the top and bottom by the LCD.  This is permissible because
multiplying by a fraction equal one does not change the expression at all.

$$\cfrac{5}{\left(\frac{25}{4}+\frac{5}{2}\right)}\cdot\cfrac{4}{4}=\frac{20}{25+20}=\frac{4}{7}$$

The highest benefit of this approach is that it immediately transforms a complex fraction
into an ordinary one.  In the exercises, you will simplify such expressions with variables.

\personfeature[-1in]{\chapdir/pics/Katherine_Johnson_in_2008}{Katherine Johnson}{1918-}{is
a is an African-American physicist and mathematician who made contributions to the United States' aeronautics and space programs with the early application of digital electronic computers at NASA,
who was known for her accuracy. \href{https://en.wikipedia.org/wiki/Katherine_Johnson}{Wikipedia}}

\subsection{In Equations}
In equations, it is important to not lose information as you simplify.  As we saw in chapter 2,
expressions such as these can be made plainer, but there are ``holes'' which at smoothed
over in such simplifications.  You may rewrite such equations in forms that are easier to
deal with, but you must record what the original excluded values were.

\begin{example}
\exProblem
Solve for real solutions of $x$: $\frac{1}{x-6}+\frac{x}{x-2}=\frac{4}{x^2-8x+12}$.

\exSolution
Factoring the quadratic denominator yields $(x-2)(x-6)$, so that is the LCD.  Multiplying
both side of the equation produces $(x-2) + x(x-6)=4$.  Expanding combining like-terms
reveals another quadratic, $x^2-5x-6=0$, whose solutions are 1 and -6. ... Or are they?
Looking back at the original problem, 6 is an excluded value, making one denominator
zero, and hence undefined.
\end{example}

\index{TI-8*!programming}


\documentclass[
	pdftex,             % Ausgabe des Latex-Dokuments als PDF
	12pt,				% Schriftgroesse 12pt
	a4paper,		   	% Seiten Layout
	english,				% Sprache, global
	oneside,			% Einseitiger Druck
]{article}

% Seitenränder
\usepackage{geometry}
\geometry{a4paper, top=30mm, left=15mm, right=15mm, bottom=25mm,
headsep=15mm}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

% Erweiterte Mathematikbibliotheken
\usepackage[fleqn]{amsmath}
\usepackage{amssymb}

% Zum einbinden von Grafiken
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{wrapfig}

% Benutzerdefinierte Kopf- und Fußzeile
\usepackage{scrpage2}
\pagestyle{scrheadings}
\setheadsepline{1pt} % Linie unter dem Header
\ihead{Gas-Kinetic-Scheme \\ Documentation}
\ohead{Stephan Lenz \\ IRMB -- TU Braunschweig}
\ofoot{\pagemark}

% Einr�cken nach Absatz verhinder
\setlength{\parindent}{0pt}

% =====================================================

\newcommand{\mom}[1]{\langle #1 \rangle}
\newcommand{\uu}[1]{\underline{#1}}
\newcommand{\uuu}[1]{\underline{\underline{#1}}}
\newcommand{\vv}[1]{\vec{#1}}

% =====================================================

\begin{document}

\section{Flux Computation}

The main part of the Gas-Kinetic-Scheme Implementation, is the Flux Computation. This Computation starts with the analytical solution of the BGK-Equation by the method of characteristics. The solution consists of two part. The first part is the way towards equilibrium, whereas the second part is the decay of the initial distribution.

\begin{equation}
\begin{split}
\begin{array}{lcll}
f(x_{i+1/2}, y_j, t,u,v,\xi)
&=&
 \frac{1}{\tau} \int \limits_0^t
g(x', y', t', u, v, \xi) &e^{-\tfrac{t-t'}{\tau}} dt'
\\
&+& f_0(x_{i+1/2} - ut, y_j - vt) &e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

In this equation, $g$ denotes the equilibrium distribution function at the interface and $f_0$ is the distribution function at the interface at the beginning of the time step.

\begin{equation}
f_0(x,y,u,v,\xi) = g_0(u,v,\xi) \cdot
\Big(
\underbrace{ 1 + a~x + b~y }_{\text{equilibrium}}
-
\underbrace{ \tau \left( a~u + b~v + A \right) }_{\text{non-equilibrium}}
\Big)
\end{equation}

\begin{equation}
g(x,y,t,u,v,\xi) = g_0(u,v,\xi) \cdot \left( 1 + a~x + b~y + A~t \right)
\end{equation}

\begin{equation}
g_0(u,v,\xi) = \rho_0 \left( \frac{\lambda_0}{\pi} \right)^{\frac{K+2}{2}}
           e^{-\lambda_0 ((u-U_0)^2 + (v-V_0)^2 + \xi^2)}
\hfill
\int \limits_{-\infty}^{\infty} g dudvd\xi = \left[ \dfrac{kg}{m^3} \right]
\end{equation}

The coefficients $a$, $b$ and $A$ are the normalized gradients of the equilibrium distribution:

\begin{equation}
a = \left. \frac{1}{g} \frac{\partial g}{\partial x} \right|_{x=0}
= \left[ \dfrac{1}{m} \right]
~~~~~~,~~~~~~
b = \left. \frac{1}{g} \frac{\partial g}{\partial y} \right|_{y=0}
= \left[ \dfrac{1}{m} \right]
~~~~~~,~~~~~~
A = \left. \frac{1}{g} \frac{\partial g}{\partial t} \right|_{t=0}
= \left[ \dfrac{1}{s} \right]
\end{equation}

These coefficients are than itself expressed as expansions of the microscopic variables:

\begin{equation}
\begin{array}{lclllll}
a &=& a_1 &+ a_2~u &+ a_3~v &+ a_4~&\frac{1}{2}~(u^2 + v^2 + \xi^2) \\
b &=& b_1 &+ b_2~u &+ b_3~v &+ b_4~&\frac{1}{2}~(u^2 + v^2 + \xi^2) \\
A &=& A_1 &+ A_2~u &+ A_3~v &+ A_4~&\frac{1}{2}~(u^2 + v^2 + \xi^2) \\
\end{array}
\end{equation}

Explanation from Prendergast and Xu (1993):
\begin{equation}
\chi_\alpha ~=~ \left( -\ln(A), -2\lambda U, -2\lambda V, 2\lambda \right)^T
\hfill
\textnormal{with}
A ~=~ \dfrac{1}{\rho} \left( \frac{\lambda}{\pi} \right)^{-\frac{K+2}{2}}
\hspace{2cm}
\end{equation}
\begin{equation}
\psi_\alpha = \left( 1, u, v, \tfrac{1}{2} (u^2 + v^2 + \xi^2 ) \right)^T
\end{equation}
\begin{equation}
g ~=~ e^{-\chi_\alpha \psi_\alpha}
  ~=~ \dfrac{1}{A} e^{-\lambda ( u^2 + v^2 + \xi^2 - 2uU - 2vV) }
\hfill
\textnormal{which is not equivalent to the above definition of $g$}
\end{equation}
\begin{equation}
a ~=~ \dfrac{1}{g} \dfrac{\partial g}{\partial x}
  ~=~ \dfrac{1}{g} \dfrac{\partial g}{\partial \chi_\alpha}\dfrac{\partial \chi_\alpha}{\partial x}
  ~=~ \dfrac{1}{g} \psi_\alpha g \dfrac{\partial \chi_\alpha}{\partial x}
  ~=~ \psi_\alpha \dfrac{\partial \chi_\alpha}{\partial x}
  ~=~ a_\alpha \psi_\alpha
\end{equation}

\clearpage

\subsection*{Integration of the Analytical Solution}

These are inserted into the analytical solution with $x' = -u(t-t')$, $x = -ut$, $y' = -v(t-t')$ and $y = -vt$:

\begin{equation}
\begin{split}
\begin{array}{lcll}
f
&=&
\dfrac{g_0}{\tau} \int \limits_0^t
\left( 1 - a~u(t-t') - b~v(t-t') + A~t' \right) e^{-\tfrac{t-t'}{\tau}} dt'
\\
&+&
g_0 \left( 1 - a~ut - b~vt - \tau \left( a~u + b~v + A \right) \right) e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

The Integral can be solved with integration by parts:

\begin{equation}
\begin{split}
\begin{array}{lcll}
f
&=&
\dfrac{g_0}{\tau}
\left[
\tau
\left( 1 - a~u(t-t') - b~v(t-t') + A~t' \right)
e^{-\tfrac{t-t'}{\tau}}
\right]_0^t
\\
&-&
\dfrac{g_0}{\tau} \int \limits_0^t
\tau
\left( a~u + b~v + A\right) e^{-\tfrac{t-t'}{\tau}} dt'
\\
&+&
g_0 \left( 1 - a~ut - b~vt - \tau \left( a~u + b~v + A \right) \right) e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

The remaining integral can than be solved directly:

\begin{equation}
\begin{split}
\begin{array}{lcll}
f
&=&
\dfrac{g_0}{\tau}
\left[
	\tau
	\left( 1 - a~u(t-t') - b~v(t-t') + A~t' \right)e^{-\tfrac{t-t'}{\tau}}
\right]_0^t
\\
&-&
\dfrac{g_0}{\tau}
\left[
	\tau^2
	\left( a~u + b~v + A\right) e^{-\tfrac{t-t'}{\tau}}
\right]_0^t
\\
&+&
g_0 \left( 1 - a~ut - b~vt - \tau \left( a~u + b~v + A \right) \right) e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

Then the limits of the integrals are applied.

\begin{equation}
\begin{split}
\begin{array}{lcll}
f
&=&
g_0 \left( 1 + A~t \right)
-
g_0 \left( 1 - a~ut - b~vt \right)e^{-\tfrac{t}{\tau}}
\\
&-&
g_0 \tau (a~u + b~v + A)
+
g_0 \tau (a~u + b~v + A) e^{-\tfrac{t}{\tau}}
\\
&+& g_0 \left( 1 - a~ut - b~vt - \tau \left( a~u + b~v + A \right) \right) e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

After sorting

\begin{equation}
\begin{split}
\begin{array}{lcll}
f
&=&
g_0 \left( 1 - \tau (a~u + b~v + A) + A~t \right)
\\
&-&
g_0 \left( 1 - a~ut - b~vt - \tau(a~u + b~v + A) \right) e^{-t\tfrac{t}{\tau}}
\\
&+&
g_0 \left( 1 - a~ut - b~vt - \tau \left( a~u + b~v + A \right) \right) e^{-\tfrac{t}{\tau}}
\end{array}
\end{split}
\end{equation}

the last terms cancel out and the distribution function on the interface can be computed as:

\begin{equation}
\begin{array}{lcl}
f &=& g_0 \left( 1 - \tau (a~u + b~v) + (t-\tau)A \right)
\end{array}
\end{equation}

\clearpage

\subsection*{Computation of Expansion Coefficients}

Ansatz:

\begin{equation}
W_\alpha
= \int \psi_\alpha~g~d\Xi
= \left( \rho, \rho U, \rho V, \rho E \right)^T
\end{equation}

\begin{equation}
\dfrac{\partial W_\alpha}{\partial x}
=
\int \psi_\alpha~a~g~d\Xi
=
\underbrace{\int \psi_\alpha~\psi_\beta~g~d\Xi}_{\rho~M_{\alpha,\beta}}~a_\beta
\hspace{0.5cm} \Rightarrow \hspace{0.5cm}
\left( \dfrac{1}{\rho}\dfrac{\partial W_\alpha}{\partial x} \right)
=
M_{\alpha,\beta}~a_\beta
\end{equation}

This system of linear equations can be solved analytically for $a_\beta$. The constants $a_i$, $b_i$ and $A_i$ in the Taylor expansion of the Maxwellian distribution function are computed as:

\begin{eqnarray}
\begin{split}
\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{lclll}
A &=& 2 \left( \dfrac{1}{\rho}\dfrac{\partial (\rho E)}{\partial x} \right)
  - \overbrace{ \left( U^2 + V^2 + \dfrac{K+2}{2\lambda} \right) }^{2E}
  \left( \dfrac{1}{\rho}\dfrac{\partial\rho}{\partial x} \right)
    &\left( = 2 \dfrac{\partial E}{\partial x} \right)
    & \hspace{0.5cm} = \left[\dfrac{m}{s^2} \right]
\\
B &=& \left( \dfrac{1}{\rho}\dfrac{\partial (\rho U)}{\partial x} \right)
   - U\left(\dfrac{1}{\rho}\dfrac{\partial \rho}{\partial x} \right)
	&\left( = \dfrac{\partial U}{\partial x} \right)
    & \hspace{0.5cm} = \left[\dfrac{1}{s} \right]
\\
C &=& \left( \dfrac{1}{\rho}\dfrac{\partial (\rho V)}{\partial x} \right)
   - V\left( \dfrac{1}{\rho}\dfrac{\partial \rho}{\partial x} \right)
	&\left( = \dfrac{\partial V}{\partial x} \right)
    & \hspace{0.5cm} = \left[\dfrac{1}{s} \right]
\end{array}
\end{split}
\end{eqnarray}

\begin{eqnarray}
\begin{split}
\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{lcll}
a_4 &=& \dfrac{4 \lambda^2}{K+2} ( A - 2 U B - 2 V C )
    & \hspace{0.5cm} = \left[\dfrac{s^2}{m^3} \right]
\\
a_3 &=& 2 \lambda C - V a_4
    & \hspace{0.5cm} = \left[\dfrac{s}{m^2} \right]
\\
a_2 &=& 2 \lambda B - U a_4
    & \hspace{0.5cm} = \left[\dfrac{s}{m^2} \right]
\\
a_1 &=& \left( \dfrac{1}{\rho} \dfrac{\partial \rho}{\partial x} \right)
     - U a_2 - V a_3 - \dfrac{1}{2} \left( U^2 + V^2 + \dfrac{K+2}{2\lambda} \right) a_4
    & \hspace{0.5cm} = \left[\dfrac{1}{m} \right]
\end{array}
\end{split}
\end{eqnarray}

This computation is here only shown for the normal variation constants $a_i$. For the tangential and time variation the respective derivatives of the macroscopic variables need to be used in the above formulas. The values of the primitive variables are computed by third order interpolation in the normal direction of the interface. $W_{+}$ denotes the cell on the positive side of the interface.

\begin{equation}
\uu{Z}_{i+\frac{1}{2},j}
= \dfrac{7}{12} \left( \uu{Z}_{i,j} + \uu{Z}_{i+1,j} \right)
- \dfrac{1}{12} \left( \uu{Z}_{i-1,j} + \uu{Z}_{i+2,j} \right)
\hspace{1cm} \textnormal{with} \hspace{1cm}
\uu{Z} = \left( \rho, U, V, \lambda \right)^T
\end{equation}

For the boundary Interfaces on linear Interpolation is used, since only one layer of Ghost-Cells is introduced.

The spacial derivatives of the conservative variables are computed from finite differences between then cell values. The normal derivatives are computed from the third order interpolation:

\begin{equation}
\left( \dfrac{1}{\rho}\dfrac{\partial \uu{W}}{\partial x} \right)_{i+\frac{1}{2},j}
= \dfrac{\frac{5}{4}  \left( \uu{W}_{i+1,j} - \uu{W}_{i,j} \right)
       - \frac{1}{12} \left( \uu{W}_{i+2,j} - \uu{W}_{i-1,j} \right)}{\rho \Delta x}
\end{equation}

At the boundaries a again only first order interpolation is used. The tangential derivatives are computed by linear interpolation:

\begin{equation}
\left( \dfrac{1}{\rho}\dfrac{\partial \uu{W}}{\partial y} \right)_{i+\frac{1}{2},j}
= \dfrac{\left( \uu{W}_{i,j+1} + \uu{W}_{i+1,j+1} \right)
       - \left( \uu{W}_{i,j}   + \uu{W}_{i+1,j}   \right) }{4 \rho \Delta x}
\end{equation}

For the time derivative a more complex computation is needed. The time derivatives can be expressed as:

\begin{equation}
\begin{pmatrix}
	\frac{\partial \rho    }{\partial t} \\
	\frac{\partial (\rho V)}{\partial t} \\
	\frac{\partial (\rho U)}{\partial t} \\
	\frac{\partial (\rho E)}{\partial t}
\end{pmatrix}
 =
-%\frac{1}{\rho}
\int \limits^{\infty}_{-\infty}
\begin{pmatrix}
	1 \\
	u \\
	v \\
	\frac{1}{2} ( u^2 + v^2 + \xi^2 )
\end{pmatrix}
(a u + b v) ~g~
du dv d\xi
\end{equation}

The integral over all velocities can be computed analytically, since it is just a linear combination of different moments of the Maxwellian distribution function.

\begin{equation}
\rho \mom{u} = \int \limits^{\infty}_{-\infty} u ~g~ du dv d\xi
~~~\textnormal{,} ~~~
\rho \mom{u^2} = \int \limits^{\infty}_{-\infty} u^2 ~g~ du dv d\xi
~~~\textnormal{, ...}
\end{equation}

\begin{equation}
\rho \mom{u^\alpha v^\beta}
=
\int \limits^{\infty}_{-\infty} u^\alpha v^\beta ~g~ du dv d\xi
=
\rho \left(
\dfrac{1}{\rho}\int \limits^{\infty}_{-\infty} u^\alpha ~g~ du dv d\xi ~
\dfrac{1}{\rho}\int \limits^{\infty}_{-\infty} v^\beta  ~g~ du dv d\xi
\right)
=
\rho \mom{u^\alpha}\mom{v^\beta}
\end{equation}

With these relations the integral can be computed as:

\begin{eqnarray*}
\left( \dfrac{1}{\rho} \frac{\partial \rho}{\partial t} \right)
=
-%\frac{1}{\rho}
\Bigg(
 &~&a_1 \mom{u} + a_2 \mom{u^2} + a_3 \mom{u}\mom{v}
+   a_4 \frac{1}{2} \Big( \mom{u^3} + \mom{u}\mom{v^2} + \mom{u}\mom{\xi^2} \Big)
\\
+&~&b_1 \mom{v} + b_2 \mom{u}\mom{v} + b_3 \mom{v^2}
+   b_4  \frac{1}{2} \Big( \mom{u^2}\mom{v} + \mom{v^3} + \mom{v}\mom{\xi^2} \Big)
\Bigg)
\end{eqnarray*}

\begin{eqnarray*}
\left( \dfrac{1}{\rho} \frac{\partial (\rho U)}{\partial t} \right)
=
-%\frac{1}{\rho}
\Bigg(
&~&a_1 \mom{u^2} + a_2 \mom{u^3} + a_3 \mom{u^2}\mom{v}
+  a_4 \frac{1}{2} \Big( \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} \Big)
\\
&~&b_1 \mom{u}\mom{v} + b_2 \mom{u^2}\mom{v} + b_3 \mom{u}\mom{v^2}
+  b_4 \frac{1}{2} \Big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \Big)
\Bigg)
\end{eqnarray*}

\begin{eqnarray*}
\left( \dfrac{1}{\rho} \frac{\partial (\rho V)}{\partial t} \right)
=
-%\frac{1}{\rho}
\Bigg(
&~&a_1 \mom{u}\mom{v} + a_2 \mom{u^2}\mom{v} + a_3 \mom{u}\mom{v^2}
+  a_4 \frac{1}{2} \Big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \Big)
\\
&~&b_1 \mom{v^2} + b_2 \mom{u}\mom{v^2} + b_3 \mom{v^3}
+  b_4 \frac{1}{2} \Big( \mom{u^2}\mom{v^2} + \mom{v^4} + \mom{v^2}\mom{\xi^2} \Big)
\Bigg)
\end{eqnarray*}

\begin{eqnarray*}
\left( \dfrac{1}{\rho} \frac{\partial (\rho E)}{\partial t} \right)
=
-%\frac{1}{\rho}
\Bigg(
 &a_1& \frac{1}{2}~ \Big(~ \mom{u^3} + \mom{u}\mom{v^2} + \mom{u}\mom{\xi^2} ~\Big) \\
+&a_2& \frac{1}{2}~ \Big(~ \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} ~\Big) \\
+&a_3& \frac{1}{2}~ \Big(~ \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} ~\Big) \\
+&a_4& \frac{1}{2}~ \Big(~ \frac{1}{2}~
					\big(~ \mom{u^5} + \mom{u}\mom{v^4} + \mom{u}\mom{\xi^4} \big)
						 + \mom{u^3}\mom{v^2} + \mom{u^3}\mom{\xi^2} + \mom{u}\mom{v^2}\mom{\xi^2}
					~\Big)
\\
+&b_1& \frac{1}{2}~ \Big(~ \mom{u^2}\mom{v} + \mom{v^3} + \mom{v}\mom{\xi^2} ~\Big) \\
+&b_2& \frac{1}{2}~ \Big(~ \mom{u^3}\mom{v} + \mom{u}\mom{v^2} + \mom{u}\mom{v}\mom{\xi^2} ~\Big) \\
+&b_3& \frac{1}{2}~ \Big(~ \mom{u^2}\mom{v^2} + \mom{v^4} + \mom{v^2}\mom{\xi^2} ~\Big) \\
+&b_4& \frac{1}{2}~ \Big(~ \frac{1}{2}~
					\big(~  \mom{u^4}\mom{v} +\mom{v^5} + \mom{v}\mom{\xi^4} \big)
						 + \mom{u^2}\mom{v^3} + \mom{u^2}\mom{v}\mom{\xi^2} + \mom{v^3}\mom{\xi^2}
					~\Big)
\Bigg)
\end{eqnarray*}

\clearpage

The Flux over the interface is computed from the distribution function on the interface.

\begin{math}
\uu{F} =
\int \limits_{-\infty}^{\infty}
u~
\begin{pmatrix}
	1 \\ u \\ v \\ \frac{1}{2} (u^2 + v^2 + \xi^2)
\end{pmatrix}
\Big(
	\rho - \tau (a~u + b~v) + (t-\tau)A
\Big)
~g~ du dv d\xi
\end{math}

~\\

The Flux is split into three parts for the analytical time integration over one time step.

~\\

\begin{math}
\uu{F} = \uu{F}^1 - \tau \uu{F}^2 + (t - \tau) \uu{F}^3
\hspace{1cm} \Rightarrow \hspace{1cm}
\int \limits_{t_n}^{t_{n+1}} \uu{F} dt
= \Delta t\uu{F}^1
- \tau \Delta t \uu{F}^2
+ \left( \dfrac{\Delta t^2}{2} - \tau \Delta t \right) \uu{F}^3
\end{math}

~\\

\begin{math}
\uu{F}^1 =
\rho
\begin{pmatrix}
\mom{u} \\
\mom{u^2} \\
\mom{uv} \\
\frac{1}{2} \big(\mom{u^3} + \mom{u}\mom{v^2} + \mom{u}\mom{\xi^2} \big)
\end{pmatrix}
\end{math}

~\\
% ======================================================================================

\begin{math}
\begin{array}{l}
\uu{F}^2
=
\\
\rho
\left(
\begin{array}{l}
\left[
\begin{array}{ll}
  & a_1 \mom{u^2} +
    a_2 \mom{u^3} +
    a_3 \mom{u^2}\mom{v} +
    a_4 ~\tfrac{1}{2}~\big( \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} \big)
\\
+ & b_1 \mom{u}\mom{v} +
b_2 \mom{u^2}\mom{v} +
b_3 \mom{u}\mom{v^2} +
b_4 ~\tfrac{1}{2}~\big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \big)
\end{array}
\right]
\\ ~\\
\left[
\begin{array}{ll}
&
a_1 \mom{u^3} +
a_2 \mom{u^4} +
a_3 \mom{u^3}\mom{v} +
a_4 ~\tfrac{1}{2}~\big( \mom{u^5} + \mom{u^3}\mom{v^2} + \mom{u^3}\mom{\xi^2} \big)
\\
+&
b_1 \mom{u^2}\mom{v} +
b_2 \mom{u^3}\mom{v}+
b_3 \mom{u^2}\mom{v^2}+
b_4 ~\tfrac{1}{2}~\big( \mom{u^4}\mom{v} + \mom{u^2}\mom{v^3} + \mom{u^2}\mom{v}\mom{\xi^2} \big)
\end{array}
\right]
\\ ~ \\
\left[
\begin{array}{ll}
&
a_1 \mom{u^2}\mom{v} +
a_2 \mom{u^3}\mom{v} +
a_3 \mom{u^2}\mom{v^2} +
a_4 ~\tfrac{1}{2}~\big( \mom{u^4}\mom{v} + \mom{u^2}\mom{v^3} + \mom{u^2}\mom{v}\mom{\xi^2} \big)
\\
+ &
b_1 \mom{u}\mom{v^2} +
b_2 \mom{u^2}\mom{v^2}+
b_3 \mom{u}\mom{v^3}+
b_4 ~\tfrac{1}{2}~\big( \mom{u^3}\mom{v^2} + \mom{u}\mom{v^4} + \mom{u}\mom{v^2}\mom{\xi^2} \big)
\end{array}
\right]
\\ ~ \\
\left[
\begin{array}{ll}
\frac{1}{2} ~ \Big(
   & a_1~ \big( \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} \big) \\
 + & a_2~ \big( \mom{u^5} + \mom{u^3}\mom{v^2} + \mom{u^3}\mom{\xi^2} \big) \\
 + & a_3~ \big( \mom{u^4}\mom{v} + \mom{u^2}\mom{v^3} + \mom{u^2}\mom{v}\mom{\xi^2} \big) \\
 + & a_4~ \big(~ \tfrac{1}{2} \big( \mom{u^6} + \mom{u^2}\mom{v^4} + \mom{u^2}\mom{\xi^4} \big)
 				+ \mom{u^4}\mom{v^2} + \mom{u^4}\mom{\xi^2} + \mom{u^2}\mom{v^2}\mom{\xi^2} ~\big) \\
 + & b_1~ \big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \big) \\
 + & b_2~ \big( \mom{u^4}\mom{v} + \mom{u^2}\mom{v^3} + \mom{u^2}\mom{v}\mom{\xi^2} \big) \\
 + & b_3~ \big( \mom{u^3}\mom{v^2} + \mom{u}\mom{v^4} + \mom{u}\mom{v^2}\mom{\xi^2} \big) \\
 + & b_4~ \big(~ \tfrac{1}{2} \big( \mom{u^5}\mom{v} + \mom{u}\mom{v^5} + \mom{u}\mom{v}\mom{\xi^4} \big)
 				+ \mom{u^3}\mom{v^3} + \mom{u^3}\mom{v}\mom{\xi^2} + \mom{u}\mom{v^3}\mom{\xi^2} ~\big)
\Big)
\end{array}
\right]
\end{array}
\right)
\end{array}
\end{math}

~\\
% ======================================================================================

\begin{math}
\uu{F}^3
=
\rho
\left(
\begin{array}{l}
A_1 \mom{u} +
A_2 \mom{u^2} +
A_3 \mom{u}\mom{v}+
A_4 ~\tfrac{1}{2} \big( \mom{u^3} + \mom{u}\mom{v^2} + \mom{u}\mom{\xi^2} \big)
\\
A_1 \mom{u^2} +
A_2 \mom{u^3} +
A_3 \mom{u^2}\mom{v}+
A_4 ~\tfrac{1}{2} \big( \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} \big)
\\
A_1 \mom{u}\mom{v} +
A_2 \mom{u^2}\mom{v} +
A_3 \mom{u}\mom{v^2}+
A_4 ~\tfrac{1}{2} \big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \big)
\\~\\
\left[
\begin{array}{ll}
  &	A_1 ~\tfrac{1}{2} \big( \mom{u^3} + \mom{u}\mom{v^2} + \mom{u}\mom{\xi^2} \big) \\
+ &	A_2 ~\tfrac{1}{2} \big( \mom{u^4} + \mom{u^2}\mom{v^2} + \mom{u^2}\mom{\xi^2} \big) \\
+ & A_3 ~\tfrac{1}{2} \big( \mom{u^3}\mom{v} + \mom{u}\mom{v^3} + \mom{u}\mom{v}\mom{\xi^2} \big) \\
+ & A_4 ~\tfrac{1}{2} \big( \tfrac{1}{2} \big( \mom{u^5} + \mom{u}\mom{v^4} + \mom{u}\mom{\xi^4} \big)
						  + \mom{u^3}\mom{v^2} + \mom{u^3}\mom{\xi^2} + \mom{u}\mom{v^2}\mom{\xi^2} \big)
\end{array}
\right]
\end{array}
\right)
\end{math}

\clearpage

\subsection*{Update of conservative variables and time Integration}

The Gas-Kinetic Scheme is a Finite Volume method, which uses the Gas-Kinetic to compute the interface fluxes. The Computation of the Fluxes was shown in the previous sections. The values of the conservative variables in the cells are then updated with these Fluxes:

\begin{equation}
\uu{W}_{i,j}^{n+1}
=
\uu{W}_{i,j}^{n}
+ \dfrac{1}{\Delta V}
\sum \limits_l
\int \limits_{t^n}^{t^{+1}}
\uu{\vv{F}}_l \cdot \vv{\Delta}S_l
dt
\hfill\textnormal{with}\hspace{0.5cm}
\uu{W} = \Big[ \rho, \rho U, \rho V, \rho E \Big]^T
\end{equation}

For the implementation the time integration can be solved explicitly. Moreover the Flux density tensor $\uu{\vv{F}}_l$ is formulated in a local coordinate system and has only the form of a Vector of the Fluxes in Interface normal direction. The current implementation supports only structured rectangular grids. Therefore only vertical and horizontal interfaces occur. The projection of the Flux density tensor on the interface normal then simplifies to a swap of the momentum fluxes for the horizontal interfaces and a projection of the interface normal (positive coordinate direction) onto the outward facing normal of the cell face. the latter one results only in a positive (right and top) or negative (left and bottom) sign $s$.

\begin{equation}
\uu{W}_{i,j}^{n+1}
=
\uu{W}_{i,j}^{n}
+ \dfrac{1}{\Delta V}
\sum \limits_l
s ~
\uuu{R}
\left[
\uu{F}^1 t - \tau t \uu{F}^2 + (\tfrac{1}{2} t^2 - \tau t) \uu{F}^3
\right]_0^{\Delta t}
\end{equation}

\begin{equation}
\uu{W}_{i,j}^{n+1}
=
\uu{W}_{i,j}^{n}
+ \dfrac{1}{\Delta V}
\sum \limits_l
s ~
\uuu{R}
\left(
\uu{F}^1 \Delta t - \tau \Delta t \uu{F}^2 + (\tfrac{1}{2} \Delta t^2 - \tau \Delta t) \uu{F}^3
\right)
\end{equation}

The swap of the momentum components in shown by the Rotation Matrix $\uuu{R}$ which just rotates the second and third component.

\subsection*{Boundary Conditions}

The Boundary Conditions are implemented with the help of a layer of Ghost-Cells around the domain. The Interfaces between the domain and the Ghost-Cells exactly represent the boundary. Two types of Boundary Conditions are implemented for every primitive variable. The value of the Ghost-Cell for Diriclet Boundary Conditions (fixed value on boundary) is computed with linear interpolation:

\begin{equation}
Z_{\alpha,~GhostCell} = 2 Z_{\alpha,~Boundary} - Z_{\alpha,~Cell~in~Domain}
\end{equation}

The homogeneous Neumann Boundary Conditions (zero Gradient at Boundary) are implemented in a similar way:

\begin{equation}
Z_{\alpha,~GhostCell} = Z_{\alpha,~Cell~in~Domain}
\end{equation}

The values of the conservative variables are then computed from the primitive variables.

\clearpage

\section{Some Formulas}

The ideal gas law:

\begin{equation}
p = \rho RT = \dfrac{\rho}{2 \lambda}
\end{equation}

From the Rayleigh-Bernard-Paper (Xu, Lui, 1999):

\begin{equation}
\lambda = \frac{1}{2RT} = \left[ \dfrac{s^2}{m^2} \right]
\end{equation}

\begin{equation}
\tau = \frac{\nu}{RT} = 2\lambda\nu
\end{equation}

From the GKS-Book (Xu, 2015):

\begin{equation}
\lambda =\frac{(K+2)\rho}
{4\left( \rho E - \dfrac{1}{2} \dfrac{(\rho U)^2 + (\rho V)^2}{\rho}  \right)}
\end{equation}

\begin{equation}
\rho E = \dfrac{(K+2)\rho}{4\lambda} + \dfrac{1}{2} \dfrac{(\rho U)^2 + (\rho V)^2}{\rho}
\end{equation}

The first moments of the Maxwell distribution:

\begin{equation}
\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{lcll}
\mom{1} &=& 1 &\\
\mom{u} &=& U &\\
\mom{u^2} &=& U^2 + \dfrac{1}{2\lambda} & = \dfrac{1}{\rho} \left( \rho U^2 + p \right) \\
\mom{u^3} = U^3 + U\dfrac{1}{2\lambda} + \dfrac{1}{\lambda} U &=& U^3 + \dfrac{3}{2\lambda} U &\\
\mom{u^4} = U^4 + \dfrac{3}{2\lambda} U^2 + \dfrac{3}{2\lambda} \left(U^2 + \dfrac{1}{2\lambda} \right)
		  &=& U^4 + \dfrac{3}{\lambda} U^2 + \dfrac{3}{4\lambda^2}&
\end{array}
\end{equation}

Euler equation in flux formulation from Xu (2001):

\begin{equation}
\dfrac{\partial}{\partial t}
\begin{pmatrix}
\rho \\ \rho U \\ \rho V \\ \rho E
\end{pmatrix}
+
\dfrac{\partial}{\partial x}
\begin{pmatrix}
\rho U \\ \rho U^2 + p \\ \rho U V \\ (\rho E + p)U
\end{pmatrix}
+
\dfrac{\partial}{\partial y}
\begin{pmatrix}
\rho V \\ \rho U V \\ \rho V^2 + p \\ (\rho E + p)V
\end{pmatrix}
=0
\end{equation}

\subsection{CFL-Condition}

From Guo and Liu (2008):

\begin{equation}
\Delta t = CFL \dfrac{\Delta x}{u_{max} + c_s}
\hspace{0.5cm} \textnormal{for} \hspace{1cm}
Re \gg 1
\end{equation}

\begin{equation}
\Delta t \leq \dfrac{\Delta x^2}{2^d \nu}
\hspace{0.5cm} \textnormal{for} \hspace{1cm}
Re \approx 1
\end{equation}

From Tannehill et al. (1997) Chapter 9 Eq. 9.14

\begin{equation}
\Delta t \leq CFL \dfrac{\Delta x}{(u_{max} + c_s)(1 + 2/Re^*)}
\end{equation}

The Problem with the latter condition is, that $Re^* = \frac{u_{max} \Delta x}{\nu}$ becomes zero for stagnating flows, which then results in zero time steps. Therefore currently a modified version of the latter condition is implemented:

\begin{equation}
\Delta t \leq CFL \dfrac{\Delta x}{u_{max} + c_s + \frac{2 \nu}{\Delta x}}
\end{equation}

\subsection{Forcing}

the forcing is implemented as:

\begin{equation}
\begin{pmatrix}
\rho \\ \rho U \\ \rho V \\ \rho E
\end{pmatrix}^{n+1}
=
\begin{pmatrix}
\rho \\ \rho U \\ \rho V \\ \rho E
\end{pmatrix}^n
+ Fluxes +
\begin{pmatrix}
0 \\ \Delta~t~\rho F_x \\ \Delta t~\rho~F_y \\ 0
\end{pmatrix}
\end{equation}

\clearpage

\section{Poiseuille Flow}

\begin{eqnarray}
\begin{split}
\arraycolsep=1.4pt\def\arraystretch{2.2}
\begin{array}{lcll}
u\dfrac{\partial u}{\partial x} + v\dfrac{\partial u}{\partial y}
&=&
-\dfrac{1}{\rho} \dfrac{\partial p}{\partial x}
+ \nu \left( \dfrac{\partial^2 u}{\partial x^2} + \dfrac{\partial^2 u}{\partial y^2} \right)
+ \dfrac{G}{\rho}&
\\
0 &=& -\dfrac{1}{\rho} \dfrac{\partial p}{\partial x} + \nu \dfrac{\partial^2 u}{\partial y^2} + \dfrac{G}{\rho}
&\textnormal{~~~with~~~} v = 0 \textnormal{,} \dfrac{\partial u}{\partial x} = 0
\\
\dfrac{\partial^2 u}{\partial y^2}
&=&
-\dfrac{1}{\nu} \left( -\dfrac{1}{\rho} \dfrac{\partial p}{\partial x} + \dfrac{G}{\rho}\right)&
\\
u(y) &=& \dfrac{1}{2\nu} \left( Hy - y^2 \right)
         \left( -\dfrac{1}{\rho} \dfrac{\partial p}{\partial x} + \dfrac{G}{\rho} \right)&
\\
u(y) &=& \dfrac{1}{2\nu} \left( Hy - y^2 \right) \dfrac{G}{\rho}
&\textnormal{~~~with~~~}
\dfrac{\partial p}{\partial x} = 0
\\
u_{max} &=& \dfrac{GH^2}{8\nu\rho}&
\end{array}
\end{split}
\end{eqnarray}

A very simple test case, with which I test my implementation is the Poiseuille flow driven by a volume force $G$, where the analytical solution is known.

The set up of the simulation is the following:

\begin{itemize}
\item computation domain of $1m \times 1m$
\item one Cell in flow direction (x-direction)
\item varying number of cells in cross flow direction (y-direction, $64$ Cells for the figures)
\item periodic boundary condition in x-direction (by assigning the Pointers to the cell itself)
\item Ghost Cell boundary conditions on top and bottom
	\begin{itemize}
	\item zero Gradient for density and temperature (in the form of $\lambda$)
	\item fixed value for both velocities $u = v = 0.0 \frac{m}{s}$.
	\end{itemize}
\item $K = 1$, $\nu = 0.01 \frac{m^2}{s}$, $\rho = 1.0 \tfrac{kg}{m^3}$
\item $G = 1\cdot 10^{-4} \frac{m}{s^2}$
\item $\lambda = 1.0 \tfrac{s^2}{m^2}$ (random value) and $\lambda = 8.2 \cdot 10^{-6}  \tfrac{s^2}{m^2}$ (corresponds to $T = 293.15 K$ for Argon)
\item $Re = 0.125$
\item $Ma = 1.77 \cdot 10^{-3}$ and $Ma = 5.06 \cdot 10^{-6}$ for the respective simulations
\item $CFL = 0.1$ (the value of $CFL = 0.5$ seemed to yield unstable results)
\end{itemize}

The result of the simulation is shown in the figures \ref{fig:veloProfilePoiseuille_L1} and \ref{fig:veloProfilePoiseuille_L8e-6}. The stream wise velocity corresponds with analytical solution and reduces with first order with a refinement in y-direction for both values of $\lambda$. The cross stream velocity should be zero. The simulation with $\lambda = 1.0$ yields non zero cross stream velocities that are not negligible small, only 5 orders of magnitude smaller than the stream wise velocity at double precision, so round off and cut off can be ruled out. These v-velocities are also stationary and do not disappear with time. Moreover they do not disappear with a grid refinement.

\begin{figure}
\includegraphics[width=\textwidth]{VeloFields_Lambda_1.png}
\caption{Velocity Field of the Poiseuille flow with the velocity profiles with example values}
\label{fig:veloProfilePoiseuille_L1}
\end{figure}

\begin{figure}
\includegraphics[width=\textwidth]{VeloFields_Lambda_8e-6.png}
\caption{Velocity Field of the Poiseuille flow with the velocity profiles with physically more realistic values}
\label{fig:veloProfilePoiseuille_L8e-6}
\end{figure}

\clearpage

\section{Implementation}

My Implementation is based on your structured Code and the corresponding Paper by Xu and Lui (1999). From there I used the incompressible GKS from the 4th Chapter of Xu's GKS-Book (2015) with the simplification of smooth flow, which is also reported in Su, Xu et al. (1999).

I implemented everything in C++, making use of the object orientation. There is one class containing the mesh and all the functionality on the whole mesh. The mesh itself contains pointers to all Cells and Interfaces, which in turn are represented by Objects of the respective classes. These two classes contain the data of the flow field and the functionality limited to a cell or an interface. In addition to that a Cell has the pointers to the four adjacent Interfaces and an interface has the pointers to the two adjacent cells. These pointers are used to get all the needed data for the flux computation (interfaces) and the update of the macroscopic variables (cells).

My Algorithm is shown in figure \ref{fig:algorithm}. The time iteration is controlled in the global mesh class. First the global time step is computed as the minimum of all local time steps, which are computed by the CFL-Condition. Then I loop over all Interfaces and compute the fluxes. This is the right part of figure \ref{fig:algorithm} and the main task in the algorithm.

I start with computing the values of the primitive variables at the interface by third order interpolation. The Interfaces at the boundary have only one neighbor outside of the domain (a Ghost Cell) and therefore I use linear interpolation for those interfaces. Then I compute the derivatives of conservative variables in the same manner. I also normalize all derivatives with the density. With the primitive Variables I then can compute the relaxation time. At this point I have to distinguish the Interfaces with respect to their orientation. I wrote only one code for all Interfaces (normal to x-axis and y-axis). For the Interfaces normal to the y-axis I need to swap the velocities and momenta (and the respective derivatives) since a normal velocity corresponds to a y-velocity in the global frame of reference, but to a x-velocity (normal) in the local interface frame of reference. Then I can compute the local slope constants $a$ and $b$ and the moments of the equilibrium distribution. With these two I then reconstruct the time slope of the conservative variables. The time slope is automatically normalized with density, since neither $a$ and $b$ nor the moments contain the density. The local slope constants with respect to time can then be computed by the same means as $a$ and $b$.

Finally the flux over the Interface is assembled by splitting it into three parts for the time integration. The symbolic time integration and the integration over the area of the interface (by multiplying with the interface area) is also taken into account in this step. Then the Fluxes are rotated again into the global frame of reference.

With the fluxes computed I update the cell averaged values but adding all fluxes of the four adjacent interfaces to the current value. Then I apply the boundary conditions, by assigning the corresponding values to the ghost cells. Then I write my output data and start the iteration all over again.

\begin{figure}
\includegraphics[width=\textwidth]{AlgorithmFlowchart.png}
\caption{GKS-Algorithm for smooth flows}
\label{fig:algorithm}
\end{figure}

\subsection{Weidong Anwser}

Ans: I use the standard CFL condition. Since $CFL*\frac{dx}{\lambda_{max}} \leq 1$, where $\lambda_{max}$ is the spectral radius and $\lambda_{max}=(|u|+C)+v_{diffusion}$, C is the sound speed. $v_{diffusion}$ is the characteristic velocity of diffusion and it is about $2\nu/dx$ .

\end{document}


\subsection{Warm Starting}
\label{text:approach/runtime/warm_starting}
It is widely known that warm starting an optimization can be very beneficial for its convergence speed for several optimization algorithms, e.g. shown in \cite{Banerjee2020} for \ac{GuSTO} or for \ac{IPOPT} in \cite{Spielberg2019}. John et alt. The difficulty of warm-starting interior-point methods by exploiting the solution of the preceding problem, has already been stated in \cite{Wright1997}\cite{Gondzio2008}. Mainly, this difficulty originates from the problem that the solution of the preceding problem is close to the feasible boundary, which ultimately leads to decreasing step lengths and thus sticking the search to a small region around the previous solution. As a consequence, the solver is stuck to the solution of the initial problem, which might be (quite) sub-optimal or even infeasible. \cite{John2008} present several strategies for warm-starting interior-point methods for linear programs specifically, similarly \cite{Shahzad2010}\cite{Gondzio2008}. However, all of these works are restricted to specific kinds of problems, such as linear or quadratic programs. As none of these can be safely assumed for Problem \ref{problem:general}, the warm-starting method used within this project, tries to find a good approximative solution independent from the preceding iterations and individually contrived for the specific problem of crowd navigation.
\newline
Within project \project, the algorithm has been warm-started by solving the optimization problem posed in problem \ref{problem:general} while ignoring all objectives and constraints that relate to pedestrians, i.e., by solving the following optimization problem: \\

\begin{problem}{Simplified optimization problem for warm-starting}
\begin{align}
\min_{\u_{0:T-1}} \quad & J_{goal}(\x_{0:T}) \\
\textrm{s.t. } \quad & \x_{t+1} = \f(\x_t, \u_t) & \forall t \in [0, T - 1] \\
& \x \in \xset & \forall t \in [0, T]\\
& \u_t \in \uset & \forall t \in [0, T]\\
& \x_0 \in \xset_0
\end{align}
\label{problem:general_warm_starting}
\end{problem}

Since the simplified optimization problem in problem \ref{problem:general_warm_starting} does not depend on the pedestrian dynamics model $\tilde{\Phi}$, it is easier and more efficient to solve, being a convex quadratic program. Next to the presented way of warm-starting the trajectory optimization algorithm, there are several other ways. Section \ref{text:experiments/unit} compares this approach to several other warm-starting algorithms, such as by leveraging pre-computation (similar to \cite{Merkt2018}).


\section{Autolykos Consensus Protocol}
\label{sec:autolykos}

The core component of any blockchain system is its consensus protocol and Ergo utilizes a self-developed
unique Proof of Work (PoW) consensus protocol called {\em Autolykos}, which is described below.
Despite extensive research on possible alternatives, the original PoW protocol with the longest chain rule is still in demand due to its simplicity, high-security guarantees, and friendliness to light clients.
However, a decade of extensive testing has revealed several problems with the original one-CPU-one-vote idea.

The first known problem of a PoW system is the development of specialized hardware (ASICs), which allows a small group of ASIC-equipped miners to solve PoW puzzles orders of magnitude faster and more efficiently than everyone else. This problem can be solved with the help of memory-hard PoW schemes that reduce the disparity between ASICs and commodity hardware. The most promising approach here is to use asymmetric memory-hard PoW schemes that require significantly less memory to verify a solution than to find it~\cite{biryukov2017equihash,ethHash}.

The second known threat to a PoW network decentralization is that even big miners tend to unite in
mining pools, leading to a situation when just a few pool operators (5 in Bitcoin, 2 in Ethereum
at the time of writing) control more than 51\% of computational power.
Although the problem has already been discussed in the community, no practical solutions have been
implemented before \Ergo{}.

Ergo's PoW protocol, Autolykos~\cite{Ergopow}, is the first consensus protocol that is both memory-hard
and pool-resistant.
Autolykos is based on the {\em one list $k$-sum problem}: a miner has to find
$k=32$ elements from a pre-defined list $R$ of size $N=2^{26}$~(which has a size of 2 Gb),
such that $\sum_{j \in J} r_{j} - sk = d$ is in the interval $\{-b,\dots,0,\dots,b\mod q\}$.
Elements of list $R$ are obtained as a result of one-way computation from index $i$,
two miner public keys $pk,w$ and hash of block header $m$ as $r_i=H(i||M||pk||m||w)$,
where $H$ is a hash function which returns the values in $\mathbb{Z}/q\mathbb{Z}$ and
$M$ is a static big message that is used to make hash calculation slower.
Also, a set of element indexes $J$ is to be obtained
by one-way pseudo-random function $genIndexes$, that prevents possible solutions
search optimizations.

Thus, we assume that the only option for a miner is to use the simple brute-force method given in Algorithm~\ref{alg:prove} to
create a valid block.

\begin{algorithm}[H]
    \caption{Block mining}
    \label{alg:prove}
    \begin{algorithmic}[1]
        \State \textbf{Input}: upcoming block header hash $m$, key pair $pk=g^{sk}$
        \State Generate randomly a new key pair $w=g^x$
        \State Calculate $r_{i \in [0,N)}=H(i||M||pk||m||w)$
        \While{$true$}
        \LetRnd{$nonce$}{$\mathsf{rand}$}
        \Let{$J$}{$genIndexes(m||nonce)$}
        \Let{$d$}{$\sum_{j \in J}{r_j} \cdot x - sk \mod q$}
        \If{$d < b$}
        \State \Return $(m,pk,w,nonce,d)$
        \EndIf
        \EndWhile
    \end{algorithmic}
\end{algorithm}

Note that although the mining process utilizes private keys, the solution itself
only contains public keys. Solution verification is done by Algorithm~\ref{alg:verify}.

\begin{algorithm}[H]
    \caption{Solution verification}
    \label{alg:verify}
    \begin{algorithmic}[1]
        \State \textbf{Input}: $m,pk,w,nonce,d$
        \State require $d < b$
        \State require $pk,w\in \mathbb{G}$ and $pk,w \ne e$
        \Let{$J$}{$genIndexes(m||nonce)$}
        \Let{$f$}{$\sum_{j \in J} H(j||M||pk||m||w)$}
        \State require $w^f = g^d \cdot pk$
    \end{algorithmic}
\end{algorithm}

This approach prevents mining pool formation because the secret key $sk$ is needed for mining: once any pool miner finds a correct solution, he can use this secret to steal the block reward. On the other hand, it is secure to reveal a single solution, as it only contains public keys and reveals a single linear relation between the 2 secrets $sk, w$.

Memory-hardness follows from the fact that Algorithm~\ref{alg:prove} requires keeping
the whole list $R$ for the main loop execution.
Every list element takes 32 bytes, so the whole list of $N$ elements
takes $N \cdot 32 = 2 Gb$ of memory for $N = 2^{26}$.
A miner can try to reduce memory requirements by calculating these elements ``on the fly''
without keeping them in memory, however, he'll need to calculate the same
hash $H$ multiple times~(about $10^4$ times for modern GPUs), thereby reducing efficiency and profit.

Calculating the list $R$ is also quite a heavy computational task: our initial implementation~\cite{ergoMiner}
consumes ~25 seconds on Nvidia GTX 1070 to fill all the $2^{26}$ elements of the list.
This part, however, may be optimized if a miner also stores a list of unfinalized hashes $u_{i \in [0,N)}=H(i||M||pk)$
in memory, consuming 5 more Gigabytes of it. In such a case, work to calculate unfinalized hashes should
be done only once during mining initialization while finalizing them and filling the list $R$
for the new header only consumes a few milliseconds~(about 50 ms on Nvidia GTX 1070).

The target parameter $b$ is built-in into the puzzle itself
and is adjusted to the current network hash rate via a difficulty adjustment
algorithm~\cite{meshkov2017short} to keep time interval between block close to 2 minutes.
This algorithm tries to predict the hash rate of an upcoming 1024 blocks long epoch
based on data from the previous 8 epochs via the well-known {\em linear least squares method}. This makes the predictions better than that of the usual difficulty adjustment algorithm and also makes ``coin-hopping'' attacks less profitable.