\section{First analysis and selection of interesting configurations}

General knowledge from previous plots not mentioned here: The number of leaf intersections is very low in comparison to the number of Node intersections. This is good because the Leaf intersections behave very randomly depending on scene and Leaf Size, and dont change with the Branching factor. Therefore we try to pick a good Branching factor to minimize the Node intersections and dont have to worry about the Leaf intersections much.

\newpage

%block that compares some values of the average tables:
\iftrue
\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\plot{Node memory loaded}{primaryIntersectionMultBranch}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		\plotr{Leaf memory loaded}{primaryIntersectionsMultLeaf}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}

	\begin{minipage}[t]{0.4\textwidth}
		\plot{primary Node intersections}{primaryNodeIntersections}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		\plotr{primary Leaf intersections}{primaryLeafIntersections}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}

	\begin{minipage}[t]{0.4\textwidth}
		\plot{secondary Node intersections}{secondaryNodeIntersections}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		\plotr{secondary Leaf intersections}{secondaryLeafIntersections}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}

	\caption{Overview of important values on the normalized average of all scenes.}
\end{figure}
\newpage
\fi

\pgfplotsset{
	every axis/.append style={colorbar = false}
}

\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = loaded Node Memory,
		cycle list name=exotic,
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={2: 2}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={3: 3}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{N = 2, N = 3, N = 4}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		%TODO move label to the right side
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = \nodei,
		cycle list name=exotic,
		legend style={at={(0.99,1.1)}, anchor = north east},
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={2: 2}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={3: 3}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{N = 2, N = 3, N = 4}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}

	\caption{Comparison of N2, N3 and N4 with the normalized average result. This shows that N=3 is significantly better than N2. It only loads minimally more Node Memory but has about 2/3 of the node Intersections of N2.}
\end{figure}

\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={90}{00},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = loaded Node Memory,
		legend style={at={(0.01,0.99)}, anchor = north west},
		cycle list name=exotic,
		ytick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		yticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict x to domain={1:1}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={2:2}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={3:3}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={4:4}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{L1,L2,L3,L4}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		%TODO move label to the right side
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={90}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = \nodei,
		cycle list name=exotic,
		ytick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		yticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict x to domain={1:1}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={2:2}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={3:3}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={4:4}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{L1,L2,L3,L4}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}
	\caption{Comparison of L1, L2, L3, L4 with the normalized average result. No significant difference between the different leafsizes. The loaded Node memory is lower for higher leafsizes because the Bvh is smaller. Those two plots also visualize the effect of increasing the branching factor. It increases the memory usage linearly, but the improvement in Node intersections is asymptotic. }
\end{figure}

\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = loaded Node Memory,
		cycle list name=exotic,
		legend style={at={(0.99,1.3)}, anchor = north east},
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={5: 5}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={6: 6}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={7: 7}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={8: 8}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionMultBranch, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{N = 4, N = 5, N = 6, N = 7, N = 8}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		%TODO move label to the right side
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = \nodei,
		cycle list name=exotic,
		legend style={at={(0.99,1.3)}, anchor = north east},
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={5: 5}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={6: 6}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={7: 7}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={8: 8}, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{N = 4, N = 5, N = 6, N = 7, N = 8}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}

	\caption{Comparison of N4, N5, N6, N7, N8 with the normalized average result. Here we can observe the effect that the difference between an odd N and the next larger even N is smaller than of a even N to the next larger odd N. Therefore it should be better to choose odd numbers like 5 and 7 than even numbers like 3, 6, and 8.}
\end{figure}
\newpage
\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = loaded Leaf Memory,
		cycle list name=exotic,
		legend style={at={(0.99,1.3)}, anchor = north east},
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={1: 1}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={2: 2}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={3: 3}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={5: 5}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={6: 6}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={7: 7}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={8: 8}, mark=none]table[x = leafSize, y = branchFactor, z = primaryIntersectionsMultLeaf, col sep=comma]{Data/AverageTableSorted.txt};

		\end{axis}
		\end{tikzpicture}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		%TODO move label to the right side
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={0}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = \leafi,
		cycle list name=exotic,
		legend style={at={(0.99,1.3)}, anchor = north east},
		xtick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		xticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict y to domain={1: 1}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={2: 2}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={3: 3}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={4: 4}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={5: 5}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={6: 6}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={7: 7}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict y to domain={8: 8}, mark=none]table[x = leafSize, y = branchFactor, z = primaryLeafIntersections, col sep=comma]{Data/AverageTableSorted.txt};

		\end{axis}
		\end{tikzpicture}
	\end{minipage}

	\caption{Comparison of N1 to N8 with the normalized average result. The different branching factor has no effect on the leaf Intersections. The Leaf memory usage in respect to the Leafsize behaves very similar to the Node Memory usage in respect to the Branching Factor. But the \leafi  are not very predictable. The odd numbers are better on most scenes (especially noticeable for rungholt and sponza), but the overall difference is minimal, so it seems the best to adjust the Leafsize to the hardware.}
\end{figure}

\newpage

Current selection of N and L:

N2L1 as the most generic version, and N4L4 for QBvh

N3L1, N3L2 and N3L4 to compare it to the generic versions since our data suggests that N3 is very beneficial

N5LX and N7LX as described in Figure 4. X stands for arbitrary Leaf size depending on hardware preferences. If i had to choose i would take either L2, L4 or L6 because it seems to be good to have even Leaf Sizes for all our scenes.

\section{LATE ADDITION: node cache lines Analysis}

We assume that for each child wee need 32 bytes. For each child need 24 bytes for the aabb bounds, and have 8 free for rest. The node index (once 4 byte), and then the rest for the order and axis of the splits.

With a 128 byte cache line this leads to:
\begin{itemize}
	\item[] N = 1, 2, 3, 4 $\rightarrow$ 1 cache line
	\item[] N = 5, 6, 7, 8 $\rightarrow$ 2 cache lines
	\item[] N = 9, 10, 11 ,12 $\rightarrow$ 3 cache lines
	\item[] N = 13, 14, 15, 16 $\rightarrow$ 4 cache lines
\end{itemize}

\iffalse
The following space is needed for one node):

\begin{itemize}
	\item 6 byte: Position of next node / triangle + number of nodes / number of triangles (could probably be reduced to 5)
	\item 24 * N byte: space needed to save aabb (cannot be smaller when we use float)
	\item (N-1) * 2 byte: space needed to save the order in witch the aabb should be traversed. (dont think this can be smaller)
\end{itemize}
Short form is 4 + 26*N.
This results in the following Node sizes (in byte):
\begin{enumerate}[label=\arabic*]
	\item = not useful, wasted space for axis order
	\item = 56 (also wasted space for axis order)
	\item = 82
	\item = 108
	\item = 134
	\item = 160
	\item = 186
	\item = 212
	\item = 238
	\item = 264
	\item = 290
	\item = 316
	\item = 342
	\item = 368
	\item = 394
	\item = 420

\end{enumerate}

With a 128 byte cache line this leads to:
\begin{itemize}
	\item[] N = 1, 2, 3, 4 $\rightarrow$ 1 cache line
	\item[] N = 5, 6, 7, 8 ,9 $\rightarrow$ 2 cache lines
	\item[] N = 10,11,12,13,14 $\rightarrow$ 3 cache lines
	\item[] N = 15,16 $\rightarrow$ 4 cache lines
\end{itemize}

\fi

\pgfplotsset{
	every axis/.append style={colorbar}
}

%block that adds node cacheline plots
\iftrue
\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\plot{Primary Node cache lines}{primaryNodeCachelines}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		\plotr{Secondary Node cache lines}{secondaryNodeCachelines}{Data/AverageTableWithSpaceSorted.txt}
	\end{minipage}

	\caption{Loaded node cache lines of the normalized average of all scenes. Now with this information N4 N9 and N15 would be the only reasonable configurations}
\end{figure}
\fi

\begin{figure}[!htb]
	\begin{minipage}[t]{0.4\textwidth}
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={90}{00},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = loaded Node cache lines,
		legend style={at={(0.01,1.3)}, anchor = north west},
		cycle list name=exotic,
		ytick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		yticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict x to domain={4:4}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeCachelines, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={8:8}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeCachelines, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={12:12}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeCachelines, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={16:16}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeCachelines, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{L4,L8,L12,L16}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}\hfil \hfil
	\begin{minipage}[t]{0.4\textwidth}
		%TODO move label to the right side
		\begin{tikzpicture}
		\begin{axis}
		[
		%view={90}{0} for x, view={0}{0} for y restriction
		view={90}{0},
		xlabel = \leafs,
		ylabel = \branchf,
		zlabel = \nodei,
		cycle list name=exotic,
		ytick={2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
		yticklabels={,,,$5$,,,,,$10$,,,,,$15$,},
		]
		\addplot3+[thick, restrict x to domain={4:4}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={8:8}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={12:12}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};
		\addplot3+[thick, restrict x to domain={16:16}, unbounded coords=discard, mark=none]table[x = leafSize, y = branchFactor, z = primaryNodeIntersections, col sep=comma]{Data/AverageTableSorted.txt};

		\legend{L4,L8,L12,L16}
		\end{axis}
		\end{tikzpicture}
	\end{minipage}
	\caption{Comparison of L4, L8, L12, L16 with the normalized average result.}
\end{figure}


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

\subsubsection{Geodesic deviation in the proper detector frame}

\marginpar{Monday\\ 2020-3-23, \\ compiled \\ \today}

% We were discussing the proper detector frame: it is defined by rigid rulers around one point in free fall.

What happens in this frame? The equation of geodesic deviation can be calculated from \eqref{eq:geodesic-deviation-equation-slow-objects}:
%
\begin{subequations}
\begin{align}
0 &= \dv[2]{\xi^{i}}{\tau}
+ 2 \Gamma^{i}_{\nu \rho } \dv{x^{\nu }}{\tau } \dv{x^{\rho }}{\tau }
+ \xi^{\sigma } \qty( \partial_{\sigma } \Gamma^{i}_{\nu \rho } ) \dv{x^{\nu }}{\tau } \dv{x^{\rho }}{\tau }  \\
&=\dv[2]{\xi^{i}}{\tau}
+ \xi^{j} \qty(\partial_{j} \Gamma^{j}_{00}) \qty(\dv{x^{0}}{\tau })^2
\,,
\end{align}
\end{subequations}
%
where we made the nonrelativistic approximation where the spacelike components of the four-velocity are negligible, and accounted for the fact that in this frame we have
%
\begin{align}
\Gamma^{\mu }_{\nu \rho } = 0
\qquad \text{and} \qquad
\partial_0 \Gamma^{i}_{0j} =0
\implies
R^{i}_{0j0} = \partial_{j} \Gamma^{i}_{00}
\,,
\end{align}
%
so we can write the geodesic equation in terms of the Riemann tensor as:
%
\begin{align}
0= \dv[2]{\xi^{i}}{\tau } + R^{i}_{0j0} \xi^{j} \qty(\dv{x^{0}}{\tau })^2
\,,
\end{align}
%
and since in linearized gravity the Riemann tensor is \emph{invariant} (rather than covariant) under coordinate transformations\footnote{This can be seen by plugging the transformation law which is allowed in linearized gravity, \(h_{\mu \nu } \to h_{\mu \nu } + \partial_{(\mu } h_{\nu )}\), into the LIF expression for the Riemann tensor,
%
\begin{align}
R_{\mu \nu \rho \sigma } = -2 g_{[\mu | [\rho | , |\nu ] \sigma] }
\,,
\end{align}
%
which yields no change (the expression is a compact way to write that the indices to antisymmetrize are both \(\mu \nu \) and \(\rho \sigma \)). This is discussed by Maggiore \cite[below eq.\ 1.13]{maggioreGravitationalWavesVolume2007}.}
such as those we used to move between the TT gauge and the detector frame,
we can compute it in the TT gauge starting from equation \eqref{eq:riemann-tensor-LIF}:
%
\begin{align}
R^{i}_{0j0} &= \frac{1}{2} \qty(
  \partial_{j} \partial_0 h^{i}_{0}
  + \partial_0 \partial^{i} h_{0j}
  - \partial_{j} \partial^{i} h_{00}
  - \partial_0 \partial_0 h^i_{j}
) = R_{i0j0} \\
&= - \frac{1}{2} \partial_0 \partial_0 h_{ij} = - \frac{1}{2} \ddot{h}_{ij}^{TT}
\,,
\end{align}
%
so our final result for the geodesic deviation equation in the detector frame is:
%
\boxalign{
\begin{align} \label{eq:geodesic-deviation-detector-frame}
\ddot{\xi}^{i} = \frac{1}{2} \ddot{h}^{TT}_{ij} \xi^{j}
\,,
\end{align}}
%
which is physically significant since we can interpret the effect of the GW as that of a Newtonian force, given by
%
\begin{align}
F^{i} = \frac{m}{2} \ddot{h}^{TT}_{ij} \xi^{j}
\,.
\end{align}

This seems great! We can have particles move under the influence of the GW, work with \(h_{ij}\) in the simple TT gauge, while still being in almost flat spacetime.

However, to get here we made some approximations, and we need to check whether they are justified.
% How do we decide whether these approximations are justified?
We imposed \(r^2 / L_B^2 \ll 1 \), where \(L_B\) is the scale of the variations of the metric while \(r\) is the scale of our detector.
For ground-based detectors which are \(\sim \SI{3}{km}\) long and sensitive in the \(\sim \SI{100}{Hz}\) range (corresponding to \(\lambda \sim \SI{3000}{km}\)) this is perfectly fine.
For space-based detectors like LISA it is not!

What we have calculated applies to proper distances as well, which are the same as coordinate distances up to first order in our coordinates.
So, since proper distances are invariant, we have an approximate expression which we can use in general, by substituting \(s\) for \(\xi \) in the differential equation.

\subsubsection{Effects of GW}

This result allows us to see that the GWs are \textbf{transverse}: for a wave along the \(z\) direction the equation reads
%
\begin{align}
\ddot{\xi}^{3} = \frac{1}{2} \ddot{h}_{3j}^{TT} \xi^{j} = 0
\,,
\end{align}
%
so the particle does not move along the direction of propagation;
on the other hand we can do the calculations for particles starting out with small separations along \(x\) or \(y\).

We consider an initial displacement vector \(\xi_{i} (t = 0) = (x_0, y_0 , 0)\), allow it to vary denoting it as \(\xi_i (t) = (x_0 + \delta x, y_0 + \delta y, 0) = \xi_i (t=0) + \delta \xi_i (t)\) and compute:
%
\begin{align}
\ddot{x}_{i} = \delta \ddot{\xi}_{i} = \frac{1}{2} \ddot{h}_{ij}^{TT} (\xi_{j} + \delta \xi_j)
\approx \frac{1}{2} \ddot{h}_{ij}^{TT} \xi_{j}
\,,
\end{align}
%
since the variation \(\delta \xi \) is of the same perturbative order as \(h_{ij}\), making the term containing it second order.

So, after we take the real part of the exponential in \(h_{ij}\) and ignore the \(z\) dependence (which just gives a constant phase, since \(z\) is fixed) we get
%
\begin{align}
\dv[2]{}{t} \left[\begin{array}{c}
\delta x \\
\delta y
\end{array}\right]
&= \frac{1}{2} \left[\begin{array}{cc}
h_+ & h_{ \times } \\
h_{ \times } & - h_+
\end{array}\right]
\dv[2]{}{t} \qty(\cos(\omega t))
\left[\begin{array}{c}
x_0 \\
y_0
\end{array}\right]  \\
&= \frac{1}{2} \left[\begin{array}{cc}
h_+ & h_{ \times } \\
h_{ \times } & - h_+
\end{array}\right]
\left[\begin{array}{c}
x_0 \\
y_0
\end{array}\right]
\qty(- \omega^2 \cos(\omega t))
\,.
\end{align}

When we integrate to get \(\delta x\) and \(\delta y\) the factor \(- \omega^2 \) gets reabsorbed.

For the plus polarization \(h_+\) (setting \(h_{ \times } = 0\)) we find
%
\begin{subequations}
\begin{align}
  \delta x &= \frac{1}{2} h_{+} x_0 \cos(\omega t)  \\
  \delta y &= - \frac{1}{2} h_{+} y_0 \cos(\omega t)
\,,
\end{align}
\end{subequations}
%
while for the cross polarization \(h_{ \times }\) (setting \(h_{+} = 0\)) we get
%
\begin{subequations}
\begin{align}
\delta x &= \frac{1}{2} h_{ \times } y_0 \cos(\omega t)  \\
\delta y &= \frac{1}{2} h_{ \times } x_0 \cos(\omega t)
\,.
\end{align}
\end{subequations}

\todo[inline]{There is a wrong sign in the slides here.}

% We can also have circular polarizations, like \(h_+ \pm i h_{  \times }\).

Are these considerations valid for \textbf{Earth-based detectors}?
They are definitely not free-falling, in fact:
\begin{enumerate}
  \item at zeroth order the metric is flat;
  \item at first order we have the Newtonian forces, such as the Earth's gravity, the Coriolis force, the centrifugal force and such;
  \item at second order we get the curvature contributions from GW and the background metric.
\end{enumerate}

So, how do we distinguish these second-order GW effects from other second-order effects?
We can isolate them by Fourier analysis: we only look at the Fourier window in which they are dominant.

% How do we know that our ``free-falling'' mass is moving because of the GW and not because of other noises?
% We can bound the mass and distance of a source of GW we detect in a certain frequency region.

% At the low frequencies, we have objects on the Earth making noise.

% Now, let us move towards GW \emph{generation}.

\section{GW generation}

The assumptions we will make are
\begin{enumerate}
  \item expanding around flat spacetime;
  \item consider nonrelativistic systems;
  \item assume the stress energy tensor is conserved: to first order, this reads
  %
  \begin{align}
  \partial^{\mu} T_{\mu \nu } = 0
  \,.
  \end{align}
\end{enumerate}

If the system we consider is self-gravitating (like a binary), then being nonrelativistic means that it is also large with respect to its Schwarzschild radius:
%
\begin{align}
E _{\text{kin}} =
- \frac{1}{2} U \implies
\frac{1}{2}
\mu v^2 =
\frac{1}{2} G \frac{\mu M}{r}
\implies \frac{v^2}{c^2}
= \frac{GM}{c^2 r}
= \frac{R_S}{r} \ll 1
\,.
\end{align}

The expression of the gravitational force is that since, by the definition of the reduced mass, we have \(m_1 m_2 = \mu M \).

Recall the \(\Lambda_{ij, kl}\) tensor \eqref{eq:lambda-projection-tensor}, which can be used to project a rank-two spacelike tensor to the TT gauge.

We will proceed as section 17.6 in Hobson \cite[]{hobsonGeneralRelativityIntroduction2006a}.
In order to solve the linearized equations \eqref{eq:linearized-wave-equations}, we use Green's functions, which are defined by:
%
\begin{align}
\square_x G(x -y) = \delta^{(4)} (x-y)
\,,
\end{align}
%
where \(x\) is our variable, while \(y\) is a coordinate which will span the positions in the source.
The operator \(\square_x\) is the Dalambertian with respect to the \(x\) coordinates.

The idea of this method is to calculate the wave response to a single impulsive source, and then superimpose the effects of many of these.
We introduce \(\kappa = 1/ M_P^2\) for simplicity, multiply the previous equality by \(T_{\mu \nu } (y)\) and integrate in \(\dd[4]{y}\) so we get
%
\begin{align}
-2 \kappa \int \dd[4]{y} \square_x G(x-y) T_{\mu \nu } (y) &= -2\kappa  \int \dd[4]{y} \delta^{(4)} (x-y) T_{\mu \nu }(x)
\marginnote{The argument of the right \(T_{\mu \nu }\) can be switched to \(x\) because of the delta.}
\\
-2 \kappa \square_x \qty(\int \dd[4]{y} G(x-y) T_{\mu \nu } (y))
&= - 2 \kappa T_{\mu \nu }(x) = \square_x \overline{h}_{\mu \nu } (x)
\,,
\end{align}
%
so we will have as a solution a superposition of the homogeneous solution and the source term:
%
\begin{align} \label{eq:green-function-solution-linearized-EFE}
\overline{h}_{\mu \nu } (x) = \underbrace{\overline{h}^{(0)}_{\mu \nu }(x)}_{\square \overline{h}^{(0)}_{\mu \nu } = 0}
- 2\kappa  \int \dd[4]{y} G(x-y) T_{\mu \nu }(y)
\,.
\end{align}

In order to make the Green's function explicit, we write it as centered around the origin:
%
\begin{align}
\partial_{\mu } \partial^{\mu } G(x^{\sigma }) = \delta^{(4)} (x^{\sigma })
\,,
\end{align}
%
and we integrate this equality over a hypercylinder \(V\) (the product of a 3-sphere of radius \(r = \abs{\vec{x}}\) and an interval \([-ct, ct]\subset \mathbb{R}\), where \(ct > r\)) we have
%
\begin{subequations}
\begin{align}
\int_V \dd[4]{x} \delta^{(4)} (x^{\sigma }) &= 1  = \int_{V} \dd[4]{x} \partial_{\mu } \partial^{\mu } G(x^{\sigma })  \\
&= \int \dd{S} \qty(\partial_{\mu } G(x^{\sigma })) n^{\mu }
\,,
\end{align}
\end{subequations}
%
but the only points which can contribute are in the future light-cone because of causality, so the dependence of \(G\) upon \(x^{\sigma }\) must be in the form \(G(x^{\sigma }) = f(r) \delta (ct - r) [ct \geq 0]\).\footnote{The bracket is an Iverson bracket \cite[]{knuthTwoNotesNotation1992}, it evaluates to 1 or 0 depending on whether the expression inside it is true or false.}

We write \(\dd{S} = c \dd{t} r^2 \dd{\Omega }\),\footnote{The \(r^2\) is missing in Hobson \cite[pag.\ 477]{hobsonGeneralRelativityIntroduction2006a} as well, but it should be there.} and we call \(n^{\mu } \partial_{\mu } = \partial_{r}\):
%
\begin{subequations}
\begin{align}
1 &= \int \dd{S} \qty(\partial_{\mu } G(x^{\sigma })) n^{\mu }  \\
&= 4 \pi r^2 \int_0^{ \infty } \dd{t} \partial_{r} \qty(f(r) \delta (ct-r) )c  \\
&= 4 \pi r^2 \partial_{r} f(r) c + 4 \pi r^2 f(r) \underbrace{\int_{0}^{ \infty }  \partial_{r} \delta (ct - r) c \dd{t}}_{= 0}
\marginnote{The derivative of the delta evaluates the derivative of the thing it multiplies, which is a constant.}
\,,
\end{align}
\end{subequations}
%
so we can get an explicit expression for the function \(f(r)\):
%
\begin{align}
4 \pi r^2 \partial_{r} f(r) = 1 \implies
f(r) = - \frac{1}{4 \pi r}
\implies G(x^{\sigma }) = - \frac{ \delta (x^{0} - \abs{\vec{x}})}{4 \pi \abs{\vec{x}}} \theta_H (x^{0})
\marginnote{The integration constant is set to zero so that the Green function vanishes at infinity.}
\,.
\end{align}

We can then plug this into the general solution \eqref{eq:green-function-solution-linearized-EFE} to find
%
\begin{align}
\overline{h}_{\mu \nu }
(t, \vec{x})
&= (-)^2 2 \kappa \int \dd[4]{y} \frac{ \delta (x^{0} - y^{0} - \abs{\vec{x} - \vec{y}})}{4 \pi \abs{\vec{x} - \vec{y}}} \theta_H (x^{0} - y^{0}) T_{\mu \nu } (y)  \\
&= \frac{4G}{c^{4}} \int \dd[4]{y}  \frac{ \delta (y^{0} - (ct - \abs{\vec{x} - \vec{y}}))}{\abs{\vec{x} - \vec{y}}} T_{\mu \nu } (y^{0}, \vec{y})
\marginnote{\(\kappa = 8 \pi G / c^{4}\).}
\\ &=
\frac{4G}{c^{4}}
\int \dd[3]{y} \frac{T_{\mu \nu } (ct - \abs{\vec{x}-\vec{y}}, \vec{y})}{\abs{\vec{x} - \vec{y}}}
\,.
\end{align}

As long as we are outside the source we can move to the TT gauge, since there the equation \(\square \overline{h}_{\mu \nu }\) satisfies the EFE, so we can do the required gauge change of variables with \(\square \xi^{\mu \nu } = 0\).
Now, in order to move to the TT gauge we can use the \(\Lambda \) tensor. It is equivalent to apply it to the trace-reversed \(\overline{h}_{ij}\) or to \(h_{ij}\), since the tensor is projected into the space of traceless tensors anyways.\footnote{Formally, this is shown as
%
\begin{align}
\Lambda_{ij, kl} \overline{h}_{kl} = \Lambda_{ij, kl} \qty(h_{kl} - \frac{1}{2} \eta_{kl} h) = \Lambda_{ij, kl} h_{kl} - \underbrace{\frac{1}{2} \Lambda_{ij, kk}}_{= 0} h = \Lambda_{ij, kl} h_{kl}
\,.
\end{align}
}

So, the general expression for our TT-gauge tensor measured at a position \(\vec{x}\) outside the source, with \(\hat{n} = \vec{x} / \abs{x}\):
%
\boxalign{
\begin{align}
h_{ij}^{TT} (ct, \vec{x}) =  \Lambda_{ij, kl} (\hat{n}) \overline{h}_{kl}
= \frac{4G}{c^{4}} \Lambda_{ij, kl} (\hat{n}) \int \dd[3]{y} \frac{T_{kl } (ct - \abs{\vec{x} - \vec{y}}, \vec{y})}{\abs{\vec{x} - \vec{y}}}
\,.
\end{align}}

Far from the source, \(\abs{\vec{x}} \gg \abs{\vec{y}}\) for any \(\vec{y}\) inside the source.
So, we can expand:\footnote{
  The full calculation goes as follows:
  %
  \begin{align}
  \abs{x - y} &= \sqrt{(x - y)^2} = \sqrt{x^2 + y^2 - 2 x \cdot y} = r \sqrt{1 - 2 \frac{\hat{n} \cdot y}{r} + \frac{y^2}{r^2}}  \\
  &\approx r \qty(1 - \frac{\hat{n} \cdot y}{r} + \order{\frac{d^2}{r^2}} )
  \,,
  \end{align}
  %
  where \(d\) is the length scale of the source, such that \(\abs{y} \leq d\).
}
%
\begin{align}
\abs{\vec{x} - \vec{y}} = r \qty(1 - \frac{\vec{y} \cdot \hat{n}}{r} + \order{\frac{d^2}{r^2}})
\,.
\end{align}

Keeping only the terms at \(\order{1/r}\) we get\footnote{At this point we change the first argument of the stress-energy tensor's dimensionality from a space \(ct\) to a time \(t\); this is just a matter of convention, it makes it easier to write the Taylor expansion later. }
%
\begin{align}
h_{ij}^{TT} (t, \vec{x}) = \frac{1}{r} \frac{4G}{c^{4}}
\Lambda_{ij, kl} \int \dd[3]{y}
T_{kl} \qty(t - \frac{r}{c} + \frac{\vec{y} \cdot \hat{n}}{c}, \vec{y})
\,.
\end{align}

If the object is moving periodically with frequency \(\omega_s \), then we will have
%
\begin{align}
\frac{1}{\omega_s } \sim \frac{d}{v}
\,,
\end{align}
%
and we assume \(d/c \ll d/v\), which is equivalent to \(v \ll c\): the characteristic velocities of the source should be nonrelativistic.
Under these assumptions we can expand the stress-energy tensor in powers of \(\xi = \vec{y} \cdot \hat{n} / c \sim d/c \ll d/v\):
%
\begin{align}
T_{kl} \qty(t - \frac{r}{c} + \xi, \vec{y}) &= T_{kl} \qty(t - \frac{r}{c}, \vec{y}) + \eval{\pdv{T_{kl}}{\xi }}_{\xi = 0} \xi  + \frac{1}{2} \eval{\pdv[2]{T_{kl}}{\xi }}_{\xi = 0} \xi^2 + \order{\xi^3}  \\
&\approx T_{kl} \qty(t - \frac{r}{c}, \vec{y}) +
\xi \partial_0 T_kl + \frac{\xi^2}{2} \partial_{0} \partial_0 T_{kl}  \\
&= T_{kl} \qty(t - \frac{r}{c}, \vec{y}) +
\frac{y^{i}n^{i}}{c} \partial_0 T_kl + \frac{y^{i}n^{i}y^{j}n^{j}}{2 c^2} \partial_{0} \partial_0 T_{kl}
\,.
\end{align}

Inserting this into the expression we get
%
\begin{align}
h_{ij}^{TT} (t, \vec{x}) = \frac{1}{r} \frac{4G}{c^{4}} \Lambda_{ij, kl} \int \dd[3]{y}\qty[T_{kl} + \frac{y^{m} n^{m}}{c} \partial_0 T_{kl}  + \frac{y^{m} y^{p} n^{m} n^{p}}{2c^2} \partial_0^2 T_{kl} + \order{\xi^3}]_{\text{ret}}
\,,
\end{align}
%
where ``ret'' means that the stress-energy tensor should be computed at a retarded time: \(t - r/c\) instead of \(t\).

We define the multipole moments: they are tensors with an arbitrary amount of indices,
%
\begin{align}
S^{ij, m_1 m_2 \dots} (t) = \int \dd[3]{y} T^{ij}(t, y) \prod_\alpha  y^{m_\alpha }
\,.
\end{align}

In terms of these, the expression for \(h_{ij}^{TT}\) can be written as
%
\begin{align}
h_{ij}^{TT} (t, \vec{x}) = \frac{1}{r} \frac{4G}{c^{4}} \Lambda_{ij, kl}
\qty(S^{kl} + \frac{1}{c} n_{m} \dot{S}^{kl, m} + \frac{1}{2 c^2} n_m n_p \ddot{S}^{kl, mp} + \order{\xi^3})_{\text{ret}}
\,.
\end{align}

As we go up a perturbative order, we insert a factor \(1/c\), we add an index to the multipole, which corresponds to a multiplication by \(y \sim d\), and we differentiate, corresponding to a division by a timescale \(t\) of the evolution of the system: so, the \(n\)-th order perturbative term is of order \((d/ct)^{n} \sim (v/c)^{n}\).
Since the system is nonrelativistic, \(v/c\) is small compared to 1, so we can stop at the first order and still get a good result:
%
\begin{align}
h_{ij}^{TT} (t, \vec{x}) \approx \frac{1}{r} \frac{4G}{c^{4}}
\Lambda_{ij, kl} \qty( S^{kl} + \frac{1}{c} n_m \dot{S}^{kl, m})_{\text{ret}}
\,.
\end{align}

Let us define the moments of the energy and momentum densities:
%
\begin{align}
M &= \frac{1}{c^2} \int \dd[3]{y} T^{00}(t, \vec{y}) \sim \frac{1}{c^2} S^{00} \\
M^{i} &= \frac{1}{c^2} \int \dd[3]{y} T^{00}(t, \vec{y})y^{i} \sim \frac{1}{c^2} S^{00,i} \\
M^{ij} &= \frac{1}{c^2} \int \dd[3]{y} T^{00}(t, \vec{y})y^{i}y^{j} \sim \frac{1}{c^2} S^{00,ij} \\
P^{i} &= \frac{1}{c^2} \int \dd[3]{y} T^{0i} (t, \vec{y}) \sim \frac{1}{c^2} S^{0i} \\
P^{i,j} &= \frac{1}{c^2} \int \dd[3]{y} T^{0i} (t, \vec{y}) y^{j} \sim \frac{1}{c^2} S^{0i,j} \\
P^{i,jk} &= \frac{1}{c^2} \int \dd[3]{y} T^{0i} (t, \vec{y}) y^{j}y^{k} \sim \frac{1}{c^2} S^{0i,jk}
\,,
\end{align}
%
where we have an analogy (\(\sim\)) instead of an equality because the \(S^{ij,m_1 m_2 \dots}\) are defined only with spatial indices.

We might want to compute the \textbf{backreaction} of the GW emission onto the system, the energy lost per unit time: since \(M\) corresponds to the total energy, we could try to compute \(\dot{M}\).\footnote{A small technical note: since we are bothering to keep the \(c\)s, we should recall that the time derivative denoted by a dot is actually a derivative with respect to \(ct\).}
Let us try to do this, recalling that by the stress-energy tensor's conservation we have \(\partial_{\mu } T^{\mu \nu } = 0\), which means \(\partial_{0} T^{00} = - \partial_{i} T^{0i}\):
%
\begin{align}
c\dot{M} = \int_{V} \dd[3]{y} \partial_{0} T^{00}
= - \int_{V} \dd[3]{y} \partial_{i} T^{0i}
= - \int_{\partial V} \dd{S}_i T^{0i} \to 0
\,,
\end{align}
%
since the flux is computed in a region outside the source, where its stress-energy tensor vanishes.
What this means is that the leading order is too low to see the energy loss.
If we move up an order we find
%
\begin{align}
c \dot{M}^{i} &= \int_{V} \dd[3]{y} y^{i} \underbrace{\partial_{0} T^{00}}_{= - \partial_{j} T^{0j}}
= + \int_{V} \dd[3]{y} \qty(\partial_{j} y^{i}) T^{0j} = cP^{i}
\,,
\end{align}
%
which means that the time derivative of the center of mass \(M^{i}\) gives the total linear momentum.
Like the total energy, this is conserved: it can be shown like
%
\begin{align}
\dot{P}^{i} = \int_V \dd[3]{y} \partial_{0} T^{0i} = -\int_V \dd[3]{y} \partial_{j} T^{ji} = - \int_{\partial V} \dd{S_j} T^{ji}  \to 0
\,.
\end{align}

We also can show that \(\dot{M}^{ij} = 2 P^{(i, j)}\), \(\dot{M}^{ijk} = P^{i,jk} + P^{j, ik} + P^{k, ij}\) and \(\dot{P}^{i,j} = 2 S^{ij}\), which means \(\ddot{M}^{ij} = 2 S^{ij}\).
The computation is done by repeatedly applying integration by parts and the continuity equation:
%
\begin{align}
\ddot{M}^{kl} &= \int \partial_0 \partial_0 T^{00}(t, \vec{y}) y^{k}y^{l}  \\
&= - \int \partial_0 \qty(\partial_{i} T^{i0}) y^{k}y^{l}
= \int \partial_0 T^{i0} \partial_{i} \qty(y^{k}y^{l})  \\
&= \int \partial_0 T^{i0} \qty(\delta_i^k y^{l} + \delta_{i}^{l} y^{k})
= -\int \partial_{j} T^{ij} \qty(\delta_i^k y^{l} + \delta_{i}^{l} y^{k})  \\
&= \int T^{ij} \qty(\delta_{i}^{k} \delta^{l}_{j} + \delta_{i}^{l} \delta^{k}_{j})
= \int T^{kl} + T^{lk} = 2 S^{kl}
\,.
\end{align}

To give a physical intuition: the spatial components \(S^{kl}\) describe the \emph{pressure} and \emph{shears} in the source --- they make up the stress tensor. On the other hand, \(M^{kl}\) is the second moment of the mass density; its second derivative is somewhat analogous to a mass times an acceleration. So, this equation is a way to relate the forces and the accelerations inside the source.

\subsubsection{Quadrupole radiation}

If we only keep the first order in the expression for \(h^{TT}_{ij} \) we get:
%
\begin{align}
h_{ij}^{TT} (t, \vec{x}) \approx \frac{1}{r} \frac{4G}{c^{4}} \Lambda_{ij, kl} S^{kl}
= \frac{1}{r} \frac{2G}{c^{4}} \Lambda_{ij,kl} \ddot{M}^{kl}
\,.
\end{align}

The quadrupole moment is defined as the traceless part of the moment \(M^{ij}\):
%
\begin{align}
Q^{kl} = M^{kl} - \frac{1}{3} \delta^{kl} M_{ii}
= \int \dd[3]{x} \rho (t, \vec{x}) \qty(x^{i} x^{j} - \frac{1}{3} r^2 \delta_{ij})
\,.
\end{align}

Since \(\Lambda_{ij, kl} \delta^{kl} =0 \), we can substitute \(Q^{kl}\) for \(M^{kl}\):
%
\begin{align} \label{eq:traceless-transverse-amplitude-from-quadrupole}
h_{ij}^{TT} (t, \vec{x}) = \frac{1}{r} \frac{2G}{c^{4}}
\Lambda_{ij, kl} \ddot{Q}^{kl} \qty(t - \frac{r}{c})
= \frac{1}{r} \frac{2G}{c^{4}} \ddot{Q}^{TT}_{ij} \qty(t - \frac{r}{c})
\,.
\end{align}

If a wave is propagating along the \(\hat{n} = \hat{z}\) direction, we get
%
\begin{subequations}
\begin{align}
\Lambda_{ij, kl} \ddot{M}_{kl} = \frac{1}{2} \left[\begin{array}{ccc}
\qty(\ddot{M}_{11} - \ddot{M}_{22}) / 2 &  \ddot{M}_{12} & 0 \\
\ddot{M}_{12} & \qty(\ddot{M}_{22} - \ddot{M}_{11}) / 2 & 0 \\
0 & 0 & 0
\end{array}\right]
\,,
\end{align}
\end{subequations}
%
since the projection tensor \(P_{ij}\) is \(P_{ij} = \diag{1, 1, 0}\), while
%
\begin{align}
\Lambda_{ij, kl} \ddot{M}_{kl} = \qty(P \ddot{M}P)_{ij} - \frac{1}{2} P_{ij} \Tr \ddot{M}
\,.
\end{align}

\end{document}


\chapter{R$^5$RS compatibility}
\label{r5rscompatchapter}

The features described in this chapter are exported from the
\defrsixlibrary{r5rs} library and provide some functionality of the
preceding revision of this report~\cite{R5RS} that was omitted from
the main part of the current report.

\begin{entry}{%
\proto{exact->inexact}{ z}{procedure}
\proto{inexact->exact}{ z}{procedure}}

These are the same as the {\cf inexact} and {\cf exact}
procedures; see report section~\extref{report:inexact}{Generic conversions}.
\end{entry}

\begin{entry}{%
\proto{quotient}{ \vari{n} \varii{n}}{procedure}
\proto{remainder}{ \vari{n} \varii{n}}{procedure}
\proto{modulo}{ \vari{n} \varii{n}}{procedure}}

These procedures implement number-theoretic (integer)
division.  \varii{N} must be non-zero.  All three procedures
return integer objects.  If \vari{n}/\varii{n} is an integer object:
\begin{scheme}
    (quotient \vari{n} \varii{n})   \ev \vari{n}/\varii{n}
    (remainder \vari{n} \varii{n})  \ev 0
    (modulo \vari{n} \varii{n})     \ev 0
\end{scheme}
If \vari{n}/\varii{n} is not an integer object:
\begin{scheme}
    (quotient \vari{n} \varii{n})   \ev \var{n$_q$}
    (remainder \vari{n} \varii{n})  \ev \var{n$_r$}
    (modulo \vari{n} \varii{n})     \ev \var{n$_m$}
\end{scheme}
where \var{n$_q$} is $\vari{n}/\varii{n}$ rounded towards zero,
$0 < |\var{n$_r$}| < |\varii{n}|$, $0 < |\var{n$_m$}| < |\varii{n}|$,
\var{n$_r$} and \var{n$_m$} differ from \vari{n} by a multiple of \varii{n},
\var{n$_r$} has the same sign as \vari{n}, and
\var{n$_m$} has the same sign as \varii{n}.

Consequently, for integer objects \vari{n} and \varii{n} with
\varii{n} not equal to 0,
\begin{scheme}
     (= \vari{n} (+ (* \varii{n} (quotient \vari{n} \varii{n}))
           (remainder \vari{n} \varii{n})))
                                 \ev  \schtrue%
\end{scheme}
provided all number object involved in that computation are exact.

\begin{scheme}
(modulo 13 4)           \ev  1
(remainder 13 4)        \ev  1

(modulo -13 4)          \ev  3
(remainder -13 4)       \ev  -1

(modulo 13 -4)          \ev  -3
(remainder 13 -4)       \ev  1

(modulo -13 -4)         \ev  -1
(remainder -13 -4)      \ev  -1

(remainder -13 -4.0)    \ev  -1.0%
\end{scheme}

\begin{note}
  These procedures could be defined in terms of {\cf div} and {\cf
    mod} (see report section~\extref{report:div}{Arithmetic operations}) as follows (without checking of the
  argument types):
\begin{scheme}
(define (sign n)
  (cond
    ((negative? n) -1)
    ((positive? n) 1)
    (else 0)))

(define (quotient n1 n2)
  (* (sign n1) (sign n2) (div (abs n1) (abs n2))))

(define (remainder n1 n2)
  (* (sign n1) (mod (abs n1) (abs n2))))

(define (modulo n1 n2)
  (* (sign n2) (mod (* (sign n2) n1) (abs n2))))
\end{scheme}
\end{note}
\end{entry}

\begin{entry}{%
\proto{delay}{ \hyper{expression}}{\exprtype}}

The {\cf delay} construct is used together with the procedure \ide{force} to
implement \defining{lazy evaluation} or \defining{call by need}.
{\tt(delay~\hyper{expression})} returns an object called a
\defining{promise} which at some point in the future may be asked (by
the {\cf force} procedure) to evaluate
\hyper{expression}, and deliver the resulting value.
The effect of \hyper{expression} returning multiple values
is unspecified.

\end{entry}

\begin{entry}{%
\proto{force}{ promise}{procedure}}

{\var{Promise} must be a promise.}
The {\cf force} procedure forces the value of \var{promise}.  If no value has been computed for
the promise, then a value is computed and returned.  The value of the
promise is cached (or ``memoized'') so that if it is forced a second
time, the previously computed value is returned.

\begin{scheme}
(force (delay (+ 1 2)))   \ev  3
(let ((p (delay (+ 1 2))))
  (list (force p) (force p)))
                               \ev  (3 3)

(define a-stream
  (letrec ((next
            (lambda (n)
              (cons n (delay (next (+ n 1)))))))
    (next 0)))
(define head car)
(define tail
  (lambda (stream) (force (cdr stream))))

(head (tail (tail a-stream)))
                               \ev  2%
\end{scheme}

Promises are mainly intended for programs written in
functional style.  The following examples should not be considered to
illustrate good programming style, but they illustrate the property that
only one value is computed for a promise, no matter how many times it is
forced.

\begin{scheme}
(define count 0)
(define p
  (delay (begin (set! count (+ count 1))
                (if (> count x)
                    count
                    (force p)))))
(define x 5)
p                     \ev  {\it{}a promise}
(force p)             \ev  6
p                     \ev  {\it{}a promise, still}
(begin (set! x 10)
       (force p))     \ev  6%
\end{scheme}

Here is a possible implementation of {\cf delay} and {\cf force}.
Promises are implemented here as procedures of no arguments,
and {\cf force} simply calls its argument:

\begin{scheme}
(define force
  (lambda (object)
    (object)))%
\end{scheme}

The expression

\begin{scheme}
(delay \hyper{expression})%
\end{scheme}

has the same meaning as the procedure call

\begin{scheme}
(make-promise (lambda () \hyper{expression}))%
\end{scheme}

as follows

\begin{scheme}
(define-syntax delay
  (syntax-rules ()
    ((delay expression)
     (make-promise (lambda () expression))))),%
\end{scheme}

where {\cf make-promise} is defined as follows:

\begin{scheme}
(define make-promise
  (lambda (proc)
    (let ((result-ready? \schfalse)
          (result \schfalse))
      (lambda ()
        (if result-ready?
            result
            (let ((x (proc)))
              (if result-ready?
                  result
                  (begin (set! result-ready? \schtrue)
                         (set! result x)
                         result))))))))%
\end{scheme}
\end{entry}

\begin{entry}{%
\proto{null-environment}{ n}{procedure}}

\domain{\var{N} must be the exact integer object 5.}  The {\cf
  null-environment} procedure returns an
environment specifier suitable for use with {\cf eval} (see
chapter~\ref{evalchapter}) representing an environment that is empty except
for the (syntactic) bindings for all keywords described in
the previous revision of this report~\cite{R5RS}, including bindings
for {\cf =>}, {\cf ...}, {\cf else}, and {\cf\_} that are the same as those in
the \rsixlibrary{base} library.
\end{entry}

\begin{entry}{%
\proto{scheme-report-environment}{ n}{procedure}}

\domain{\var{N} must be the exact integer object 5.}  The {\cf scheme-report-environment} procedure returns
an environment specifier for an environment that is empty except for
the bindings for the identifiers described in the previous
revision of this report~\cite{R5RS}, omitting {\cf load}, {\cf
  interaction-environment}, {\cf
  transcript-on}, {\cf transcript-off}, and {\cf char-ready?}.  The
variable bindings have as values the procedures of the same names described in
this report, and the keyword bindings, including
{\cf =>}, {\cf ...}, {\cf else}, and {\cf\_} are the same as those described
in this report.
\end{entry}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "r6rs-lib"
%%% End: