diff --git "a/samples/texts_merged/1259736.md" "b/samples/texts_merged/1259736.md"
new file mode 100644--- /dev/null
+++ "b/samples/texts_merged/1259736.md"
@@ -0,0 +1,5037 @@
+
+---PAGE_BREAK---
+
+Astronomy Unit
+
+School of Physics and Astronomy
+
+Queen Mary, University of London
+
+# Applications of Cosmological Perturbation Theory in the Late Universe
+
+Jorge Luis Fuentes Venegas
+
+Supervised by Karim A Malik and Timothy Clifton
+
+Submitted in partial fulfillment of the requirements of the Degree of
+Doctor of Philosophy
+---PAGE_BREAK---
+
+Declaration
+
+I, Jorge Luis Fuentes Venegas, confirm that the research included within this the-
+sis is my own work or that where it has been carried out in collaboration with,
+or supported by others, that this is duly acknowledged below and my contribution
+indicated. Previously published material is also acknowledged below.
+
+I attest that I have exercised reasonable care to ensure that the work is original, and
+does not to the best of my knowledge break any UK law, infringe any third party's
+copyright or other Intellectual Property Right, or contain any confidential material.
+
+I accept that the College has the right to use plagiarism detection software to check
+the electronic version of the thesis.
+
+I confirm that this thesis has not been previously submitted for the award of a
+degree by this or any other university. The copyright of this thesis rests with the
+author and no quotation from it or information derived from it may be published
+without the prior written consent of the author.
+
+Details of collaboration and publications:
+
+* Gravitational waves in a flat radiation-matter universe including anisotropic stress
+ Andrew J. Wren, Jorge L. Fuentes and Karim A. Malik
+ e-Print: 1712.10012 [gr-qc]
+
+* Linear cosmological perturbations in almost scale-invariant fourth-order gravity
+ Jorge L. Fuentes, Usman A. Gillani and Karim A. Malik
+ e-Print: 1812.00938 [gr-qc]
+
+• Galaxy number counts at second order: an independent approach
+
+Jorge L. Fuentes, Juan Carlos Hidalgo and Karim A. Malik
+
+Published in: Class.Quant.Grav. 38 (2021) 6, 065014
+
+e-Print: 1908.08400 [astro-ph.CO]
+---PAGE_BREAK---
+
+* Galaxy number counts at second order in perturbation theory:
+a leading-order term comparison
+
+Jorge L. Fuentes, Juan Carlos Hidalgo and Karim A. Malik
+e-Print: 2012.15326 [astro-ph.CO]
+
+Signature: Jorge Luis Fuentes Venegas
+
+Date: 17/07/2020
+---PAGE_BREAK---
+
+Abstract
+
+In this thesis, we discuss some of the applications of cosmological perturbation
+theory in the late universe. We begin by reviewing the tools used to understand
+the standard model of cosmology theoretically and to compute its observational
+consequences, including a detailed exposition of cosmological perturbation theory.
+We then describe the results in this thesis; we present novel analytical solutions
+for linear-order gravitational waves or tensor perturbations in a flat Friedmann-
+Robertson-Walker universe containing two perfect fluids –radiation and pressureless
+dust– and allowing for neutrino anisotropic stress. One of the results applies to any
+sub-horizon gravitational wave in such a universe. Another result applies to gravita-
+tional waves of primordial origin (for example, produced during inflation) and works
+both before and after they cross the horizon. These results improve on analytical
+approximations previously set out in the literature. Comparison with numerical so-
+lutions shows that both these approximations are accurate to within 1% or better,
+for a wide range of wave-numbers relevant for cosmology. We present a new and
+independent approach to computing the relativistic galaxy number counts to second
+order in cosmological perturbation theory. We also derive analytical expressions for
+the full second-order relativistic observed redshift, for the angular diameter distance
+and the volume spanned by a survey. We then compare our result with previous
+works which compute the general distance-redshift relation, finding that our result
+is in agreement at linear and leading nonlinear order. Lastly, we briefly study a
+class of almost scale-invariant Gauss-Bonnet modified gravity theory and derive the
+Einstein-like field equations to first order in cosmological perturbation theory in
+longitudinal gauge.
+---PAGE_BREAK---
+
+# Acknowledgements
+
+I would like to thank my supervisor Karim MALIK for his guidance and his patience, and express my gratitude to Juan Carlos HIDALGO for all his help with this work.
+
+I must also thank the Cosmology Group for all the constant inspiration and useful discussions.
+
+I want to thank all my fellow PhD students, former and present, for making the PhD life more bearable and making the Astronomy Unit great again. I would particularly like to thank my friend Pedro CARRILHO for all his guidance and help since the very beginning. I also want to thank former Cosmology Group members Charalambos PITTORDIS, Shailee IMRITH, Viraj SANGHAI, and John RONAYNE for great insights on what being a cosmology PhD student is. I also want to thank Domenico TROTTA for his friendship and support through the years, and I additionally would like to thank my fellow fourth year colleagues Christopher GALLAGHER, Jack SKINNER, Louis COATES, Sanson POON, Clark BAKER, and Sandy SHAOSHAN ZENG; we made it!
+
+Additionally I would like to thank Rebeca CARRILLO, Paula SOARES, Alice GIROUL, Jesse COBURN, Eline DE WEERD, Francesco LOVASCIO, Jessie DURK, George TURPIN, Julian ADAMEK, Fraser KENNEDY, Gavin COLEMAN, Maritza SOTO, Joe HAYLING, Eddie THORPE, Zoltán LACZKÓ, Antony FREY, Steve CUNNINGTON, Miguel QUETZERI, Anna TOLMARSH, Alex UMEDA-PELLING, Jasmin KÖHNKEN-SAWALL, William MEGONE, Matt DIBBLE, Nelson CANO, Nicole HUDGINS, Adrien YCARD, and Gemma MUNDAY for the good times, pints and all the football and rugby matches.
+
+I would particularly like to thank Massissilia HAMADOUCHE for reading through this thesis and helping to get rid of typos and small idiomatic errors.
+
+I would like to thank my long-time friends Eduardo SERNA, Germán RAMÍREZ, Oscar SALMERÓN, Andrés ARROYO, Roberto TAPIA, Mariano RENTERÍA, Aarón BECERRA, David RANGEL, Leonardo RAMÍREZ, and Hugo TREJO for their continued friendship, even living in different countries.
+
+I would not be here without my parents Jorge and Mónica, whose support and love helped me go through it all. I also want to extend my gratitude to my sisters Carolina and Mónica for believing in me.
+
+I acknowledge financial support from a Queen Mary University of London Studentship and the Consejo Nacional de Ciencia y Tecnología (CONACYT) grant No. 603085 from 2016 to 2020.
+---PAGE_BREAK---
+
+# Contents
+
+
| Abstract | 4 |
| Acknowledgements | 5 |
| 1. Introduction | 9 |
| 2. Cosmological Perturbation Theory | 19 |
| 2.1. Introduction | 19 |
| 2.2. Relativistic perturbation theory | 21 |
| 2.2.1. General relativity | 21 |
| 2.2.2. Perturbed spacetime | 26 |
| 2.3. Perturbations in Friedmann-Lemaître-Robertson-Walker | 30 |
| 2.3.1. Background | 31 |
| 2.3.2. Gauges. | 32 |
| 2.3.3. Matter velocity field and peculiar velocities. | 35 |
| 2.3.4. Evolution equations. | 36 |
| 3. Gravitational waves in a flat radiation-matter universe | 39 |
| 3.1. Introduction. | 39 |
| 3.2. Linear tensor perturbations | 41 |
| 3.3. Governing equations | 44 |
| 3.3.1. Perfect fluid. | 44 |
| 3.3.2. Including anisotropic stress | 46 |
| 3.4. Analytical solutions for the tensor perturbations. | 48 |
| 3.4.1. Approximating perfect fluid tensor perturbations | 48 |
| 3.4.2. Approximating tensor perturbations with anisotropic stress. | 52 |
| 3.5. Modelling primordial gravitational waves. | 53 |
| 3.6. Conclusion. | 58 |
| 4. Galaxy Number Counts | 60 |
| 4.1. Introduction. | 60 |
| 4.2. Basics for the definition of the galaxy number density. | 62 |
| 4.2.1. Photon wavevector. | 62 |
| 4.2.2. Observed redshift. | 64 |
| 4.2.3. Angular diameter distance. | 64 |
| 4.2.4. Physical Volume. | 64 |
| 4.3. Perturbed null geodesics and redshift. | 67 |
| 4.3.1. Geodesic equation. | 67 |
| 4.3.2. Observed redshift. | 68 |
+---PAGE_BREAK---
+
+Contents
+
+
+
+
+ | 4.4. |
+ Distance determinations and the observed volume |
+ 71 |
+
+
+ | 4.4.1. |
+ Angular Diameter Distance |
+ 71 |
+
+
+ | 4.4.2. |
+ Area distance as a function of observed redshift |
+ 76 |
+
+
+ | 4.4.3. |
+ Physical Volume |
+ 80 |
+
+
+ | 4.5. |
+ Galaxy number density |
+ 82 |
+
+
+ | 4.6. |
+ Comparison with previous work |
+ 88 |
+
+
+ | 4.6.1. |
+ Di Dio, et al. |
+ 88 |
+
+
+ | 4.6.2. |
+ Bertacca, et al. |
+ 89 |
+
+
+ | 4.6.3. |
+ Yoo & Zaldarriaga |
+ 90 |
+
+
+ | 4.7. |
+ Second order comparison with literature |
+ 91 |
+
+
+ | 4.7.1. |
+ Introduction |
+ 91 |
+
+
+ | 4.7.2. |
+ Dominant terms at second order |
+ 92 |
+
+
+ | 4.7.3. |
+ Comparison with Di Dio, et al. |
+ 93 |
+
+
+ | 4.7.4. |
+ Comparison with Bertacca, et al. |
+ 95 |
+
+
+ | 4.7.5. |
+ Comparison with Yoo and Zaldarriaga |
+ 96 |
+
+
+ | 4.8. |
+ Discussion |
+ 97 |
+
+
+ | 5. |
+ Conclusions and Outlook |
+ 99 |
+
+
+ | A. |
+ Matching conditions and anisotropic stress calculations |
+ 103 |
+
+
+ | A.1. |
+ Calculation of the matching conditions for approximating primordial gravitational waves |
+ 103 |
+
+
+ | A.2. |
+ Calculation of the anisotropic stress solution |
+ 105 |
+
+
+ | B. |
+ Perturbed quantities to second order |
+ 107 |
+
+
+ | B.1. |
+ Connection coefficients |
+ 107 |
+
+
+ | B.2. |
+ Perturbed Ricci Tensor $R_{\mu\nu}$ |
+ 108 |
+
+
+ | B.3. |
+ Second order quantities in terms of the metric potentials |
+ 109 |
+
+
+ | B.3.1. |
+ Geodesic Equation |
+ 109 |
+
+
+ | B.3.2. |
+ Energy |
+ 111 |
+
+
+ | B.3.3. |
+ Observed redshift |
+ 111 |
+
+
+ | B.3.4. |
+ Angular diameter distance |
+ 113 |
+
+
+ | B.3.5. |
+ Physical volume |
+ 118 |
+
+
+ | B.3.6. |
+ Redshift density |
+ 120 |
+
+
+ | C. |
+ Modified Gauss-Bonnet |
+ 121 |
+
+
+ | C.1. |
+ Introduction |
+ 121 |
+
+
+ | C.2. |
+ Governing equations |
+ 122 |
+
+
+ | C.2.1. |
+ Background |
+ 124 |
+
+
+ | C.3. |
+ Perturbed governing equations |
+ 125 |
+
+
+ | C.3.1. |
+ Scalar perturbations |
+ 126 |
+
+
+ | C.4. |
+ Einstein-like tensor |
+ 131 |
+
+
+ | C.5. |
+ Evolution equations |
+ 134 |
+
+
+ | C.5.1. |
+ Discussion and Future Work |
+ 138 |
+
+
+ | Bibliography |
+ 139
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+---PAGE_BREAK---
+
+*Contents*
+
+List of Figures
+
+148
+---PAGE_BREAK---
+
+# 1. Introduction
+
+In recent years technology has advanced at a rapid pace, giving scientists the computational power to test theoretical and analytical solutions for specific cosmological models through simulations, perform state of the art experiments and undertake new observations to answer long standing questions in cosmology.
+
+A good example of a theoretical model that is particularly useful in cosmology is Albert Einstein's theory of gravity which was proposed in 1905. It passed several tests through observations like the anomalous perihelion shift in the orbit of Mercury, which had been seen using Newtonian gravity but was measured with outstanding accuracy with relativity between 1966 and 1990 using radio telescopes.
+
+According to general relativity, light does not travel along straight lines when it propagates in a gravitational field. Instead, it is deflected in the presence of massive bodies. In particular, the light from a star is deflected as it passes near the Sun, leading to apparent shifts of up 1.75 arc seconds in the stars' positions in the sky (an arc second is equal to $1/3600$ of a degree). In the framework of Newtonian gravity, a heuristic argument can be made that leads to light deflection by half that amount. The different predictions can be tested by observing stars that are close to the Sun during a solar eclipse. In this way, a British expedition to West Africa in 1919, directed by Arthur Eddington, confirmed that Einstein's prediction was correct, and the Newtonian predictions wrong, via observation of the May 1919 eclipse. Eddington's results were not very accurate; subsequent observations of the deflection of the light of distant quasars by the Sun, which utilise highly accurate techniques of radio astronomy, have confirmed Eddington's results with significantly better precision.
+
+Another prediction of general relativity, the gravitational redshift was first measured in a laboratory setting in 1959 by Pound and Rebka. It is also seen in astrophysical measurements, notably for light escaping the white dwarf Sirius B. The related gravitational time dilation effect has been measured by transporting atomic clocks to altitudes of between tens and tens of thousands of kilometres.
+
+General relativity had passed plenty of tests through observations but one; it predicted the existence of a gravitational counterpart to electromagnetic waves, namely,
+---PAGE_BREAK---
+
+gravitational waves, remaining undetected through direct means until 2015. Gravitational waves are 'ripples' in space-time caused by some of the most violent and energetic processes in the Universe. These cosmic ripples travel at the speed of light, carrying with them information about their origins, as well as clues to the nature of gravity itself.
+
+Indirect detection of gravitational waves had been made, through energy and angular momentum measured from binary stars orbiting each other, a good example is the Hulse-Taylor pulsar, whose orbit has decayed since the binary system was initially discovered, in precise agreement with the loss of energy due to gravitational waves described in general relativity; but no direct detection was made until September 2015.
+
+On 11 February 2016, the Laser Interferometer Gravitational-Wave Observatory¹ (LIGO)[1] announced the detection of GW150914, a gravitational wave signal coming from a binary blackhole collision demonstrating that Einstein's theory appears to withstand the passage of time.
+
+The Theory of General Relativity (GR), relates the amount of matter (or energy) in the universe to the geometry of space, meaning that one affects the other. Matter tells the universe how to curve and the geometry of space tells matter how to move [2]. Precise experiments such as LIGO demonstrate that a metric theory such as GR is currently the best description for our universe.
+
+Other than GR, there are many other theories that aim to describe the state of the
+universe by modifying gravity. The idea of modifying gravity on cosmological scales
+has really taken off over the past decades triggered by theoretical developments in-
+volving higher dimensional theories, as well as new developments in constructing
+renormalizable theories of gravity. More phenomenologically, Bekenstein's relativis-
+tic formulation of Milgrom's Modified Newtonian Dynamics (MoND) has provided
+a fresh impetus for new study: what was a rule of thumb for how weak gravitational
+fields might behave in regions of low acceleration, was suddenly elevated to a theory
+that could be used to study cosmology. Insights such as Bertschinger's realisation
+that large-scale perturbations in the universe can be directly related to the overall
+expansion rate have also made it possible to characterise large classes of theories
+simply in terms of how they make the universe evolve. Finally, there has been
+tremendous progress observationally. A key step here has been the measurement of
+the growth of structure at higher redshifts, by Guzzo and his collaborators [3].
+
+Along with MoND [4, 5] there are extensions to GR such as $f(R)$ which work
+
+¹www.ligo.caltech.edu
+---PAGE_BREAK---
+
+# 1. Introduction
+
+by adding functions to the action that describes the theory. Effective field theory descriptions of the universe also exist, Horndeski's theory being a popular example [3, 6]. Horndeski's theory is the most general theory of gravity in four dimensions whose Lagrangian is constructed out of the metric tensor and a scalar field and leads to second order equations of motion. The theory was first proposed by Gregory Horndeski in 1974 [7] and has found numerous applications, particularly in the construction of cosmological models of Inflation and dark energy [3]. Horndeski's theory contains many theories of gravity, including General relativity, Brans-Dicke theory, Quintessence, Dilaton, Chameleon and covariant Galileon [8] as special cases.
+
+In this thesis we mostly use the GR description of the universe, and in Appendix C we explore one modified theory of gravity called Gauss-Bonnet gravity, which has been a topic of discussion at the time of writing this thesis [9, 10].
+
+The progress of technology does not end with probing GR predictions, as it also has helped cosmologists to measure cosmological parameters to unprecedented precision. At the present time the Sloan Digital Sky Survey² (SDSS) is creating the most detailed three dimensional map of the universe ever made, with deep multi-colour images, and spectra for more than three million astronomical objects.
+
+With easily accessible data, SDSS has created an era of Big Data for cosmology, where at the moment there is so much data that it would take years for the quarter-million Milky Way stars' spectra to be processed, and there will even be more with SDSS-IV running now (2020) with its final data release scheduled for July 2021 and SDSS-V starting in summer 2020, with its first data release expected two years later.
+
+One of the ongoing surveys within SDSS is the Extended Baryon Oscillation Spectroscopic Survey (eBOSS), which combined with previous phases of SDSS, precisely measures the expansion history of the universe throughout eighty percent of cosmic history, back to when the universe was less than three billion years old. It is providing improving constraints on the nature of “Dark Energy”, the observed phenomenon that the expansion of the universe is currently accelerating.
+
+*Dark energy* is an unknown form of energy that affects the universe on the largest scales. The first observational evidence for its existence came from supernovae measurements, which showed that the universe does not expand at a constant rate; rather, the expansion of the universe is accelerating [11]. Understanding the evolution of the universe requires knowledge of its starting conditions and its composition. Prior to these observations, the only forms of matter-energy known to exist were ordinary matter, dark matter, and radiation. Measurements of the cosmic microwave
+
+²https://www.sdss.org/
+---PAGE_BREAK---
+
+background suggest the universe began in a hot Big Bang, from which general rel-
+ativity explains its evolution and the subsequent large scale motion. Without in-
+troducing a new form of energy, there was no way to explain how an accelerating
+universe could be measured. Since the 1990s, dark energy has been the most ac-
+cepted premise to account for the accelerated expansion. Two proposed forms of
+dark energy are the cosmological constant [12], representing a constant energy den-
+sity filling space homogeneously, and scalar fields such as quintessence or moduli,
+dynamic quantities having energy densities that can vary in time and space. Con-
+tributions from scalar fields that are constant in space are usually also included in
+the cosmological constant.
+
+As a small scale example, another ongoing survey is the Apache Point Observatory Galactic Evolution Experiment (APOGEE-2) that observes the “archeological” record embedded in hundreds of thousands of stars to explore the assembly history of the Milky Way Galaxy. The details as to how the galaxy evolved are preserved today in the motions and chemical compositions of its stars.
+
+Some of the other surveys that complement SDSS are Mapping Nearby Galaxies at APO (MaNGA), the Multi-object APO Radial Velocity Exoplanet Large-area Survey (MARVELS) and Sloan Extension for Galactic Understanding and Exploration (SEGUE).
+
+Along with these ongoing surveys, there are several future experiments that will help cosmologists look further into the past and into the unknown, tightening known constraints and finding interesting new answers as well as questions for generations of new scientists. One of these future surveys is Euclid³, an European Space Agency (ESA) satellite to map the geometry of the universe and better understand the mysteries of dark energy and dark matter, which make up most of the energy budget of the cosmos. This mission will investigate the distance-redshift relationship and the evolution of cosmic structures by measuring shapes and redshifts of galaxies and clusters out to redshift ~ 2, or equivalently to look back in time 10 billion years. In this way, Euclid will cover the entire period over which dark energy played a significant role in accelerating the expansion of the universe [13]. Its launch is planned for 2022.
+
+Scheduled to begin in October 2022, the Vera C. Rubin Observatory is to conduct the 10-year Legacy Survey of Space and Time⁴ (LSST), previously known simply as the Large Synoptic Survey Telescope [14]. LSST will deliver a 500 petabyte⁵ set
+
+³www.euclid-ec.org
+
+⁴www.lsst.org
+
+⁵A petabyte is a measure of memory or data storage capacity that is equal to $2^{50}$ of bytes. There
+---PAGE_BREAK---
+
+# 1. Introduction
+
+of images and data products that will address some of the most pressing questions about the structure and evolution of the universe and the objects in it, such as understanding dark matter and dark energy, hazardous asteroids and the remote Solar System, the Transient Optical Sky and the formation and structure of the Milky Way galaxy. Due to the amount of data it will be generating (20 terabytes each night), its software is one of the most challenging aspects of the Rubin Observatory.
+
+A different kind of observatory that will be completed in the near future; the Square Kilometre Array⁶ (SKA) [15], which is an international effort to build the world's largest radio telescope, with eventually over a square kilometre of collecting area. The SKA will be able to conduct ground breaking discoveries in astronomical observations. From challenging Einstein's seminal theory of relativity to the limits using pulsars to test general relativity in extreme conditions, for example, close to black holes. It will explore the very first stars and galaxies formed just after the Big Bang, with a precision that have not been accomplished before, helping scientists understand the nature of dark energy. The SKA's is different to previous experiments of its kind due to the resolution it can accomplish. The SKA's sensitivity stems from the huge number of radio receivers at low, mid and high frequencies, which will combine in each frequency range from the locations in Africa and Australia to form a collecting area equivalent to a single radio telescope one kilometre wide, as mentioned above. The combined factors of sensitivity and resolution will dwarf all existing telescopes currently in operation, and give the SKA unparalleled view of the early formation of the universe. Early science observations are expected to start in the mid-2020s with a partial array.
+
+These surveys have a major factor in common, which is that they all depend on very well developed technology, that has made the era of precision cosmology possible. However, lest we forget that most of these experiments are, in essence, trying to falsify a theory or model of the universe by explaining observations with mathematical tools. One of these tools that is exceptionally useful today as it has been since the 19th century (when it was developed) is perturbation theory. In particular, perturbation theory allows us in principle to deduce from observations the power spectrum of the curvature perturbation at Hubble-exit during two-field slow-roll inflation, in single field inflation, observations directly constrain the tensor to scalar ratio ($r$) and from perturbation theory, we can then compute the slow-roll parameter $\epsilon$. Lastly, another application for perturbation theory directly connected with observations would be the non-linear evolution and non-Gaussianity using the
+
+are 1024 terabytes (TB) in a petabyte – or 1 million gigabytes (GB).
+
+⁶www.skatelescope.org
+---PAGE_BREAK---
+
+primordial curvature perturbation $\zeta$.
+
+Perturbation theory was first devised to solve otherwise intractable problems in the calculation of the motion of planets in the solar system. For example, Newton's law of universal gravitation explained the gravitation between two astronomical bodies, but when a third body is added, the problem becomes much harder to analyse. Like today, the increase in precision in astronomical observations led to the need for more accurate solutions to Newton's gravitational equations. Lagrange and Laplace extended and generalised the solutions with the use of the first methods of perturbation theory, and these well developed methods were then adopted and adapted to solve new problems from quantum mechanics and subatomic physics to large scale structure in cosmology.
+
+In physical cosmology, cosmological perturbation theory (CPT) is used to study the evolution of structure. It uses GR to compute the gravitational forces causing small perturbations to grow and eventually seed the formation of structures like stars, galaxies and clusters. It is useful in situations in which the universe is predominantly homogenous, such as cosmic inflation and large parts of the Big Bang. Since the universe is believed to be homogeneous, CPT is a good approximation on the largest scales. On smaller scales, the power of CPT may be suppressed and other techniques may be needed, such as N-body simulations. The formulation of CPT can be subtle, so we follow the approach of Ref. [16] throughout this thesis. We will discuss perturbation theory and its applications in detail in Chapter 2.
+
+Cosmological perturbation theory is widely used within the scientific community and, similar to the situation with Newton's gravitational equations, more precision is needed in these solutions to keep up with the advances being made with the ongoing and upcoming surveys. Previously mentioned experiments such as eBOSS, Euclid and LSST will be able to measure cosmological parameters up to a percentage level (~0.01%), and an analytical counterpart is needed to explain and model the observations, hence the need for higher order perturbation theory.
+
+Higher order perturbation theory can be used to explain slight perturbations on top of existing ones, modelling nonlinearities with precision that could not be modelled before using simple linear perturbation theory, making the computation of cosmological observables such as the bispectrum possible.
+
+Since perturbation theory is very powerful, we make use of it to solve Einstein equations and in cosmology, this helps us to constrain theoretically models of the universe. One of these models is the concordance ΛCDM model, which is a parametrisation of the Big Bang and contains three major components: first, the cosmological constant denoted by the greek letter Lambda (Λ) normally associated with dark en-
+---PAGE_BREAK---
+
+1. Introduction
+
+ergy; second, the postulated cold dark matter (CDM); and third, ordinary matter. It
+is frequently referred to as the *standard model* of cosmology because it is the simplest
+and most widely used model that provides a reasonably good account of the prop-
+erties of the universe. The existence of the cosmic microwave background (CMB),
+the large scale structure in the distribution of galaxies, the observed abundances
+of hydrogen, helium and lithium and the accelerating expansion of the universe, all
+contribute to the acceptance of the model. This model appeared in the late 1990s,
+and up until today, it is the most accepted model of cosmology there is.
+
+Within the standard model there are several parameters normally divided into three categories. The first one being *independent parameters*, which are mostly not predicted by current theory; the parameter values and uncertainties are estimated using large computer searches to locate the region of parameter space providing an acceptable match to cosmological observations. These parameters are comprised of the physical baryon density parameter ($\Omega_b h^2$), the physical dark matter density parameter ($\Omega_c h^2$), the age of the universe ($\sim 14 \times 10^9$ years), the scalar spectral index ($n_s$), the curvature perturbation amplitude ($k_0 \sim 0.002 \text{Mpc}^{-1}$, $\Delta_R^2$) and the reionisation optical depth ($\tau$).
+
+Other parameters are the fixed at “natural” values, e.g. total density parameter is equal to one. The *fixed parameters* are the total density parameter ($\Omega_{tot}$), the equation of state of dark energy ($w$), the tensor to scalar ratio ($r$), the running of the spectral index, the sum of three neutrino masses and the effective number of relativistic degrees of freedom ($N_{eff}$). In the literature, from time to time the temperature of the CMB photons can be taken as a fixed parameter, although it is tightly constrained it can be taken as a fixed parameter in say, the $\lambda$-CDM model. The same happens with the motion of the solar system with respect to the CMB, which establishes the class of comoving observers.
+
+The last group are the *calculated values*; the Hubble constant ($H_0$), the baryon density parameter ($\Omega_b$), the dark matter density parameter ($\Omega_c$), the matter density parameter ($\Omega_m$), the dark energy parameter ($\Omega_\Lambda$), the critical density ($\rho_{crit}$), the present root-mean-square matter fluctuation averaged over a sphere of radius $8h^{-1}$ Mpc ($\sigma_8$), the redshift at decoupling ($z_*$), the age of the universe at decoupling ($t_*$) and the redshift of reionisation ($z_{re}$).
+
+The parameters of this model have been determined to great precision. That
+which enables this determination is that a modern-day cosmological observation
+typically maps out the distribution of an observable quantity (e.g., temperature and
+polarisation of the CMB, photons, the number density of galaxies and clusters, etc.)
+as a function of redshift and/or angular position in the sky. To extract any mean-
+---PAGE_BREAK---
+
+# 1. Introduction
+
+ingful information about the universe from this data, we require a set of free model parameters associated with the cosmological model and a theoretical framework to compute and predict the observable quantities given.
+
+Observables are given as a function of redshift, and in CPT some of the widely studied observables are Redshift Space Distortions (RSD) [17–21], which are an effect where the spatial distribution of galaxies appears to be squashed and distorted when their positions are plotted as a function of their redshift. This effect is due to the peculiar velocities of the galaxies causing a Doppler shift in addition to the redshift caused by the expansion of the universe. RSD manifest in two particular ways; the “Fingers of God” effect, where the galaxy distribution appears to be elongated pointing towards the observer, and the “Kaiser effect”, in which the galaxy distribution appears to flatten, though this effect is much smaller than the fingers of God effect and can be distinguished by the fact that it occurs on larger scales.
+
+Other observational effects include gravitational lensing [22]. Predicted by Einstein's general theory of relativity, the effect consists of having a light source, a massive object and an observer. If they all lie in a straight line, the light will be deflected by the massive object and the source will appear as a ring around the massive lensing object to the observer. Other lensing effects include multiple distorted images of the same source around the massive lens, e.g. roulettes [23]. There are three classes of gravitational lensing: strong lensing (Einstein rings, arcs and multiple images), weak lensing (stretching of the background perpendicular to the direction to the centre of the lens) and microlensing (no distortion in shape can be seen but the amount of light received from the source object changes in time). It was not until 1979 that this effect was confirmed by observations [24].
+
+Two of the most widely studied observables in the literature are the Sachs-Wolfe effect and the Integrated Sachs-Wolfe (ISW) [25–27], named after Rainer K. Sachs and Arthur M. Wolfe, these effects are a property of the CMB, in which photons from the CMB are gravitationally redshifted, causing the CMB spectrum to appear uneven. This effect is the predominant source of fluctuations in the CMB for angular scales above about ten degrees. The non-integrated Sachs-Wolfe effect is caused by gravitational redshift occurring at the surface of last scattering⁷. The effect is not constant across the sky due to differences in the matter and energy density at the time of last scattering. The ISW is also caused by gravitational redshift, but it occurs between the surface of last scattering and Earth, and is not part of the primordial CMB.
+
+⁷Set of points in space at the right distance from us so that we are now receiving photons originally emitted from those points at the time of photon decoupling.
+---PAGE_BREAK---
+
+# 1. Introduction
+
+An observable which has been of particular interest to study using cosmological perturbation theory is the galaxy number count. This observable is of crucial importance recently due to it being one of the main observables in the upcoming surveys. Galaxy surveys measure the number of galaxies per unit of solid angle in redshift bins, and this is precisely the galaxy number count. Refs. [28–30] have computed this at linear order, but the high precision of the future galaxy surveys makes higher order perturbation theory absolutely necessary.
+
+Nonlinearities arise when working at higher orders in cosmological perturbation theory and the complicated calculations and length of the resulting description of observables makes this a highly demanding and laborious task. Various attempts have been made to compute the galaxy number counts at second [31–37] and at third order [38], finding new relativistic corrections to known effects such as the Sachs-Wolfe, ISW and RSD, as well as other effects that arise from the combination of such and sourcing coming from previously neglected potentials.
+
+The lengthy results have made the different groups question whether or not their results match each other, and there have been attempts to compute the difference between different descriptions of the same observable, but only for the dominating terms, not the full expressions [39].
+
+Starting from first principles, as given by Einstein's theory and clearly explained in Refs. [2, 40], the theory of null geodesics [41], and the computational power of xPand [42–44] is required to perform the perturbations needed to compute an expansion of the galaxy number counts up to second order in perturbation theory. We present a general result for the galaxy number counts in terms of the affine parameter of the geodesic equation that can be then compared to previous works.
+
+In order to do this, we use techniques ranging from differential geometry to perturbation theory, passing through numerical methods and the analysis of analytical descriptions of observables. We start by describing cosmological perturbation theory in chapter 2, since it is essential for the understanding of the concordance model. This technique is indeed crucial to solving the differential equations of General Relativity, as a completely non-perturbative formulation is still far from reach by even the most powerful computers available. We show these solutions, since they will be necessary for the rest of the thesis.
+
+In chapter 3, we use these solutions and consider gravitational waves with sufficiently small amplitudes to be modelled as linear tensor perturbations travelling through a Friedmann-Lemaître-Robertson-Walker (FLRW) universe filled with radiation and matter, allowing for a source term due to neutrino anisotropic stress.
+
+In chapter 4, we study the galaxy number counts observable, and all the differ-
+---PAGE_BREAK---
+
+# 1. Introduction
+
+ent observable contributions, from redshift, to the relation between luminosity and angular diameter distance, and the geometric description of the geodesic deviation equations, the physical volume and the energy that take part in the full expansion of the observable. This chapter is where the most intensive research that was completed is presented. Most of the second order quantities are left in the appendices so the text is easier to read, but the main results have been left in the main body.
+
+Finally, in chapter 5 we discuss the conclusions reached in this thesis and point towards future research and work.
+---PAGE_BREAK---
+
+# 2. Cosmological Perturbation Theory
+
+## 2.1. Introduction
+
+Perturbation theory is a widely used technique in physics [16]. It helps to simplify equations and calculations and to study problems which would otherwise be impossible to solve. In order for perturbation theory to work, it requires the existence of a small quantity around which all the analysis is made and, in a first approximation, may be neglected. These quantities may be parameters of the theory or dynamical variables, like in cosmology, thus, cosmological perturbation theory (CPT). In general, one starts by expanding a quantity into a homogeneous background and an inhomogeneous perturbation
+
+$$T(x^\mu) = T^{(0)}(x^0) + \delta T(x^\mu). \quad (2.1)$$
+
+The background part is a time-dependent quantity, $T^{(0)} \equiv T^{(0)}(x^0)$, whereas the perturbations depend on time and space coordinates $x^\mu = [x^0, x^i]$. The smallness of a dynamical variable studied in cosmology is often related to a small parameter $\epsilon$. In linear perturbation theory for example, we only consider first-order terms, $\epsilon^1$, and can neglect the product of two perturbations, which in turn would be of order $\epsilon^2$ or higher. We can continue this until an $n$-th order is reached, as desired. The perturbation can be further expanded as a power series in the smallness parameter $\epsilon$,
+
+$$\delta T(x^0, x^i) = \sum_{n=1}^{\infty} \frac{\epsilon^n}{n!} \delta T^{(n)}(x^0, x^i), \quad (2.2)$$
+
+in which we use the conventional factor $1/n!$ inspired by the Taylor expansion and defined the notation $\delta T^{(n)}$ to distinguish between the perturbations of order $n$ and the background part variable, $T^{(0)}$ or $\bar{T}$. For some particular quantities the background part vanishes, but in general and in this thesis in particular, it does not vanish and it represents a solution of the system of equations under study in a
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+simple case where the problem allows an exact solution.
+
+Although useful, this technique does have its caveats. It works only if the desired level of accuracy “is only a small correction to the previous order non-zero variable”, meaning if the new correction to $\delta T^{(n)}$ is $\delta T^{(n+1)}$, then $\epsilon\delta T^{(n+1)} \ll \delta T^{(n)}$, for all values of $n$. If the small quantities under study are the dynamical variables themselves, this may not always be verified, as these variables may grow beyond the size which verifies the previous condition.
+
+One of the advantages of perturbation theory is that, in plenty of cases, it makes it possible to linearise a system of equations, thus simplifying it considerably. The first thing to do is to solve the background equations and to find $T^{(0)}$, then to solve the linearised system to find the solution $\delta T^{(1)}$, which should depend on the background solution. To find the next order solution, in this case $\delta T^{(2)}$, another linear equation needs to be solved, depending now on the first order term $\delta T^{(1)}$ for which we have a solution for already. This procedure, although time consuming, can be used to model more complicated phenomena that describe reality better. This can continue up to arbitrary orders to improve accuracy of the results to a desired level, as well as to study new effects not present at lower orders.
+
+In CPT we can run into the problem that our small quantities are the dynamical variables themselves, as mentioned above, but only when studying the late universe on small scales. On large scales or in the early universe, this problem does not usually occur, at least for the most common models. We assume perturbation theory is valid throughout this thesis.
+
+The study of perturbations in cosmology has been a case of study for a long time. The first studies were done by Lifshiftz in Refs. [45, 46] calculating the evolution of density perturbations at linear level –first order in perturbation theory. Another study by Tomita in Ref. [47] demonstrated the second order computation for the density evolution. One of the most cited and important works that set the foundation of the formalism for cosmological perturbations was done by Bardeen in Ref. [48], who defined the first gauge invariant perturbations, which now carry his name. Kodama and Sasaki generalised the gauge invariant formalism in Ref. [49], deriving the equations for different cosmological scenarios. Many works have contributed to the development of CPT. More information can be found in the reviews [50, 51].
+
+In this chapter we review cosmological perturbation theory. We present first the more general relativistic perturbation theory in Section 2.2 and then its application on the cosmological setting with a Friedmann-Lemaître-Robertson-Walker background in Section 2.3. This is so we can introduce the notation used in the rest of the thesis and the background necessary to understand the following chapters.
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+Many calculations shown in this chapter and in the rest of the thesis were performed using the *Mathematica*¹ package `xPand` [52], which is built into the tensor calculus package `xAct`² [42].
+
+## 2.2. Relativistic perturbation theory
+
+In the context of relativistic theories of gravity, relativistic perturbation theory is widely used to solve the nonlinear equations posed by the theory. It is particularly useful since it takes into account the fundamental symmetry of the theory in its formulation, and is therefore the correct perturbative treatment to study tensor fields on Riemannian manifolds. In this section we focus only on general relativity, however, most of the information presented is also valid in more general scenarios.
+
+### 2.2.1. General relativity
+
+The theory of general relativity (GR) was developed by Albert Einstein in 1915 and describes spacetime as a manifold with its curvature determined by the matter content present in the spacetime [2, 40]. It is based on Riemannian geometry and we will review some of its main points here.
+
+The fundamental dynamical variable in GR is the metric tensor, $g_{\mu\nu}$, which defines infinitesimal distances between points in spacetime
+
+$$ds^2 = g_{\mu\nu}dx^\mu dx^\nu. \qquad (2.3)$$
+
+The metric tensor is symmetric, invertible and we use the (-, +, +, +) convention for its signature [53]. The curvature of spacetime can be calculated from the metric tensor by defining the Levi-Civita connection, $\nabla_\mu$, which is a natural generalisation of the connection in the classical differential geometry of surfaces. We use the fundamental theorem of (pseudo-)Riemannian geometry, which states that on a (pseudo-)Riemannian manifold ($M, g$) there exists a unique symmetric connection which is compatible with the metric $g$. This connection is called the Levi-Civita connection, or *symmetric connection* [54], which means
+
+$$\Gamma^{\lambda}_{\mu\nu} = \Gamma^{\lambda}_{\nu\mu}, \qquad (2.4)$$
+
+¹www.xact.es/xPand
+
+²www.xact.es
+---PAGE_BREAK---
+
+and for $X^\alpha \in M$ it is given by
+
+$$\nabla_\mu X^\alpha = \partial_\mu X^\alpha + \Gamma^{\alpha}_{\mu\lambda} X^\lambda. \quad (2.5)$$
+
+Thus the curvature of spacetime compatible with the metric is related to the Riemann tensor given by
+
+$$R^{\alpha}_{\beta\mu\nu} = \Gamma^{\alpha}_{\beta\nu,\mu} - \Gamma^{\alpha}_{\beta\mu,\nu} + \Gamma^{\alpha}_{\mu\rho} \Gamma^{\rho}_{\beta\nu} - \Gamma^{\alpha}_{\nu\rho} \Gamma^{\rho}_{\beta\mu}, \quad (2.6)$$
+
+which has components determined by the Christoffel symbols
+
+$$\Gamma^{\alpha}_{\mu\nu} = \frac{1}{2} g^{\alpha\beta} (g_{\beta\mu, \nu} + g_{\beta\nu, \mu} - g_{\mu\nu, \beta}). \quad (2.7)$$
+
+The Ricci tensor, $R_{\mu\nu}$, and the Ricci scalar, $R$, are contractions of the Riemann curvature tensor
+
+$$R_{\mu\nu} = R^{\alpha}_{\mu\alpha\nu}, \qquad R = R^{\mu}_{\mu} = g^{\mu\nu} R_{\mu\nu}, \quad (2.8)$$
+
+and their combination defines the Einstein tensor by
+
+$$G_{\mu\nu} = R_{\mu\nu} - \frac{1}{2} R g_{\mu\nu}. \quad (2.9)$$
+
+There are at least three ways to compute the Einstein tensor from the Riemann tensor: (i) by successive contractions of the Riemann tensor, which is the one used in this thesis, and for completeness; (ii) by forming the dual of the Riemann tensor and then contracting,
+
+$$\mathcal{G}_{\alpha\beta}^{\gamma\lambda} \equiv (\ast R \ast)_{\alpha\beta}^{\gamma\lambda} = \epsilon_{\alpha\beta\mu\nu} R^{|\mu\nu|}_{|(\rho\sigma|} \epsilon^{\rho\sigma\gamma\lambda} = -\delta^{\lambda\rho\sigma}_{\beta\mu\nu} R^{|\mu\nu|}_{|(\rho\sigma|}, \quad (2.10)$$
+
+$$G_{\beta}^{\lambda} = \mathcal{G}_{\alpha\beta}^{\alpha\lambda}, \quad (2.11)$$
+
+where $\epsilon_{\alpha\beta\mu\nu}$ is the Levi-Civita symbol, and $(\ast X \ast)$ denotes the dual of $X$. The third (iii) consists of combining the equations obtained in method (ii) obtaining
+
+$$G_{\beta}^{\lambda} = G_{\beta}^{\alpha} = -\delta^{\lambda\rho\sigma}_{\beta\mu\nu} R^{|\mu\nu|}_{|(\rho\sigma|}, \quad (2.12)$$
+
+where
+
+$$\delta^{\lambda\rho\sigma}_{\beta\mu\nu} = \delta^{\lambda\rho\sigma}_{\beta\mu\nu} = \begin{cases} +1 & \text{if } \lambda\rho\sigma \text{ is an even permutation of } \beta\mu\nu, \\ -1 & \text{if } \lambda\rho\sigma \text{ is an odd permutation of } \beta\mu\nu, \\ 0 & \text{otherwise.} \end{cases} \quad (2.13)$$
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+The Einstein tensor is symmetric and has the important property of being divergence free, i.e. $\nabla_{\mu}G^{\mu\nu} = 0$ due to the Bianchi identities
+
+$$R^a_{\beta[\lambda\mu;\nu]} = 0. \qquad (2.14)$$
+
+This is the reason that the Einstein tensor is used in the Einstein field equations
+
+$$G_{\mu\nu} = 8\pi G T_{\mu\nu}, \qquad (2.15)$$
+
+where the constant $G$ is the Newtonian constant of gravity and we choose units for which the speed of light, $c$, is set to unity. Since the stress-energy tensor of matter, $T_{\mu\nu}$, must also be divergence-free to preserve local conservation of energy and momentum, it obeys
+
+$$\nabla_{\mu} T^{\mu\nu} = 0. \qquad (2.16)$$
+
+The field equations can also be derived from the action
+
+$$S = \int d^4x \sqrt{-g} \left[ \frac{R}{16\pi G} + \mathcal{L}_m \right], \qquad (2.17)$$
+
+where $g$ is the determinant of the metric, which defines an invariant volume measure and $\mathcal{L}_m$ is the matter Lagrangian. The first term of the action in Eq. (2.17) is the so-called Einstein-Hilbert action, and describes the gravitational dynamics. In the standard metric formulation of gravity, the Einstein equations are derived by varying this action with respect to the metric tensor. Other formulations exist, which give rise to the different equations in modified gravity like $f(R)$ or Gauss-Bonet theory, which is discussed in Appendix C. Both the Einstein-Hilbert action and the field equations are invariant under diffeomorphisms, which means this theory can be described by tensors, independently of the choice of coordinate system or basis. The fact that this symmetry exists is of extreme importance and has consequences in the development of a consistent perturbation theory, as we show in the next section.
+
+From the action, Eq. (2.17), it can be seen that the matter Lagrangian, $\mathcal{L}_m$, is related to the stress-energy tensor by,
+
+$$T_{\mu\nu} = -2 \frac{\delta \mathcal{L}_m}{g^{\mu\nu}} + g_{\mu\nu} \mathcal{L}_m. \qquad (2.18)$$
+
+The energy-momentum tensor of a fluid with density $\rho$, isotropic pressure $P$ can be decomposed by choosing a set of observers represented by a time-like unit vector
+---PAGE_BREAK---
+
+field, $u^\mu$, defined in the next section. The energy-momentum tensor is then defined as ([16, 41, 55])
+
+$$T_{\mu\nu} = (\rho + P) u_{\mu} u_{\nu} + P g_{\mu\nu} + q_{\mu} u_{\nu} + q_{\nu} u_{\mu} + \pi_{\mu\nu}. \quad (2.19)$$
+
+where the remaining variables are the energy flux, $q_\mu$, and the anisotropic stress, $\pi_{\mu\nu}$.
+Note that the energy-momentum tensor defined in Eq. (2.19) does not necessarily follow Eq. (2.18), and it is not derived from it.
+
+Each of the variables in Eq. (2.19) can also be obtained from the energy-momentum tensor itself, if we define the projection tensor orthogonal to the velocity $u^\mu$ as $h_{\mu\nu} = g_{\mu\nu} + u_\mu u_\nu$, then the observer-dependent physical quantities are [49]
+
+$$\text{Energy density} \quad \rho = T_{\mu\nu} u^{\mu} u^{\nu}, \qquad (2.20)$$
+
+$$\text{Pressure} \quad P = T_{\mu\nu}h^{\mu\nu}/3, \qquad (2.21)$$
+
+$$\text{Energy flux} \quad q^{\alpha} = -T_{\mu\nu}h^{\mu\alpha}u^{\nu}, \qquad (2.22)$$
+
+$$\text{Anisotropic stress} \quad \pi^{\alpha\beta} = h^{\mu\alpha}h^{\nu\beta}T_{\mu\nu} - Ph^{\alpha\beta}, \qquad (2.23)$$
+
+with the constraints
+
+$$q_{\alpha} u^{\alpha} = 0, \quad \pi_{\alpha\beta} u^{\alpha} = 0, \quad \pi^{\alpha}_{\alpha} = 0, \qquad (2.24)$$
+
+which follow from their definitions. In most cases, the frame is chosen such that the energy flux vanishes, i.e. $q^\mu = 0$ [56]. This is called the *energy frame*, and it will be used throughout this thesis. In this frame all the degrees of freedom that described the energy flux are now transferred to the observer's 4-velocity, $u^\mu$, since it is now constrained to follow the flow of the matter to conserve the vanishing energy flux. Any other frame can be chosen as this procedure is covariant, meaning that the quantities generated are the same in every coordinate system. Note that this definition does depend on the observer, which implies that all quantities defined with respect to a particular observer must be known in order to make predictions about observables related to that particular observer.
+
+The equations of motion for the fluid quantities can also be derived from the conservation of the stress-energy tensor. Eq. (2.16) gives rise to four equations, one for each value of the free index $\nu$, but in total there are ten functional degrees of freedom in the energy-momentum tensor. To completely describe the evolution of the system, the typical approach is to work in the perfect fluid scenario, wherein this case, the anisotropic stress vanishes and the number of degrees of freedom of
+---PAGE_BREAK---
+
+the system is reduced to five. To reduce this to the four equations we do have, an equation of state is normally used that relates the pressure of the system with the other variables. A barotropic equation of state, $P = P(\rho)$, is often used and can successfully describe many fluids relevant for cosmology. Alternatively, if the fluid is not perfect, one can take an approach where the anisotropic stress depends only on the other fluid parameters, such as when it is well represented by shear viscosity.
+
+If matter is composed of particles that can be approximated as test particles, its dynamical evolution can also be described using the geodesic equation [40, 41]
+
+$$p^{\mu}\nabla_{\mu}p^{\nu} = 0, \qquad (2.25)$$
+
+where $p^\mu$ is the 4-momentum tensor. This is useful for computing the dynamical evolution of matter if the system under study is composed only of a few particles or if the calculations are to be performed numerically, like in the case of N-body simulations. The usefulness of the geodesic equation is far more general than to describe the matter degrees of freedom, as we will see in Section 4. The geodesic equation is mostly applied to study the geometry of a spacetime by analysing the trajectories of test particles, such as massless particles that obey
+
+$$p^{\mu}p_{\mu} = 0, \qquad (2.26)$$
+
+which will be studied further in Section 4, or massive ones with mass $m$,
+
+$$p^{\mu}p_{\mu} = -m^{2}. \qquad (2.27)$$
+
+The Einstein equations, Eq. (2.15), these are nonlinear partial differential equations for the metric tensor and for that reason, they are very difficult to solve in general scenarios. Some general solutions do exist for simple systems with particular symmetries, one of which would be the De Sitter universe, which is a completely symmetric space, without matter or curvature whatsoever. Using a spherical mass with spherical or axial symmetry then we get the exact solutions for black holes, such as Schwarzschild. Taking isotropy and homogeneity but no curvature, we are left with Minkowski spacetime and allowing for curvature we then have the Friedmann-Lemaître-Robertson-Walker (FLRW) family of spacetimes.
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+The exact solution that we focus on in this thesis is part of the FLRW family of spacetimes. These spacetimes have homogenous and isotropic spatial slices. The FLRW line element is, in spherical coordinates, given by
+
+$$ds^2 = a^2(\eta) \left[ -d\eta^2 + \frac{dr^2}{1-Kr^2} + r^2 (d\theta^2 + \sin^2\theta d\phi^2) \right], \quad (2.28)$$
+
+where $\eta$ is the conformal time, and the function $a(\eta)$ is the scale factor, which has to obey the Friedmann evolution equations, (2.66) and (2.67) below, that are derived from the Einstein equations; K represents the constant curvature of the homogenous spatial slices. In the next subsection, we solve perturbatively the Einstein equations when no exact solution can be found.
+
+### 2.2.2. Perturbed spacetime
+
+As discussed in Section 2.1, we will assume that the physical quantities can usefully be decomposed into a homogeneous background, where quantities depend only on cosmic time, and inhomogeneous perturbations. These perturbations “live” on the background spacetime and it is this background spacetime which is used to split the four-dimensional spacetime into spatial 3-hypersurfaces and a temporal component that labels each spatial slice, using a (3+1) decomposition [57]. The metric tensor can be split up as
+
+$$g_{\mu\nu} = g^{(0)}_{\mu\nu} + \delta g_{\mu\nu}, \quad (2.29)$$
+
+where $g^{(0)}_{\mu\nu}$ is the background metric and $\delta g_{\mu\nu}$ is the perturbed metric. The background metric $g_{\mu\nu}$ or $\bar{g}_{\mu\nu}$ is given by
+
+$$g^{(0)}_{\mu\nu} = a^2(\eta) \begin{pmatrix} -1 & 0 \\ 0 & \gamma_{ij} \end{pmatrix}, \quad (2.30)$$
+
+and $\gamma_{ij}$ is the metric on the 3-dimensional space with constant curvature $K$, which in spherical coordinates, is given by Eq. (2.28).
+
+The metric tensor has 10 independent components in 4 dimensions. For linear perturbations, it turns out to be very useful to split the metric perturbation into different parts that are labelled scalars, vectors or tensors according to their transformation properties on spatial 3-hypersurfaces [48]. The reason for splitting the metric perturbation into these three types is that they all decouple in the linear perturbation equations.
+
+Scalar perturbations can always be constructed from a scalar quantity, or its
+---PAGE_BREAK---
+
+derivatives, and any background quantities such as the 3-metric $\gamma_{ij}$. We can con-
+struct any first-order scalar metric perturbation in terms of four scalars $\phi$, $B$, $\psi$ and
+$E$, where
+
+$$
+\begin{equation}
+\delta g_{00} = -2a^2\phi, \tag{2.31}
+\end{equation}
+$$
+
+$$
+\delta g_{0i} = a^2 B_i, \tag{2.32}
+$$
+
+$$
+\delta g_{ij} = 2a^2 C_{ij}. \tag{2.33}
+$$
+
+The 0–*i* and the *i*–*j* components of the metric tensor can be further decomposed
+into scalar, vector and tensor parts
+
+$$
+B_i = B_{,i} - S_i, \tag{2.34}
+$$
+
+$$
+C_{ij} = -\psi \delta_{ij} + E_{,ij} + F_{(i,j)} + \frac{1}{2} h_{ij}, \quad (2.35)
+$$
+
+where $S_i$ and $F_i$ are vector metric perturbations, and $h_{ij}$ is a tensor metric perturbation.
+
+Any 3-vector, such as $B_{,i}$, constructed from a scalar is necessarily curl-free, i.e.
+$B_{,[i,j]} = 0$.
+
+Vector perturbations are divergence-free. We can distinguish a pure vector part of
+the metric perturbation $\delta g_{0i}$, which is denoted by $-S_i$, which gives a non-vanishing
+contribution to $\delta g_{0[i,j]}$. Similarly, we define the vector contribution to $\delta g_{ij}$ con-
+structed from the derivative of a vector $F_{(i,j)}$.
+
+Lastly, there is a tensor contribution to $\delta g_{ij} = a^2 h_{ij}$ which is both transverse,
+$h_{ij,i}^j = 0$, meaning divergence-free, and trace-free, $h_i^i = 0$, which therefore cannot
+be constructed from inhomogeneous scalar or vector perturbations.
+
+We have introduced four scalar functions, two spatial vector valued functions with three components each, and a symmetric spatial tensor with six components. After taking into account the constraints above mentioned, we are left with 10 degrees of freedom, the same number as the independent components of the perturbed metric.
+
+Reminding ourselves that the reason for splitting the metric perturbation into
+these three types is that the governing equations decouple at linear order, therefore
+we can solve each perturbation type separately. At higher order this is no longer
+true, as there is mixing of the different types. In general, at higher orders, $n > 1$,
+the different types of perturbations of order $n$ decouple, but are sourced by terms
+comprising perturbations of lower order [16].
+
+We follow the notation of Malik and Wands [16] and Mukhanov et al. [50], so that
+---PAGE_BREAK---
+
+the metric perturbation, $\psi$, can be identified with the intrinsic scalar curvature of
+spatial hypersurfaces at first order. There are different choices for the way the spatial
+metric is split into different perturbation variables at second and higher orders in
+the perturbations, however, we will not be investigating these further in this thesis.
+
+Note that the metric perturbations in Eqs. (2.31), (2.32), and (2.33) include all
+orders. If we write down the complete metric tensor, up to and including second-
+order in perturbations we have
+
+$$g_{00} = -a^2 [1 + 2\phi_1 + \phi_2], \quad (2.36)$$
+
+$$g_{0i} = a^2 \left[ B_{1i} + \frac{1}{2} B_{2i} \right], \qquad (2.37)$$
+
+$$g_{ij} = a^2 [\delta_{ij} + 2C_{1ij} + C_{2ij}], \quad (2.38)$$
+
+where the first and second order perturbations $B_{1i}$ and $C_{1ij}$, and $B_{2i}$ and $C_{2ij}$, can
+be split further following Eqs. (2.34) and (2.35).
+
+The metric tensor obeys the constraint,
+
+$$g_{\mu\nu} g^{\nu\lambda} = \delta_{\mu}^{\lambda}, \qquad (2.39)$$
+
+and can be used to compute the contravariant metric tensor, which up to second
+order is given by
+
+$$g^{00} = -a^{-2} [1 - 2\phi_1 - \phi_2 + 4\phi_1^2 - B_{1k}B_1^k], \quad (2.40)$$
+
+$$g^{0i} = a^{-2} \left[ B_1^k + \frac{1}{2} B_2^k - 2\phi_1 B_1^i - 2B_{1k}C_1^{ki} \right], \quad (2.41)$$
+
+$$g^{ij} = a^{-2} [\delta^{ij} - 2C_1^{ij} - C_2^{ij} + 4C_1^{ik}C_{1k}^j - B_1^i B_1^j]. \quad (2.42)$$
+
+We are interested in how spacetime geometry, described by the metric tensor, $g_{\mu\nu}$,
+is affected by the perturbed matter content, described by the energy-momentum
+tensor. The four velocity shown before, $u^\mu$, is defined by
+
+$$u^\mu = \frac{dx^\mu}{d\tau}, \qquad (2.43)$$
+
+where $\tau$ is the proper time comoving with the fluid, defined as $d\tau = ds$, and it obeys
+the constraint,
+
+$$u^{\mu} u_{\mu} = -1. \qquad (2.44)$$
+
+Using Eqs. (2.40), (2.41), (2.42), and (2.44), we find that the components of the
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+4-velocity up to and including second order are given by
+
+$$u_0 = -a \left[ 1 + \phi_1 + \frac{1}{2}\phi_2 - \frac{1}{2}\phi_1^2 + \frac{1}{2}v_{1k}v_1^k \right], \quad (2.45)$$
+
+$$u_i = a \left[ v_{1i} + B_{1i} + \frac{1}{2}(v_{2i} + B_{2i}) - \phi_1 B_{1i} - 2C_{1ik}v_1^k \right], \quad (2.46)$$
+
+$$u^0 = a^{-1} \left[ 1 - \phi_1 - \frac{1}{2}\phi_2 + \frac{3}{2}\phi_1^2 + \frac{1}{2}v_{1k}v_1^k + v_{1k}B_1^k \right], \quad (2.47)$$
+
+$$u^i = a^{-1} \left[ v_1^i + \frac{1}{2}v_2^i \right], \quad (2.48)$$
+
+where
+
+$$v^i = \partial^i v + v_v^i, \quad (2.49)$$
+
+with $v$ the velocity potential, and $\nabla^i X = \partial^i X = X^i$ is the spatial part of the covariant derivative. For the 4-scalars, we simply write the perturbations by
+
+$$\rho = \rho_0 + \delta\rho, \quad (2.50)$$
+
+$$P = P_0 + \delta P, \quad (2.51)$$
+
+where $\rho_0 = \rho^{(0)}$ and $P_0 = P^{(0)}$, are the background quantities.
+
+The energy-momentum tensor of a fluid defined in Eq. (2.19), taking a vanishing energy flux, can be split into first and second order parts in the usual way, and thus the anisotropic stress tensor, $\pi_{\mu\nu}$ is
+
+$$\pi_{\mu\nu} = \pi_{(1)\mu\nu} + \frac{1}{2}\pi_{(2)\mu\nu}, \quad (2.52)$$
+
+following the constraints given in Eq. (2.24). The anisotropic stress vanishes for a perfect fluid or a minimally coupled scalar field, but may be non-zero in the presence of free-streaming neutrinos or a non-minimally coupled scalar field. The decomposition of the anisotropic stress tensor is complicated due to its constraints and for this reason its components also depend on the velocity fluctuations, as well as the metric. The anisotropic stress up to and including second order is given by,
+
+$$\pi_{00} = 0, \quad (2.53)$$
+
+$$\pi_{i0} = -2\pi_{ij}v^j, \quad (2.54)$$
+
+$$\pi_{ij} = a^2 \left[ \Pi_{ij} + \Pi_{(i,j)} + \Pi_{,ij} - \frac{1}{3}\delta_{ij}\nabla^2\Pi \right] + \frac{4}{3}\delta_{ij}\pi_{kl}C^{kl}, \quad (2.55)$$
+
+where we have defined the scalar, $\Pi$, vector, $\Pi_i$, and tensor, $\Pi_{ij}$, parts of the
+---PAGE_BREAK---
+
+anisotropic stress.
+
+From Eqs. (2.19), (2.40), (2.41), (2.42), (2.45), (2.50), and (2.51), the components
+of the stress energy tensor in the background
+
+$$
+T_0^0 = -\rho_0, \quad T_i^0 = 0, \quad T_j^i = \delta_j^i P_0, \tag{2.56}
+$$
+
+at first order,
+
+$$
+^{(1)}\delta T_{0}^{0}=-\delta \rho_{1},
+\qquad(2.57)
+$$
+
+$$
+^{(1)}\delta T_{i}^{0} = (\rho_{0} + P_{0}) (v_{1i} + B_{1i}), \qquad (2.58)
+$$
+
+$$
+{}^{(1)}\delta T_j^i = \delta P_1 \delta_j^i + a^{-2} \pi_{(1)}^i{}_j, \qquad (2.59)
+$$
+
+and at second order
+
+$$
+^{(2)}\delta T_{0}^{0} = -\delta\rho_{2} - 2(\rho_{0} + P_{0}) v_{1k} (v_{1}^{k} + B_{1}^{k}), \quad (2.60)
+$$
+
+$$
+\begin{equation}
+\begin{aligned}
+{}^{(2)}\delta T_i^0 = & (\rho_0 + P_0) [v_{2i} + B_{2i} + 4C_{1ik}v_1^k - 2\phi_1(v_{1i} + B_{1i})] \\
+& + 2(\delta\rho_1 + \delta P_1)(v_{1i} + B_{1i}) + \frac{2}{a^2}(B_1^k + v_1^k)\pi_{1ik},
+\end{aligned}
+\tag{2.61}
+\end{equation}
+$$
+
+$$
+{}^{(2)}\delta T_j^i = \delta P_2 \delta_j^i + a^{-2} \pi_2^i{}_j - \frac{4}{a^2} C_1^{ik} \pi_{1jk} + 2(\rho_0 + P_0) v_1^i (v_{1j} + B_{1j}). \quad (2.62)
+$$
+
+Note, that for compactness we have not split the above perturbations into their
+scalar, vector and tensor parts; these are given for $v^i$, $B_i$, $C_{ij}$ and $\pi_{ij}$ in Eqs. (2.49),
+(2.34), (2.35), (2.55), respectively.
+
+**2.3. Perturbations in**
+**Friedmann-Lemaître-Robertson-Walker**
+
+The most general homogeneous and isotropic line element is the FLRW line element, given in Eq. (2.28). In the background, the components of the metric depend only on time, which is represented by the conformal time coordinate, $\eta$. The conversion to cosmic time, $t$, is given by
+
+$$
+t = \int a d\eta. \tag{2.63}
+$$
+
+In this section, we begin by describing the evolution of the scale factor $a(\eta)$ and
+the other matter variables at the background level. We then introduce perturbations
+to this background in the flat case, i.e. $K = 0$ in Eq. (2.28). We show the perturbed
+evolution equations for both metric and matter perturbations and we introduce
+---PAGE_BREAK---
+
+the concept of gauge, discuss the gauge issue and give some examples of gauge transformations.
+
+**2.3.1. Background**
+
+The Einstein equations give rise to only two independent evolution equations for the scale factor, $a(\eta)$, of which only one is dynamical. Before discussing the evolution equations, we introduce the Hubble rate, $H$, which quantifies the rate of change of the scale factor and is given by
+
+$$H = \frac{\dot{a}}{a}, \qquad (2.64)$$
+
+in which a dot over the quantity denotes the derivative with respect to the cosmic time, $t$. The conformal Hubble rate, that we use throughout this thesis, is similarly given by
+
+$$\mathcal{H} = \frac{a'}{a} = aH, \qquad (2.65)$$
+
+where the prime denotes the derivative with respect to conformal time. Having introduced the conformal Hubble rate, using Eqs. (2.15) and (2.28) we can derive the Friedmann equations, which are constraints on the conformal Hubble rate and are given by
+
+$$\mathcal{H}^2 = \frac{8\pi G}{3} a^2 \rho - K. \qquad (2.66)$$
+
+The only other independent part of the Einstein field equations can be found from their trace and is
+
+$$\mathcal{H}' = -\frac{4\pi G}{3} a^2 (\rho + 3P). \qquad (2.67)$$
+
+Note that, to simplify the notation in this case we have used the symbol of the variable to denote its background value, i.e. $\rho = \rho^{(0)}$ and $P = P^{(0)}$. We assume that matter is well described by a perfect fluid at background level and that the frame used to project the stress-energy tensor is the energy frame, as mentioned above. The conservation of the stress-energy tensor gives another dynamical equation which is not independent of the two Einstein equations and is given by
+
+$$\rho' = -3\mathcal{H}(\rho + P). \qquad (2.68)$$
+
+Solutions to these equations have been found in simple cases, such as when a single fluid dominates the energy density and has the simple equation of state
+
+$$P = w\rho, \qquad (2.69)$$
+---PAGE_BREAK---
+
+with $w$ constant. Solving for the density, $\rho$, we find
+
+$$ \rho(a) = \rho_0 a^{-3(1+w)}, \qquad (2.70) $$
+
+where $\rho_0$ is an integration constant, usually set to the value of $\rho$ today. The particular cases widely studied in the literature are those with zero curvature, $K=0$ and with specific equations of state for radiation ($w=1/3$), matter ($w=0$) and vacuum energy ($w=-1$) [41, 55]. The corresponding solutions for $a(\eta)$ are
+
+$$ a(\eta) = \sqrt{\frac{8\pi G\rho_0}{3}}\eta, \qquad w = \frac{1}{3}, \qquad (2.71) $$
+
+$$ a(\eta) = \frac{2\pi G\rho_0}{3}\eta^2, \qquad w = 0, \qquad (2.72) $$
+
+$$ a(\eta) = \sqrt{\frac{3}{8\pi G\rho_0}}\frac{1}{\eta}, \qquad w = -1, \qquad (2.73) $$
+
+in which we have assumed expanding initial conditions ($a' > 0$). Many more solutions exist; with fluid mixtures, as discussed in Section 3.2, or with scalar fields, and some that cannot be found in a closed form but many more exist numerically [58].
+
+### 2.3.2. Gauges
+
+#### Perturbing spacetime
+
+Perturbation theory in a relativistic setting gives rise to interesting issues related to the fact that spacetime itself is perturbed. We have to make sure that the formalism is adapted to the geometric nature of the problem and is covariant. We therefore follow Refs. [16, 59–61].
+
+Usually, the first step is to identify the exact solution of the Einstein field equations, Eq. (2.15), that approximates the system under study. For cosmology, this is the FLRW solution, but here we will attempt to be fully general and call that solution “the background solution” with the background metric $g_{\mu\nu}^{(0)}$, as given in (2.3). The physical manifold $\mathcal{M}$ is split into a background manifold $\mathcal{M}_0$ and perturbed manifold, which is part of a one-parameter family of manifolds $\mathcal{M}_\epsilon$, with $\epsilon$ being the small parameter defining the perturbative scheme, as seen in Section 2.1. All of these 4-dimensional manifolds are embedded in a 5-dimensional manifold $\mathcal{N}$. We can then define a diffeomorphism $\phi_\epsilon : \mathcal{M}_0 \to \mathcal{M}_\epsilon$, which identifies points in $\mathcal{M}_0$ with those in $\mathcal{M}_\epsilon$. It is also useful to define a vector field $X$ in the tangent bundle of $\mathcal{N}$, whose integral curves, $\gamma$, intersect each of the manifolds of the family $\mathcal{M}_\epsilon$,
+---PAGE_BREAK---
+
+generating the diffeomorphism $\phi_{\epsilon}$, by identifying each interception in $\mathcal{M}_{\epsilon}$ to a point
+in the background manifold $\mathcal{M}_{0}$.
+
+Given a tensor field $T$, its Taylor expansion around any point in $\mathcal{M}_0 \subset \mathcal{N}$, along
+the integral curve, $\gamma$, is given by
+
+$$
+T_{\phi} \equiv \phi_{\epsilon}^{*} T_{\epsilon} = e^{\epsilon \mathcal{L}_{X}} T|_{0} = T_{0} + \epsilon (\mathcal{L}_{X} T)|_{0} + \frac{\epsilon^2}{2} (\mathcal{L}_{X}^{2} T)|_{0} + \mathcal{O}(\epsilon^3), \quad (2.74)
+$$
+
+in which $T_\epsilon$ is the tensor field $T$ evaluated at the manifold $\mathcal{M}_\epsilon$, $\mathcal{L}_X$ is the Lie derivative along the vector field $X$ and $\phi_\epsilon^*$ denotes the pull-back of the diffeomorphism $\phi_\epsilon$, which is used to evaluate the result on $\mathcal{M}_0$. The use of the exponential of the Lie derivative is simply a shorthand for the Taylor expansion, and it is useful to simplify certain calculations. Labelling perturbations as $\delta T$, as before, we can separate the full result order by order as (omitting pull-backs)
+
+$$
+T_{\phi} = T_{\phi}^{(0)} + \delta T_{\phi}^{(1)} + \frac{1}{2} \delta T_{\phi}^{(2)} + \dots, \tag{2.75}
+$$
+
+so that $\delta T_{\phi}^{(n)} = \epsilon^n (\mathcal{L}_X^n T)|_0$, in which we use a similar notation to Eq. (2.2), but
+the $\epsilon$ parameters are absorbed into the perturbations, for simplicity. Note that
+all quantities are evaluated in $\mathcal{M}_0$ and will therefore be written in terms of the
+coordinates of the background manifold.
+
+Gauge choice
+
+The choice of vector field in Eq. (2.74) and corresponding diffeomorphism $\phi_{\epsilon}$ is not
+unique, since there is no unique way to identify points between the background and
+the perturbed manifolds. This choice is called *the gauge choice* and $X$ is called the
+generator of that gauge. As we will see, perturbed quantities defined in different
+gauges will not be equal. This is not surprising, as quantities in one gauge are
+evaluated at different points from quantities in another gauge. It is useful, therefore,
+to relate quantities in different gauges and to establish ways to fix the chosen
+gauge. Two approaches exist for deriving the relation between the quantities in
+different gauges, or *gauge transformations*, called the active and passive approaches
+[16]. They differ by the choice of manifold on which to focus. The active approach
+focuses on each point in the perturbed manifold $\mathcal{M}_{\epsilon}$ and compares tensors in the
+corresponding points in $\mathcal{M}_{0}$ using different gauge generators. The passive approach
+does the opposite. It begins with points on $\mathcal{M}_{0}$ and evaluates tensors at different
+points in the perturbed manifold. They are equivalent and lead to the same trans-
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+formation equations and, for that reason, we only use the active approach here.
+
+The process of fixing a gauge is of great importance, since most cosmological quantities are not gauge invariant, i.e. they depend on which gauge was chosen to start with. However, once a gauge is fixed, all quantities in that gauge are well defined.
+
+The process of fixing a gauge is often based on choosing an appropriate number of tensor fields and giving some constraints on their perturbations. As an example, suppose we have a scalar field $\varphi$, whose background value $\varphi^{(0)}$ is not constant. We can (partially) fix a gauge by deciding that its perturbations vanish, i.e. by forcing $\varphi$ to obey the symmetries of the background manifold. In the language described above, we are choosing to map the points in $M_\epsilon$ to points in $M_0$ for which the value of $\varphi$ is the same, which is certainly possible. Making this choice, along with similar ones for three other variables (in 4 dimensions), eliminates the freedom in choosing the gauge generators. The mapping between the background and perturbed manifolds is completely determined, and thus all perturbations are uniquely defined.
+
+The Einstein field equations (2.15) are invariant no matter the gauge choice, as is any equation relating tensors, since it can always be rewritten as
+
+$$G_{\mu\nu} - 8\pi G T_{\mu\nu} = 0, \qquad (2.76)$$
+
+and the right-hand-side, zero, is obviously invariant. This has the consequence that the Einstein field equations can always be written equivalently in any gauge or with any choice of gauge-invariant variables. Another consequence of a symmetry like the one given in Eq. (2.76), is that all quantities that can possibly be observed must be gauge-invariant, because there is no way for the equations to have information about the gauge in which they were used.
+
+### Poisson Gauge
+
+Many gauges have become popular in the literature and in this thesis we make use of the Longitudinal Gauge and Poisson Gauge. We now describe their definitions and compute some of the gauge-invariant quantities that arise from them.
+
+A very popular gauge for studying the post-inflationary universe is the longitudinal gauge. This gauge is also called conformal Newtonian gauge, and is defined by the following condition,
+
+$$B = E = 0. \qquad (2.77)$$
+
+If the problem under study only involves scalars, this choice is sufficient and turns
+---PAGE_BREAK---
+
+out to diagonalise the metric, making many calculations simpler. When extended
+to include vector degrees of freedom, this gauge is often denoted as Poisson gauge.
+Two possible definitions exist in the literature, with the choice
+
+$$
+F^i = 0, \tag{2.78}
+$$
+
+being the most common [31–33, 62, 63]. It is motivated by the similarity with the
+Coulomb gauge of electromagnetism ($\nabla \cdot A = 0$), since its gauge conditions are
+equivalent to
+
+$$
+B_{,i}^{i} = 0, \quad C_{T}^{ij} = 0, \tag{2.79}
+$$
+
+where $B_i$ and $C_{ij}$ were defined in Eqs. (2.34) and (2.35), and with $C_T^{ij}$ being the
+traceless part of the perturbations of the spatial metric, $C^{ij}$. The alternative choice
+is made by taking
+
+$$
+S^i = 0, \tag{2.80}
+$$
+
+is also used and is based on the requirement that the contravariant vector orthogonal
+to spatial hypersurfaces has a vanishing spatial part [16, 50]. The gauge-invariant
+quantities arising in this gauge are the Bardeen potentials [30, 48], given by
+
+$$
+\Phi \equiv \phi + \mathcal{H}(B - E') + (B - E')', \quad (2.81)
+$$
+
+$$
+\Psi \equiv \psi - \mathcal{H}(B - E'), \tag{2.82}
+$$
+
+These quantities were the first gauge-invariants to be explicitly calculated and have
+been used in the literature for a very long time [16, 30–33, 41, 55, 62, 64, 65]. They
+have the property of simplifying one of the equations of motion considerably as one
+can verify by substituting them into the Einstein equations. This gauge also has the
+advantage of nearly mimicking the evolution equations of Newtonian cosmology on
+short scales, at least at first order.
+
+**2.3.3. Matter velocity field and peculiar velocities**
+
+The components of the 4-velocity $u^\mu = dx^\mu/d\eta$ defined in general in Eq. (2.45), in
+the longitudinal gauge up to and including second order using the perturbed metric
+---PAGE_BREAK---
+
+and using only scalar perturbations are given by
+
+$$u_0 = -a \left[ 1 + \Phi_1 + \frac{1}{2}\Phi_2 - \frac{1}{2}\Phi_1^2 + \frac{1}{2}v_{1k}v_1^k \right], \quad (2.83)$$
+
+$$u_i = a \left[ v_{1i} + \frac{1}{2}v_{2i} - 2\Psi_1 v_{1i} \right], \quad (2.84)$$
+
+$$u^0 = a^{-1} \left[ 1 - \Phi_1 - \frac{1}{2}\Phi_2 + \frac{3}{2}\Phi_1^2 + \frac{1}{2}v_{1k}v_1^k \right], \quad (2.85)$$
+
+$$u^i = a^{-1} \left[ v_1^i + \frac{1}{2}v_2^i \right], \quad (2.86)$$
+
+where $v_i = \partial_i v$, with $v$ the velocity potential.
+
+### 2.3.4. Evolution equations
+
+#### Einstein equations
+
+We show the perturbed Einstein field equations, Eq. (2.15), up to linear order. We split the equations into their scalar, vector and tensor parts and write them without specifying any gauge. We begin with the time-time Einstein equation:
+
+$$3\mathcal{H}(\mathcal{H}\phi + \psi') - \nabla^2(\psi + \mathcal{H}\sigma) = -4\pi G a^2 \delta\rho, \quad (2.87)$$
+
+where $\sigma = E' - B$.
+
+The space-time equation results in a scalar equation,
+
+$$\mathcal{H}\phi + \psi' = -4\pi G a^2 (\rho + P)(v + B), \quad (2.88)$$
+
+and a vector equation,
+
+$$\nabla^2(F'_i + S_i) + 4(\mathcal{H}^2 - \mathcal{H}') (v_{,i} - S_i) = 0. \quad (2.89)$$
+
+The off-diagonal is given by
+
+$$\sigma' + 2\mathcal{H}\sigma + \psi - \phi = 8\pi G a^2 \Pi. \quad (2.90)$$
+
+The spatial part of the Einstein equation, like the spatial metric, is composed of two
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+scalar parts
+
+$$ \psi'' + 2H\psi' + H\phi' + (2H' + H^2)\phi = 4\pi G a^2 \left(\delta P + \frac{2}{3}\nabla^2\Pi\right), \quad (2.91) $$
+
+$$ E'' - B' + 2H(E' - B) + \psi - \phi = 8\pi G a^2 \Pi, \quad (2.92) $$
+
+one vector part
+
+$$ F_i'' + S_i' + 2H(F_i' + S_i) = 8\pi G a^2 \Pi_i, \quad (2.93) $$
+
+and a tensor part
+
+$$ h_{j}^{i}{}^{''} + 2Hh_{j}^{i}{}^{'} - \nabla^2 h_j^i = 8\pi G a^2 \Pi_j^i. \quad (2.94) $$
+
+We can clearly see in all equations above, one of the advantages of the SVT decomposition – the scalars, vectors and tensors do not couple to each other at first order, implying that one can solve their respective equations independently of the others. At second order, this is no longer exactly true, as the second-order equations are sourced by combinations of first-order scalars, vectors and tensors. This can be seen in the nonlinear part of the time-time equation, which is
+
+$$ \begin{aligned} \Xi_{\text{NL}_0}^0 = (\mathcal{H}^2 - \mathcal{H}') v_i (v^i + B^i) &+ \frac{3}{2} \mathcal{H}^2 B^i B_i - 6\mathcal{H}^2 \phi^2 + 2\mathcal{H} C' \phi \\ &+ B^{i,j} \left( \frac{1}{2} (\delta_{ij}C - C'_{ij}) - 2\mathcal{H}(C_{ij} + \phi\delta_{ij}) + \frac{1}{4} (B_{(i,j)} - \delta_{ij}B^{k}_{,k}) \right) \\ &+ B^i \left( C^j_{[j,i]}{}' + \mathcal{H}C_{,i} - 2\mathcal{H}C^j_{i,j} + \mathcal{H}\phi_{,i} + \frac{1}{4}\mathcal{H}B^{j}_{[i,j]} \right) \\ &+ \frac{1}{4} (C'_{ij}C^{ij}' - (C')^2) + 2\mathcal{H}C_{ij}C^{ij}' - C^{ij}C_{,ij} + 2C^{ij}C^k_{i,jk} - C^{ij}C_{ij,k}{}^k \\ &+ \frac{1}{4}C_{,j}C^{*,j} + C^j_{i,j}C^i{}_{k,k} - C_{,i}C^i{}_{k,k} + \frac{1}{2}C_{ij,k}C^{ik,j} - \frac{3}{4}C_{ij,k}C^{ij,k}, \end{aligned} \quad (2.95) $$
+
+where $C \equiv C_k^k$, and we can see that all types of couplings exist. However, the second-order parts of variables continue not to mix, so one can still evolve them independently.
+
+### Conservation of the stress-energy tensor
+
+We now show the equations derived from the covariant conservation of the stress-energy tensor, Eq. (2.16). The time component is given by
+
+$$ \delta\rho' + 3\mathcal{H}(\delta\rho + \delta P) + (\rho + P)[\nabla^2(\sigma + v + B) - 3\psi'] = 0, \quad (2.96) $$
+---PAGE_BREAK---
+
+## 2. Cosmological Perturbation Theory
+
+where the perturbations are 'full', meaning all orders are enclosed in the perturbed variables for simplicity, i.e. $\psi = \psi^{(1)} + \psi^{(2)} + \dots$.
+
+The spatial component gives the generalisation of the Euler equation, which can be further split into a scalar and a vector component. The scalar equation is
+
+$$ \left[(\rho+P)(v+B)\right]' + (\rho+P)\left[4\mathcal{H}(v+B)+\phi\right] + \delta P + \frac{2}{3}\nabla^2\Pi = 0. \quad (2.97) $$
+
+and the vector equation is given by
+
+$$ (v_v^i - S^i)' + (\rho - 3P)' \mathcal{H} (v_v^i - S^i) + \frac{1}{2(\rho+P)} \nabla^2 \Pi^i = 0. \quad (2.98) $$
+---PAGE_BREAK---
+
+# 3. Gravitational waves in a flat radiation-matter universe
+
+## 3.1. Introduction
+
+In 2016, LIGO [1] directly detected gravitational waves for the first time. The origin of these waves was astrophysical: the merger of two large stellar mass black holes. In contrast, primordial gravitational waves originating from inflation have tightly constrained upper limits, but have not been detected, by PLANCK satellite observations combined with data from BICEP2/Keck Array [66] and with other data sources [67]. The simplest inflationary models consistent with these results tend to favour inflationary scenarios which generate gravitational waves of relatively low, but not negligible ($r \ge 0$), amplitude compared with scalar perturbations.
+
+In this chapter, we consider gravitational waves with sufficiently small amplitudes to be modelled as linear tensor perturbations travelling through a flat Friedmann-Lemaître-Robertson-Walker (FLRW) universe filled with radiation and matter, as seen in Section 2.3. The matter component is pressureless dust, and our perturbation equations treat both radiation and matter as perfect fluids. We allow for a source term due to neutrino anisotropic stress.
+
+As mentioned in Refs. [68–76], there are well known exact analytical expressions for the evolution of linear tensor perturbations in a flat universe dominated by either radiation only or matter (pressureless dust) only. These approximations do not work particularly well when used for a universe containing both radiation and matter. The next simplest approximation is to use the radiation-only solution before the time of radiation-matter equality, and the matter-only solution after that time. A slightly more sophisticated approach (see e.g. Refs. [69, 70]) is to match these two solutions together at the time of radiation-matter equality, termed the “sudden approximation”. Reference [70] shows that these approaches do not provide particularly good approximations to a numerical solution of the linear tensor perturbation equation, finding that for large wavenumbers the standard scale-invariant wavefunction for the
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+gravity wave severely *underestimates* the actual size of the gravity wave and there is a definite shift in the *phase* of the gravity wave as it crosses the radiation-matter phase transition. In Ref. [71], a smoother transition is sought between the radiation and matter solutions by fitting parameters to numerical solutions, a method which is most suited to dealing with wavenumbers much lower (corresponding to much larger wave-lengths) than those we consider.
+
+Later work in Refs. [72–76] is aimed primarily in approximating the effects of neutrino free-streaming as expressed via an integro-differential equation derived in Refs. [72, 77], rather than at improving accuracy in the perfect fluid model of radiation and matter. In this chapter, we are also improving the accuracy of the solutions also in the case of non-zero anisotropic stress.
+
+We now briefly survey the accuracy of the approximations of Refs. [70, 73–76]. References [70, 73], Ref. [75] and Ref. [74] pursue three different forms of the Wentzel-Kramers-Brillouin (WKB) method for finding approximate analytical solutions for ordinary differential equations.
+
+The methods of Refs. [70, 73] and Ref. [75] provide results which, when restricted to the perfect fluid case, are accurate for primordial gravitational waves to within about 10% for inverse wavenumbers, evaluated at the present day, of around 10–15 Mpc. Reference [74] presents another form of WKB approximation for a flat radiation-matter universe. Restricted to the perfect fluid case, this provides a good sub-horizon approximation for gravitational waves of primordial origin. However, it does not retain such good accuracy outside the horizon, and covers only one of the two independent solutions of the governing equation for tensor perturbations.
+
+A different kind of approach is pursued in Ref. [76], using sums of spherical Bessel functions of successive orders to approximate tensor perturbations. However, Ref. [76]'s approach is best used for numerical calculations based on expansions of very high order — they exemplify solutions to 20th and 100th order.
+
+We derive improved results by employing a method set out, in a non-cosmological context, by Feshchenko, Shkil' and Nikolenko (FSN) in 1966 [78], and used in a recent paper [79] to approximate the solutions of the ordinary differential equations governing scalar density perturbations. The FSN method is well suited for solving linear second order ordinary differential equations, that also depend on a small parameter, which here we take to be the inverse wavenumber. In effect, this approach extends the WKB method of Ref. [75].
+
+In Section 3.2 of this chapter, we present the differential equation which governs tensor metric perturbations which were derived in Section 2.3, focusing on a flat radiation-matter universe, and also noting the simpler differential equation for a
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+flat radiation-only model and its analytical solution with and without neutrino anisotropic stress. In Section 3.4.1, we then use the method first set out in Ref. [78] to find an approximate analytical solution to the governing equation of Section 3.2.
+
+Our approximation method is based on the *sub-horizon* assumption that the tensor perturbation has a wavenumber larger than the Hubble parameter. However, using numerical solutions, we can see that, for a wide range of wavenumbers, it is possible to extend the approximation back to earlier times when the wavenumber is similar to the Hubble parameter. We find the approximation of third order in the inverse wavenumber is accurate to within 1% or better for gravitational waves with a present day inverse wavenumber less than, or equal to, around 17 Mpc.
+
+Section 3.5 extends the analytical approximation to cover gravitational waves of primordial origin, from early times when their wavelength is larger than the horizon through their subsequent sub-horizon evolution. Our approximation to second order in the inverse wavenumber is accurate to within 1%, or better, for gravitational waves corresponding to those with an actual present day inverse wavenumber less than, or equal to, around 35 Mpc. This range includes wavenumbers which represent scales of key relevance for structure formation in the Universe, and broadly corresponds to CMB multipoles $l \gtrsim 120$.
+
+A *Mathematica* notebook which executes the approximation method automatically is available online at Ref. [80]. It enables all the approximations presented in this paper to be calculated in less than a second on a standard PC. The template can be easily adapted for use with other, similar, second order differential equations.
+
+Throughout this chapter, we work in conformal time $\tau$, with a dash indicating the derivative of a function with respect to conformal time. We set the speed of light $c = 1$, comoving spatial co-ordinates are denoted $x^i$ and Latin indices $i,j,k$ range from 1 to 3.
+
+## 3.2. Linear tensor perturbations
+
+We now study linear perturbations in a flat Friedmann-Lemaître-Robertson-Walker (FLRW) model with two non-interacting perfect fluids — radiation and matter, the latter being pressureless dust. We begin with the background equations, with the conformal time Friedmann equation studied in Section 2.3, and shown for a general fluid in Eq. (2.66), taking the following form
+
+$$ \mathcal{H}^2 = \frac{8\pi G}{3} a^2 (\rho_r + \rho_m), \quad (3.1) $$
+---PAGE_BREAK---
+
+3. *Gravitational waves in a flat radiation-matter universe*
+
+where $\mathcal{H}$ is the conformal Hubble factor, $G$ is the gravitational constant, $a$ is the scale factor, $\rho_r$ the homogeneous radiation density, and $\rho_m$ the homogeneous matter density. As usual, the radiation and matter densities obey
+
+$$ \rho_r \propto a^{-4} \quad \text{and} \quad \rho_m \propto a^{-3}, \tag{3.2} $$
+
+and, as noted in, for example, Refs. [79, 81], substituting Eqs. (3.2) in Eq. (3.1) and integrating, the scale factor is given by
+
+$$ a(\tilde{\tau}) = a_{\text{eq}} \left( \frac{\tilde{\tau}}{\tau_c} + \frac{\tilde{\tau}^2}{4\tau_c^2} \right), \tag{3.3} $$
+
+where $a_{\text{eq}}$ is the time of radiation-matter equality, $\tilde{\tau}$ is the conformal time, and $\tau_c = \sqrt{2}/\mathcal{H}_{\text{eq}}$. In the following, we will use a normalised conformal time co-ordinate and replace $\tilde{\tau}/\tau_c$ by $\tau$, giving us the simpler expression
+
+$$ a(\tau) = a_{\text{eq}} \left( \tau + \frac{\tau^2}{4} \right). \tag{3.4} $$
+
+We also normalise the comoving wavenumber $k$ by using the corresponding inverse units $\tau_c^{-1} = \mathcal{H}_{\text{eq}}/\sqrt{2}$, and we note that, in those units, the conformal Hubble pa- rameter is then given by
+
+$$ \mathcal{H}(\tau) = \frac{2(2+\tau)}{\tau(4+\tau)}. \tag{3.5} $$
+
+For future reference, using the cosmological parameters of Ref. [67], we find that we have
+
+$$ \mathcal{H}_{\text{eq}} / \sqrt{2} = 0.00727 \text{ a}_0 \text{ Mpc}^{-1}, \tag{3.6} $$
+
+where $a_0$ is the value of the scale factor at the present time, *assuming the universe contains only radiation and matter*. To compare inverse wavenumbers with *actual* present day distances, we use a value of $a_0$ which takes account of the expansion of the Universe due to dark energy. From for example Ref. [82], we find that the Universe is currently some 16% bigger than it would have been without dark energy. If, as used implicitly in Ref. [67], we take the actual present day value of $a_0$ to be 1, then, in the universe with only radiation and matter assumed in Eq. (3.6), we have
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+$a_0 \approx 1/1.16 \approx 0.86$, giving us
+
+$$ \mathcal{H}_{\text{eq}}/\sqrt{2} = 0.0063 \, \text{Mpc}^{-1}. \qquad (3.7) $$
+
+For use below, in drawing figures directly comparable with those of Ref. [73], we note the conformal time of recombination, $\tau_r$. Using the redshift of $z_\star = 1089.90$ from [67], we find $\tau_r = 2.56069$.
+
+As discussed in Section 2.2, to linear order, tensor, vector and scalar perturbations decouple. We therefore can focus solely on tensor perturbations, and the metric then has a line element
+
+$$ ds^2 = a^2(-d\tau^2 + [\delta_{ij} + h_{ij}] dx^i dx^j), \qquad (3.8) $$
+
+where $h_{ij}$ are transverse, traceless metric tensor perturbations which depend on both $\tau$ and the comoving spatial co-ordinate **x**. At this linear order, transverse, traceless tensor perturbations do not depend on any choice of gauge.
+
+The tensor perturbations have two independent polarisations, + and ×,
+
+$$ h_{ij}^{+} = h^{+} e_{ij}^{+} \quad \text{and} \quad h_{ij}^{\times} = h^{\times} e_{ij}^{\times}, \qquad (3.9) $$
+
+where the polarisation matrices $e_{ij}^+$ and $e_{ij}^\times$ represent eigenmodes of the spatial Laplacian, each satisfying
+
+$$ \nabla^2 e_{ij} = -k^2 e_{ij}, \qquad (3.10) $$
+
+and the Laplacian's derivatives are with respect to the comoving co-ordinate **x**, with $k$ being the perturbation's comoving wavenumber.
+
+The governing equation for the tensor perturbations with neutrino anisotropic stress is given, in general, by (see e.g. [16, 77])
+
+$$ h''_{ij}(\tau) + 2Hh'_{ij}(\tau) + \nabla^2 h_{ij}(\tau) = 16\pi G\pi^{(\nu)}_{ij}, \qquad (3.11) $$
+
+where $\pi^{(\nu)}$ denotes neutrino anisotropic stress, which obeys the constraints
+
+$$ \pi_i^i = 0, \quad \text{and} \quad \partial_i \pi_{ij} = 0. \qquad (3.12) $$
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+For a perfect fluid $\pi_{ij} = 0$, but this is not true in general.
+
+## 3.3. Governing equations
+
+We can now rewrite the general evolution equation for the tensor perturbations, Eq. (3.11) above, for the particular cases we would like to find solutions. We start with simplest case, in which the anisotropic stress is vanishing.
+
+### 3.3.1. Perfect fluid
+
+#### Radiation and dust
+
+As set out in, for example, Ref. [16], for a model where the energy density is in the form of perfect fluids, the tensor perturbation parameters, $h^+$ and $h^\times$, from Eq. (3.9) each are separately governed by the conformal time equation
+
+$$h''(\tau) + 2\mathcal{H}h'(\tau) + k^2h(\tau) = 0, \quad (3.13)$$
+
+where $\mathcal{H}$ is again the conformal Hubble parameter and the dashes denote differentiation with respect to $\tau$. Using Eq. (3.5), we can therefore write Eq. (3.13) explicitly in terms of $\tau$ as
+
+$$h''(\tau) + \frac{4(2+\tau)}{\tau(4+\tau)}h'(\tau) + k^2 h(\tau) = 0. \quad (3.14)$$
+
+This is the governing equation for linear tensor perturbations in a flat universe filled with radiation and pressureless matter, without a cosmological constant, and with no source term due to anisotropic stress.
+
+#### Radiation only
+
+Similarly, we can derive the governing equation for linear tensor perturbations in flat universes which contain either only radiation or only matter. Unlike, Eq. (3.14), the governing equations in each of these simpler models has tractable, and well known, analytical solutions.
+
+For example, with only radiation, the Friedmann equation can be solved to show that $a \propto \tau$. We then have $\mathcal{H} = 1/\tau$, giving us the governing equation for our
+---PAGE_BREAK---
+
+3. *Gravitational waves in a flat radiation-matter universe*
+
+Figure 3.1.: Components of the analytical solution for linear tensor perturbations in a flat radiation-only universe, as set out in (3.16) for a perfect fluid. The $k\tau$ axis is logarithmic.
+
+perturbation, $h_r$, as
+
+$$h_r''(\tau) + \frac{2}{\tau} h_r'(\tau) + k^2 h_r(\tau) = 0. \quad (3.15)$$
+
+As recalled in, for example, Refs. [68–71, 73, 74], it is well-known that this can easily be solved analytically to give $h_r$ as a linear combination
+
+$$h_r(\tau) = A_s \frac{\sin(k\tau)}{k\tau} + A_c \frac{\cos(k\tau)}{k\tau}, \quad (3.16)$$
+
+where $A_s$ and $A_c$ are real constants set by initial conditions.
+
+This solution also describes the evolution of gravitational waves which originate very early in the history of a flat radiation-matter universe, when the matter density can be neglected relative to the radiation density. Any primordial $A_c$ component may be neglected because it increases very rapidly in early times, as can be seen from Figure 3.1 and it is preferable to avoid any singularities. In Section 3.5, we will use this property to allow us to neglect the $A_c$ component for gravitational waves which have a very early cosmological origin, such as inflation.
+
+For use in the following sections, we recall that a perturbation with wavenumber
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+$k$ is said to cross the horizon at the time $\tau_k$ when $H = k$. From Eq. (3.5) we get
+
+$$ \tau_k = \frac{\sqrt{4k^2 + 1} - 2k + 1}{k} = \frac{1}{k} + \mathcal{O}\left(\frac{1}{k^2}\right), \quad (3.17) $$
+
+where the $\mathcal{O}(1/k^2)$ means that the remaining part of the expression is of order $1/k^2$.
+
+## 3.3.2. Including anisotropic stress
+
+### Radiation and dust, including anisotropic stress
+
+From 3.3.1 we have an analytical solution for the tensor perturbations in a perfect fluid. Here, we denote how we can extend this to include neutrino anisotropic stress and we first recall the expression for the anisotropic stress given in Refs. [72, 77],
+
+$$ \pi_{ij}(\tau) = -4\bar{\rho}_{\nu}(\tau)\mathcal{H}^2 \int_0^{\tau} K(\tau-t)h'_{ij}(t)dt, \quad (3.18) $$
+
+where $K$ is the kernel defined as
+
+$$ \begin{aligned} K(\tau) &\equiv \frac{1}{16} \int_{-1}^{1} dx (1-x^2)^2 e^{ix\tau}, \\ &= -\frac{\sin\tau}{\tau^3} - \frac{3\cos\tau}{\tau^4} + \frac{3\sin\tau}{\tau^5}. \end{aligned} \quad (3.19) $$
+
+and $\bar{\rho}_{\nu}$ is the unperturbed neutrino energy density. Eq (3.18) explains, for instance, in any imperfect fluid with shear viscosity $\xi$, we have $\pi_{ij} = -\xi h'_{ij}$, even when $h_{ij}$ becomes time-independent as the wavelength of a mode leaves the horizon, and remains time-independent until horizon re-entry. All modes of cosmological interest are still far outside the horizon at the temperature $\approx 10^{10}$ K where neutrinos are going out of equilibrium with electrons and photons, so $h_{ij}$ can be affected by anisotropic inertia only later, when neutrinos are freely streaming, and this equations explain the contribution of freely streaming neutrinos exactly. We then use Eq. (3.18) in Eq. (3.11) which gives the integro-differential equation for $h_{ij}(\tau)$ firstly derived in Ref. [77] and popularised by Ref. [72].
+
+$$ h''(\tau) + \frac{4(2+\tau)}{\tau(4+\tau)}h'(\tau) + k^2 h(\tau) = -24f_\nu(\tau) \left[ \frac{4(2+\tau)}{\tau(4+\tau)} \right]^2 \int_0^\tau K(\tau-t)h'(t)dt. \quad (3.20) $$
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+This is the governing equation for linear tensor perturbations in a flat universe filled with radiation and pressureless matter, without a cosmological constant, and including a source term due to anisotropic stress, where $f_\nu = \bar{\rho}_\nu / \bar{\rho}$.
+
+#### Radiation only with anisotropic stress
+
+For a radiation only universe Eq. (3.20) reduces to
+
+$$h''_{r}(\tau) + \frac{2}{\tau} h'_{r}(\tau) + k^2 h_{r}(\tau) = -24 f_{\nu}(\tau) \left[ \frac{4}{\tau^2} \right] \int_0^{\tau} K(\tau-t) h'_{r}(t) dt. \quad (3.21)$$
+
+We proceed to use the method from [79] (explained further in detail in Appendix A.2) to get the solution for the first order $h$ sourced by free-streaming neutrinos to compare with the analytic result Eq. (3.16).
+
+We consider wavelengths short enough to have re-entered the horizon during the radiation-dominated era (though after neutrino decoupling), and then compare with the analytical result. We take the initial time to be early enough so that it can be approximated as $\tau \ll 1/a$, with the zero of time defined so that during the radiation-dominated era we have $a \sim \sqrt{\tau}$. Then we have $a'/a \sim 1/\tau$, while for three neutrino flavours $f_\nu$ takes the constant value $f_\nu = 0.40523$. Taking the approximation this gives
+
+$$h_{r(1)}(\tau) = \left(-\frac{i}{k}\right) \left(\frac{e^{ik\tau} - f_{\nu}(0)\tau}{\tau}\right), \qquad (3.22)$$
+
+which is less than 1% away from the analytic solution without anisotropic stress when the perturbation enters the horizon. For wavelengths that enter the horizon after electron-positron annihilation and well before radiation-matter equality, all quadratic effects of the tensor modes in the cosmic microwave background, such as the whole of the “B-B” polarisation multipole coefficients $C_{\ell B}$, are 35.6% less than they would be without the damping due to free-streaming neutrinos [72]. Photons also contribute to $\pi_{ij}$, but this effect is much smaller because at last scattering photons contribute much less than 40% of the total energy.
+---PAGE_BREAK---
+
+### 3.4. Analytical solutions for the tensor perturbations
+
+In this section, we will derive an approximate analytical solution to the governing equation Eq. (3.14) valid in the *sub-horizon* case, $k \gg H$. We begin by recalling the method of Ref. [78] as applicable to a single second order differential equation, having a small parameter. Here, the small parameter is the comoving inverse wavenumber, $k^{-1}$.
+
+As described in Ref. [79], the double power series method consists of finding an approximation for $h$ of the form
+
+$$h(\tau) = \exp \left[ \sum_{s=0}^{\infty} \int k^{-s+1} \omega_s(\tau) d\tau \right], \quad (3.23)$$
+
+and for convenience, we write
+
+$$\omega = \sum_{s=0}^{\infty} k^{-s+1} \omega_s(\tau), \quad (3.24)$$
+
+where $\omega$ depends on both $\tau$ and $k$, and we will regard $k$ as a fixed parameter. We then have
+
+$$h' = \omega h, \quad (3.25)$$
+
+$$\text{and} \quad h'' = (\omega' + \omega^2) h.$$
+
+#### 3.4.1. Approximating perfect fluid tensor perturbations
+
+Using the approximation of Eq. (3.23) in our governing equation Eq. (3.14), and dividing through by $h$, we get the “characteristic” equation from which we will derive all orders of our approximation,
+
+$$(\omega' + \omega^2) + \frac{4(2+\tau)}{\tau(4+\tau)}\omega + k^2 = 0. \quad (3.26)$$
+
+We can now substitute Eq. (3.24) into Eq. (3.26) and equate coefficients of like powers of the inverse wavenumber, $k^{-1}$, meaning we can write the $\omega_s$ in terms of previously calculated ones, i.e. $\omega_{s+1} \propto \omega_s$ and so build a better approximation for $h$. The calculation is similar to that set out in a Bessel type differential equation in Ref. [79]. It can also be carried out using the *Mathematica* notebook available
+---PAGE_BREAK---
+
+3. Gravitational waves in a flat radiation-matter universe
+
+Figure 3.2.: Upper panel: Real components of the analytical and approximate solution for linear tensor perturbations in a flat radiation-only universe without (solid black line) red dashed line) and with the effect of free streaming neutrinos anisotropic stress with $f_\nu(0) = 0.5$ (red dashed line), as set out in Eqs. (3.16) and (3.22). Lower panel: Imaginary components of Eqs. (3.16) and (3.22). The $k\tau$ axis is logarithmic.
+---PAGE_BREAK---
+
+online at Ref. [80].
+
+We can form successive order $s_{\max}$ approximations
+
+$$h_{(s_{\max})} = \exp \left[ \sum_{s=0}^{s_{\max}} \int k^{-s+1} \omega_s(\tau) d\tau \right]. \quad (3.27)$$
+
+We find that $h_{(s_{\max})}$ has complex values. Taking the real and imaginary parts of $h_{(s_{\max})}$ provides approximations for two independent solutions of Eq. (3.14).
+
+For clarity, we should point out that, in this chapter, when we describe an approximation as being of a particular order, we are not referring to the order of the perturbation theory (as described in, for example, Ref. [16]). We use the term order in this context to refer to the value of $s_{\max}$ in the approximation of Eq. (3.27). We only use expressions of first order in perturbation theory, and, to minimise confusion, we consistently describe these as being of linear order.
+
+The largest value of $s_{\max}$ we shall use is $s_{\max} = 3$. This is because trial against numerical solutions¹ shows that larger choices of $s_{\max}$ do not uniformly improve the approximation for all sub-horizon values of $\tau$.
+
+This third order approximation is to take any linear combination of the real and imaginary parts of
+
+$$h_{(3)}(\tau) = \frac{1}{\tau(4+\tau)} \left(\frac{4+\tau}{\tau}\right)^{i/4k} \exp \left[ ik\tau + \frac{1}{2k^2\tau(4+\tau)} \right]. \quad (3.28)$$
+
+Recall, as set out following Eq. (3.3), that $\tau$ and $k$ have been normalised in terms of $\sqrt{2}/H_{eq}$ and are therefore dimensionless numbers.
+
+We want to compare our approximations with numerical solutions.² Figure 3.3 shows the $h_{(3)}$ approximation for wavenumber $k = 10H_{eq}/\sqrt{2}$, plotted against the corresponding numerical solution.
+
+We want now to quantify the error in the approximation $h_{(3)}$. One way to try to do this would be to take the numerical solution $h$ and calculate the ratio $|(h_{(3)} - h)/h|$. However, this runs into a difficulty. Since $h$ is oscillating and repeatedly takes zero values, unless there is no error at all at these zeros, the ratio $|(h_{(3)} - h)/h|$ will repeatedly become infinite.
+
+We therefore adapt our approach in order to avoid this problem. Broadly speaking, we estimate the typical error compared with the amplitude of oscillation. To do this
+
+¹In Section VII of Ref. [79] the authors set out a method for estimating which order approximation is the most accurate for a given value of $\tau$ without employing numerical solutions.
+
+²As usual, our numerical solutions are derived from initial conditions. In Ref. [79] the authors had to use final conditions to manage a particular numerical instability.
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+Figure 3.3.: The real and imaginary parts of the approximate third order solution for a perfect fluid given by Eq. (3.28) (solid blue line) and the numerical solution (dashed orange line) for Eq. (3.14) with $k = 10H_{\text{eq}}/\sqrt{2}$. The horizontal axes show $\tau$ in units of $\tau_r$, the conformal time of recombination, calculated using Ref. [67]. The curves are plotted for values of $\tau$ after horizon-crossing. The solid vertical line corresponds to radiation-matter equality, as defined by Eq. (3.4).
+
+we first decide a target degree of accuracy, 1% say. We then compare a plot of the error $|h_{(3)} - h|$ with a plot of the target accuracy, here $1\% \cdot |h|$. Both plots will usually spike repeatedly downwards towards zero. We consider that the approximation is accurate to within 1% if, spikes when $h=0$ aside, $|h_{(3)} - h| \le 1\% \cdot |h|$. This will show on the graph as the plot of $|h_{(3)} - h|$ being level with, or below, the plot of $1\% \cdot |h|$ (except near $h=0$ spikes).
+
+As shown in Figure 3.4, the $h_{(3)}$ approximation is accurate to within 1%, or better from horizon-crossing onwards ($\tau \ge \tau_k$). In fact, this degree of accuracy applies for wavenumbers $k \gtrsim 9H_{\text{eq}}/\sqrt{2} \sim 0.07 \text{ a}_0 \text{ Mpc}^{-1}$. Using Eq. (3.7), this corresponds to actual present day distances of 17 Mpc.
+
+The second order and first order approximations constructed by our method will also be of use in the next section, and we set them out here. The second order approximation is to take any linear combinations of the real and imaginary parts of
+
+$$h_{(2)}(\tau) = \frac{1}{\tau(4+\tau)} \left(\frac{4+\tau}{\tau}\right)^{i/4k} \exp[ik\tau]. \quad (3.29)$$
+
+For use in Section 3.5, we also write this more explicitly as
+
+$$h_{(2)}(\tau) = \frac{B_s \sin \left( k\tau + \frac{1}{4k} \ln \left( 1 + \frac{4}{\tau} \right) \right) + B_c \cos \left( k\tau + \frac{1}{4k} \ln \left( 1 + \frac{4}{\tau} \right) \right)}{\tau(\tau+4)}, \quad (3.30)$$
+
+with $B_s$ and $B_c$ real constants. This second order approximation is accurate to
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+Figure 3.4.: The solid lines show the absolute errors in the approximation of Figure 3.3 as $|f_{(3)}(\tau) - f(\tau)|$, where $f_{(3)}$ is the real or imaginary part, as appropriate, of $h_{(3)}$ from Eq. (3.28) and $f$ is the real or imaginary relevant part of the numerical solution for a perfect fluid. For comparison, the dashed line shows $|1\% \times f(\tau)|$. Downward spikes in the lines represent points where the value becomes zero. The blue solid line being below or level with the green dashed line indicates an error of less than or equal to 1%. See the text for further explanation.
+
+within 1%, or better, from horizon-crossing onwards, when we have $k \gtrsim 17H_{\text{eq}}/\sqrt{2} \sim 0.12 \ \text{a}_0 \ \text{Mpc}^{-1}$.
+
+The first order, or leading order, approximation — as set out in [75] — is to take any linear combination of the real and imaginary parts of
+
+$$h_{(1)}(\tau) = \frac{1}{\tau(4+\tau)} \exp[ik\tau] \propto \frac{\exp[ik\tau]}{a(\tau)} = \frac{\cos(k\tau) + i\sin(k\tau)}{a(\tau)}, \quad (3.31)$$
+
+which is accurate to 1%, or better, from horizon-crossing onwards, when we have
+$k \gtrsim 120H_{\text{eq}}/\sqrt{2} \sim 0.87 \ \text{a}_0 \ \text{Mpc}^{-1}$.
+
+## 3.4.2. Approximating tensor perturbations with anisotropic stress
+
+In this section, we compute an approximate analytical solution to the governing equation Eq. (3.20). The fraction of the total energy density in neutrinos is [72]
+
+$$f_\nu(\tau) = \frac{\Omega(a_0/a)^4}{\Omega_m(a_0/a)^3 + (\Omega_\gamma + \Omega_\nu)(a_0/a)^4} = \frac{f_\nu(0)}{1+\tau}, \quad (3.32)$$
+
+We follow the method described in Ref. [79] along with (3.19) and (3.32) to get an approximate solution to Eq. (3.20). The third order approximation is to take
+---PAGE_BREAK---
+
+Figure 3.5.: The real and imaginary parts of the approximate third order solution with free neutrino anisotropic stress given by Eq. (3.33) (solid blue line) and the numerical solution (dashed orange line) for Eq. (3.20) with $k = 100\mathcal{H}_{\text{eq}}/\sqrt{2}$ and $f_\nu(0) = 0.40523$. The curves are plotted for values of $\tau$ after horizon-crossing. The solid vertical line corresponds to radiation-matter equality, as defined by Eq. (3.4).
+
+any linear combination of the real and imaginary parts of
+
+$$
+\begin{aligned}
+h_{(3)}(\tau) = & \left( -\frac{i}{k} - \frac{2(2+\tau)}{k^2\tau(4+\tau)} + \frac{i[16f_\nu(0)(2+\tau)^2 + 5(16+28\tau+15\tau^2+3\tau^3)]}{5k^3\tau^2(1+\tau)(4+\tau)^2} \right) \\
+& \times \tau^{-(1+(i/k)\alpha})(1+\tau)^{(i/k)\beta}(4+\tau)^{-1+(i/k)\gamma} \\
+& \times \exp \left[ ik\tau - f_\nu(0)\tau - \frac{2i[-15(2+\tau)+4f_\nu(0)(6+\tau)]}{15k\tau(4+\tau)} + \frac{16f_\nu(0)(2+\tau)^2 + 5(16+28\tau+15\tau^2+3\tau^3)]}{10k^2\tau^2(1+\tau)(4+\tau)^2} \right].
+\end{aligned}
+\quad (3.33)
+$$
+
+where
+
+$$ \alpha = \frac{5 + 8f_{\nu}(0)}{20}, \quad \beta = \frac{16}{45}f_{\nu}(0), \quad \text{and} \quad \gamma = \frac{45 + 8f_{\nu}(0)}{180}. \quad (3.34) $$
+
+## 3.5. Modelling primordial gravitational waves
+
+In this section, we model the propagation of primordial gravitational waves from early times when the waves are super-horizon, through to later times when they
+---PAGE_BREAK---
+
+3. *Gravitational waves in a flat radiation-matter universe*
+
+are sub-horizon. We do this by matching an approximate solution for early times with a different one for late times. This gives us a solution valid for all times in the radiation-matter model, not just when the waves are sub-horizon.
+
+For early times, we use the radiation-only solution, Eq. (3.16), while for late times we use the previous section's approximate solution $h_{(2)}$ from Eq. (3.30). We choose the time at which we match these solutions to be $\tau = 1/k$. We note from Eq. (3.17) that for relevant values of $k$, the matching time $\tau = 1/k$ will be close to the horizon-crossing time $\tau_k$. The form of the resulting equations will, however, be much simpler than if we had done the matching at the horizon-crossing time itself.
+
+The derivation of the approximations set out in the previous section depended on the sub-horizon assumption, $k \ll H$. However, below we show that, for $k \gtrsim 4.5H_{\text{eq}}/\sqrt{2}$, our matching approach gives an approximation, $h_{\text{rm}}$, which is accurate to 1%, or better, through the whole radiation-matter epoch. We use the second order solution $h_{(2)}$ in the matching because trial and error shows it is the order of approximate solution which works to within 1% for the widest range of wavenumbers.
+
+From Eq. (3.16), we have that the early time solution is
+
+$$h_r(\tau) = A_s \frac{\sin(k\tau)}{k\tau} + A_c \frac{\cos(k\tau)}{k\tau}. \quad (3.35)$$
+
+As discussed above following Eq. (3.16), for gravitational waves with primordial origin, we can set $A_c = 0$. We therefore take
+
+$$h_r(\tau) = \frac{\sin(k\tau)}{k\tau} \quad (3.36)$$
+
+to be our solution for $\tau \le 1/k$.
+
+From Eq. (3.30), we have our solution for $\tau \ge 1/k$ as
+
+$$h_{(2)}(\tau) = \frac{B_s \sin(\lambda(k, \tau)) + B_c \cos(\lambda(k, \tau))}{\tau(\tau + 4)}, \quad (3.37)$$
+
+where we have written
+
+$$\lambda(k, \tau) = k\tau + \frac{1}{4k} \ln \left( 1 + \frac{4}{\tau} \right). \quad (3.38)$$
+
+We then need to choose the real constants $B_s$ and $B_c$ in Eq. (3.37) to be such that $h_{\text{rm}}$ and $h'_{\text{rm}}$ are continuous. In other words, we ensure the values of the two functions and the values of their first $\tau$ derivatives each match at $\tau = 1/k$. The calculation is set out in the Appendix. From Eq. (A.10), we have the resulting
+---PAGE_BREAK---
+
+3. Gravitational waves in a flat radiation-matter universe
+
+Figure 3.6.: Upper panel: The approximate solution, $h_{\text{rm}}$, of Eq. (3.39) (solid blue line) and the numerical solution for a perfect fluid (dashed orange line) for Eq. (3.14) with $k = 10H_{\text{eq}}/\sqrt{2}$. Lower panel: The error in the matched solution (solid blue line) plotted against 1% of the numerical solution (dashed green line). In both panels: The vertical dashed line is horizon-crossing, $\tau_{k=10} \approx 0.102$, which is very close to the matching point, $\tau = 0.1$. The solid vertical line is radiation-matter equality.
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+matching approximation
+
+$$h_{\text{rm}}(\tau) = \begin{cases} \frac{\sin(k\tau)}{k\tau} & \text{if } \tau \le \frac{1}{k} \\ \frac{4k+1}{4k^3\tau(4+\tau)} \left[ 4k \sin(k\tau + L(k,t)) + \mu \sin(k\tau + L(k,\tau)-1) \right] & \text{if } \tau \ge \frac{1}{k}, \end{cases} \quad (3.39)$$
+
+where
+
+$$L(k, \tau) = \frac{1}{4k} \ln \left( \frac{1 + 4\tau^{-1}}{1 + 4k} \right) \quad \text{and} \quad \mu = \sin(1) + \cos(1) = 1.38177... \tag{3.40}$$
+
+This is our approximate analytical solution to Eq. (3.14), the governing equation for tensor perturbations (gravitational waves) in a flat radiation-matter universe. As we now show, it is a good approximation for both sub-horizon ($\tau \lesssim 1/k$) and super-horizon ($\tau \gtrsim 1/k$) for wavenumbers $k$ over a wide range of values relevant for structure formation in the Universe.
+
+Figure 3.6 shows this matched solution, $h_{\text{rm}}$, for $k = 10H_{\text{eq}}/\sqrt{2}$ in its upper panel and in the lower panel plots the error using the approach also used in Figure 3.4. The lower panel shows that the error is consistently less than 1%, both before and after horizon-crossing. We found that $h_{\text{rm}}$ has errors of 1%, or better for all $\tau$, when we $k \gtrsim 4.5H_{\text{eq}}/\sqrt{2} = 0.033~\text{a}_0~\text{Mpc}^{-1}$.
+
+Using Eq. (3.7), this corresponds to $h_{\text{rm}}$ meeting our 1% accuracy test for all times, when we consider inverse wavenumbers with actual present day values of less than, or equal to, around 35 Mpc. We can also express this in multipoles, as used in CMB calculations, via the broad correspondence — see for example Refs. [75, 83, 84] — that a multipole, $l$, receives its main contributions from present day physical wavenumbers $k_{\text{ph}} \simeq cH_0 l$. Using this rule, our range of 1% accuracy, $k \gtrsim 4.5H_{\text{eq}}/\sqrt{2}$, broadly corresponds to multipoles $l \gtrsim 120$.
+
+We found that matching using $h_{(1)}$ of Eq. (3.31), in place of $h_{(2)}$, obtains errors of 1%, or better for all $\tau$, only when we have $k \gtrsim 180H_{\text{eq}}/\sqrt{2} = 1.3~\text{a}_0~\text{Mpc}^{-1}$. This corresponds to actual present day inverse wavenumbers of less than or equal to around 0.9 Mpc, and, broadly, to multipoles $l \gtrsim 5000$.
+
+The WKB solutions of Refs. [70, 73], Ref. [74] and Ref. [75] aim to derive approximations for primordial gravitational waves. We now compare these with our approximation — not restricting our attention only to the perfect fluid case, but considering the anisotropic stress due to free-streaming neutrinos as well like Refs. [73–75].
+
+Turning first to the WKB approximation of Ref. [75], we note that this is the same
+---PAGE_BREAK---
+
+Figure 3.7.: As for the lower panel of Figure 3.6, but using the leading order approximation, $h_{(1),s}$ of Eq. (3.41), instead of $h_{rm}$.
+
+as our leading order approximation $h_{(1)}$ of Eq. (3.31). For primordial gravitational waves, along the lines discussed following Eq. (3.16), we are interested in only the imaginary (sine) part of Eq. (3.31), which is proportional to
+
+$$h_{(1),s} = \frac{a_{\text{eq}} \sin(k\tau)}{k a(\tau)} = \frac{4 \sin(k\tau)}{k\tau(4+\tau)}, \quad (3.41)$$
+
+where we have chosen the constant of proportionality so that $h_{(1),s}(0) = 1$. Figure 3.7 shows that, for $k = 10\mathcal{H}_{\text{eq}}/\sqrt{2}$, this gives errors of around 10%.
+
+References [70, 73] presented another less straightforward form of WKB approximation. Figures in those papers show that, for $k \approx 16.4\mathcal{H}_{\text{eq}}/\sqrt{2}$ in Fig. 1 of Ref. [70], and for $k \approx 12.1\mathcal{H}_{\text{eq}}/\sqrt{2}$ in Fig. 2 of Ref. [73], there are errors of around 10%, or greater. Their figures also show that alternative simpler approximations — using a radiation-only solution, a matter-only solution, or the two matched together at $\tau = \tau_{\text{eq}}$ in a “sudden approximation” — are all less accurate than the WKB approximation of Refs. [70, 73], and so also much less accurate than our approximation $h_{\text{rm}}$, given in Eq. (3.39).
+
+Our calculations suggest that the best approximation we have found in the literature for sub-horizon primordial gravitational waves is the WKB solution explored in passing in Ref. [74]. That approximation is constructed for only one of the two independent solutions of the governing equation Eq. (3.14). As can be seen from
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+Figure 3.4, typically one of a pair of approximate WKB solutions will be better than the other. For $k = 10\mathcal{H}_{\text{eq}}/\sqrt{2}$, and for sub-horizon values of $\tau$, the approximation of Ref. [74] is accurate to within about 0.8%, which compares with the accuracies for the two approximations of Figure 3.4 of around 0.25% (real part) and 1% (imaginary part). Starting outside the horizon, Ref. [74]'s approximation becomes considerably less accurate than our matching approximation, $h_{\text{rm}}$.
+
+The Bessel function approach of Ref. [76] also approximates primordial gravitational waves. As indicated in Section 3.1, a comparison with numerical solutions shows that many terms are needed to derive accurate approximations.
+
+## 3.6. Conclusion
+
+In this chapter, we have derived new analytic solutions to the gravitational wave or tensor evolution equation at linear order in cosmological perturbation theory, using the method presented in Ref. [79] and including neutrino anisotropic stress. The solutions depend on time, wavenumber, and the ratio of the neutrino background energy density and the total energy density at $\tau = 0$, $f_\nu(0)$, which allows us to vary the damping of the gravitational waves due to the neutrino anisotropic stress.
+
+We show how the method of Ref. [79] can be applied to an integro-differential equation, and our solutions present a simple way to analyse the evolution of the tensor perturbations in the presence of anisotropic stress. The analytic solutions save computational time compared to solving the equations numerically, for example if we are interested in a wide range of different parameter values $f_\nu$ (the ratio of neutrino to total background energy density). We have compared our analytical approximation to numerical solutions with anisotropic stress and find that the difference between them is within 1%.
+
+A simple example illustrates the usefulness of analytical solutions even in this day and age. In second order cosmological perturbation theory, the governing equations include terms of the form $h_{ij}h^{ij}$. For example Ref. [85] shows that different forms of the curvature perturbation at second order differ by terms proportional to $h_{ij}h^{ij}$. To relate this to the expressions derived in the sections above, we can use that for a gravitational wave travelling in the z-direction, for example,
+
+$$h_{ij}h^{ij} = 2[(h^{\times})^2 + (h^+)^2], \quad (3.42)$$
+
+where $h^\times$ and $h^+$ are the two independent polarisations of the gravitational waves defined in Eq. (3.9). Then substituting in the solutions of the model we are interested
+---PAGE_BREAK---
+
+### 3. Gravitational waves in a flat radiation-matter universe
+
+in, we obtain an expression for how much the different curvature perturbations disagree in terms of, say, the wavenumber and the neutrino-radiation ratio $f_ν$.
+---PAGE_BREAK---
+
+# 4. Galaxy Number Counts
+
+## 4.1. Introduction
+
+Recent years have witnessed the beginning of the era of precision cosmology with future surveys such as BOSS [86], eBOSS [87], Euclid [13], and WFIRST [88] improving and tightening constraints on observable cosmological parameters. Additionally, great theoretical advancements have been made in tackling nonlinear regimes to test cosmological models and general relativity.
+
+For theoretical cosmological models, probing the relation between redshift and angular diameter or luminosity distance of a source is of significant value. This relation determines the parameters of the cosmological model, but when perturbations due to structure are included, new effects are revealed. One of these effects is lensing, which is observed along the line of sight. Another effect is the distortion in redshift space due to velocities and motion of the sources, giving rise to ‘Doppler lensing’. Doppler lensing is the apparent change in object size and magnitude due to peculiar velocities. Objects falling into an overdensity appear larger on its near side, and smaller on its far side, than typical objects at the same redshifts. This effect dominates over the usual gravitational lensing magnification at low redshift. Doppler lensing gives a new window into the peculiar velocity field in addition to the usual redshift space distortion measurements. The integrated Sachs-Wolfe (ISW) effect which arises from integrating along the full line of sight between the source and the observer.
+
+Most of the known effects on the distance-redshift relation are calculated at linear order in cosmological perturbation theory in Refs. [17, 29, 30, 48]. However, at second order other general relativistic effects must be considered. When structure is evolving, nonlinear modes come into play, and many of these go beyond Newtonian theory.
+
+One of the main observables directly affected by the angular and luminosity distance estimation is the galaxy number density (often dubbed number counts). Important examples of these effects are demonstrated in Refs. [30–35, 90–93]. The dom-
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+inating terms of the full second order calculations have been reviewed in Ref. [39].
+More recently in Ref. [37], the authors present second order relativistic corrections
+to the observable redshift. A “pedagogical” approach to the lengthy calculations is
+provided in Ref. [94] to try to ease the tension between the different groups.
+
+In this work, we present a new path to compute the second-order galaxy number
+count in a Friedmann-Lemaître-Robertson-Walker (FLRW) universe. This follows
+the volume determination as defined in Ref. [41] instead of computing the luminosity
+distance as in Ref. [35]. We identify key effects, some of which will be observable with
+the next generation of cosmological surveys. To check the robustness of our results,
+we confirm the consistency for the first order expressions with previous works.
+
+In section 4.2, we give all the definitions needed for the linear and nonlinear
+calculations in the context of cosmological perturbation theory (CPT). In section
+4.3, we compute the linear and nonlinear parts of the null geodesic equation, the
+observed redshift and show the geometrical effects present at this level. In section
+4.4, we compute the angular diameter distance and the physical volume that the
+galaxy survey spans; we make a conformal transformation that maps null geodesics
+from the perturbed FLRW metric to a perturbed Minkowski spacetime $\hat{g}_{\mu\nu} \rightarrow g_{\mu\nu}$,
+and the way quantities transform with this map is discussed in further detail within
+this section. We compute our main result of the galaxy number density in section
+4.5. In section 4.6 we compare our calculation with other results in the literature
+at linear order, and find an exact agreement with all those pertaining to the right
+interpretation of variables. In section 4.7 we make a similar comparison as in the
+previous section for the leading terms in our second order galaxy number density,
+finding a good agreement and only some slight differences with other results in the
+literature. Finally, in section 4.8 we give a discussion of our result, some conclusions
+and future work.
+
+We use the notation
+
+$$
+(X)_o^S = X|_o^S = X_s - X_o = X(\lambda_s) - X(\lambda_o). \quad (4.1)
+$$
+
+The derivative with respect to the affine parameter is
+
+$$
+\frac{dX}{d\lambda} = X' + n^i X_{,i}, \tag{4.2}
+$$
+
+where $n^i$ represents the direction of observation. This last equation implies, for a
+---PAGE_BREAK---
+
+scalar function $X$,
+
+$$n^i n^j X_{,ij} = n^i n^j \partial_i \partial_j X = \frac{d^2 X}{d\lambda^2} - 2 \frac{dX'}{d\lambda} + X'', \quad (4.3)$$
+
+where $\nabla_i X = \partial_i X = X_{,i}$ is the spatial part of the covariant derivative.
+
+Following our discussion in Section 2.3 and the definitions presented in subsection 2.3.2, the perturbed FLRW spacetime in the longitudinal gauge is then described by [16]
+
+$$ds^2 = a^2 \left[ -(1+2\Phi_1 + \Phi_2) d\eta^2 + (1-2\Psi_1 - \Psi_2) \delta_{ij} dx^i dx^j \right], \quad (4.4)$$
+
+making use of Eq. (2.77), $\eta$ is the conformal time, $a = a(\eta)$ is the scale factor and $\delta_{ij}$ is the flat spatial metric, and we have neglected the vector and tensor modes, we also allow for first and second order anisotropic stresses. Hereinafter, we consider perturbations around a FLRW metric to second-order.
+
+## 4.2. Basics for the definition of the galaxy number density
+
+### 4.2.1. Photon wavevector
+
+In a redshift survey, galaxy positions are identified by measuring photons from the sources. As discussed in Chapter 2, the geodesic equation, given in Eq. (2.25), is useful for computing dynamical evolution and for analysing the geometry of a spacetime through the trajectories of test particles. In a general spacetime, we consider a light-ray with tangent vector $k^\mu$ and affine parameter $\lambda$, that parametrises the curve that light-ray follows, with given values for the source, $\lambda_s$, and observer, $\lambda_o$, points, illustrated in Fig. 4.1. The components of the photon wavevector can be written as
+
+$$\bar{k}^{\mu} = \frac{dx^{\mu}}{d\lambda} = a^{-1}[1, n^i], \qquad (4.5)$$
+
+where the overbar denotes background quantities, $n^i$ is the direction of observation¹ pointing from the observer to the source, and follows the normalisation condition: $n^i n_i = 1$.
+
+The tangent vector is null
+
+$$k_{\mu} k^{\mu} = 0, \qquad (4.6)$$
+
+¹Some authors define $n^i$ with the opposite sign. See, for example, Refs. [30–32].
+---PAGE_BREAK---
+
+Figure 4.1.: Affine parameter convention of a light-ray in a radio observation. *S* denotes the source, *O* is the observer and $\lambda$ is the affine parameter.
+
+and geodesic
+
+$$k^{\nu} \nabla_{\nu} k^{\mu} = 0. \qquad (4.7)$$
+
+where $\nabla_{\nu}$ is the covariant derivative defined by the metric given in Eq. (4.4). In general, the perturbed wavevector can be written as
+
+$$\delta^{(n)} k^{\mu} = a^{-1} [\delta^{(n)} \nu, \delta^{(n)} n^i]. \qquad (4.8)$$
+
+where $\delta^{(n)}$ gives the $n$-th order perturbation as defined in Eq. (2.2), and we are following the usual notation for the temporal component, that is $k^0 \equiv \nu$ [94].
+
+The affine parameter that parametrises the geodesic equation, is also related to the comoving distance ($\chi$) by
+
+$$\chi = \lambda_o - \lambda_s, \qquad (4.9)$$
+
+and in terms of the redshift as
+
+$$\chi(z) = \int_0^z \frac{dz}{(1+z)\mathcal{H}(z)}. \qquad (4.10)$$
+---PAGE_BREAK---
+
+4.2.2. Observed redshift
+
+The photon energy measured by an observer with 4-velocity $u^\mu$ is
+
+$$
+\mathcal{E} = -g_{\mu\nu} u^{\mu} k^{\nu}. \tag{4.11}
+$$
+
+From Eq. (4.11) the observed redshift of a source (e.g. a galaxy) can be defined as
+
+$$
+1 + z = \frac{\epsilon_s}{\epsilon_o}, \tag{4.12}
+$$
+
+where the ‘s’ denotes the source and ‘o’ the observer. From this definition, there
+will be a Doppler effect on the redshift due to the velocities $u^\mu$ and the observed
+redshift is in fact a function of the velocity and the wavevector, i.e. $z = z(k^\mu, u^\mu)$.
+
+4.2.3. Angular diameter distance
+
+For a given bundle of light-rays leaving a source, the bundle will invariantly expand
+and create an area in between the light-rays. This area can be projected onto a
+screen space, perpendicular to the trajectories of the photons and the 4-velocity of
+the observer, as illustrated in Figs. 4.2 and 4.3.
+
+The area of a bundle in screen space, $\mathcal{A}$, defines the angular diameter distance $d_A$, and is directly related to the null expansion $\theta$ [64] defined in section 4.4,
+
+$$
+\frac{1}{\sqrt{\mathcal{A}}} \frac{d\sqrt{\mathcal{A}}}{d\lambda} = \frac{d \ln d_A}{d\lambda} = \frac{1}{2}\theta. \quad (4.13)
+$$
+
+where $\lambda$ is the affine parameter defined in Eq. (4.5). Using Eq. (4.13) we can compute
+how the area of the bundle changes along the geodesic trajectory that the photons
+are following from the source towards the observer.
+
+**4.2.4. Physical Volume**
+
+Number counts relate to the number of sources detected in a bundle of rays, for a
+small affine parameter displacement $\lambda$ to $\lambda + d\lambda$ at an event $P$. This corresponds
+to a physical distance
+
+$$
+d\ell = (k^\mu u_\mu) d\lambda, \tag{4.14}
+$$
+
+in the rest frame of a comoving galaxy at said point in space P, if k^μ is a tangent
+vector to the past directed null geodesics (so that k^μ u_μ > 0).
+---PAGE_BREAK---
+
+Figure 4.2.: The light-ray bundle going from the source, *S*, to the observer, *O*, the cross sectional area created by the infinitesimal separation of the light-rays and the screen space, $\mathcal{A}$, which is orthogonal to the 4-velocity, $u^\mu$, and the direction of observation, $n^\mu$. For simplicity, it is shown $n^\mu$ pointing from the source to the observer, i.e. the opposite from the one using in all our calculations. We present a general 4-vector $x^\nu$ and its projection onto screen space $P_{\mu\nu}x^\nu$.
+---PAGE_BREAK---
+
+Figure 4.3.: When a light-ray bundle traveling from a source, *S*, to an observer, *O*, passes close to matter, the cross section that the different null geodesics generate, *A*, gets distorted in different ways, and those are explained by an expansion $\theta$, a vorticity $\omega$, and shear $\Sigma$, defined in Eqs. (4.38) and (4.39). The circles represent the area of the bundle's cross section and the arrows show how it is distorted.
+
+The cross-sectional area of the bundle is
+
+$$d\mathcal{A} = d_A^2(\lambda)d\Omega, \quad (4.15)$$
+
+if the geodesics subtend a solid angle $d\Omega$ to the observer, this is shown in Fig. 4.4.
+
+From Eqs. (4.14) and (4.15) the corresponding volume element at a point $P$ in space is (see e.g. Ref. [41])
+
+$$dV = d\ell d\mathcal{A} = (k^\mu u_\mu) d_A^2(\lambda) d\lambda d\Omega = -\mathcal{E} d_A^2(\lambda) d\lambda d\Omega. \quad (4.16)$$
+
+These covariant definitions lead to the expressions we compute in the following sections at first and second order in cosmological perturbation theory.
+---PAGE_BREAK---
+
+Figure 4.4.: Volume corresponding to an infinitesimal change in the affine parameter from $\lambda$ to $\lambda + d\lambda$.
+
+## 4.3. Perturbed null geodesics and redshift
+
+### 4.3.1. Geodesic equation
+
+Let us now look at solutions to the geodesic equation. First, from Eq. (4.6) and the normalisation of $n^i$ we obtain the null condition of the photon wavevector
+
+$$
+\begin{aligned}
+0 = {}& 2[n^i \delta^{(1)} n_i - \delta^{(1)} \nu - \Phi_1 - \Psi_1] \\
+ & + \left[ n^i \delta^{(2)} n_i - \delta^{(2)} \nu - \frac{1}{2} \Phi_2 - \frac{1}{2} \Psi_2 - (\delta^{(1)} \nu)^2 + \delta^{(1)} n_i \delta^{(1)} n^i \right. \\
+ & \qquad \left. - 4 (\Phi_1 + \Psi_1) \delta^{(1)} \nu - 4 \Psi_1 (\Phi_1 + \Psi_1) \right].
+\end{aligned}
+\quad (4.17)
+$$
+
+For the geodesic equation, Eq. (4.7), we obtain the propagation equations for the temporal and spatial perturbations
+
+$$ k^\mu \nabla_\mu \delta^{(n)} \nu = \frac{d\delta^{(n)}\nu}{d\lambda} + \Gamma^0_{\alpha\beta} k^\alpha k^\beta = 0, \quad (4.18) $$
+
+$$ k^\mu \nabla_\mu \delta^{(n)} n^i = \frac{d\delta^{(n)} n^i}{d\lambda} + \Gamma^i_{\alpha\beta} k^\alpha k^\beta = 0, \quad (4.19) $$
+---PAGE_BREAK---
+
+where $\Gamma^{\mu}_{\nu\sigma}$ are the connection coefficients at any given order (n). The first order connection coefficients are given in Appendix B.1.
+
+Substituting and rearranging, we find the geodesic equations in general at first order [55],
+
+$$ \frac{d\delta^{(1)}\nu}{d\lambda} = -2\frac{d\Phi_1}{d\lambda} + \Phi'_1 + \Psi'_1, \quad (4.20) $$
+
+$$ \frac{d\delta^{(1)}n^i}{d\lambda} = 2\frac{d\Psi_1}{d\lambda}n^i - [\Psi'_{1,i} + \Phi'_{1,i}], \quad (4.21) $$
+
+where Eq. (4.20) there is a term related to the Integrated Sachs-Wolfe effect defined below. The expressions for the equations at second order are given in Appendix B.3.
+
+### 4.3.2. Observed redshift
+
+We now expand the photon energy $\mathcal{E} = -g_{\mu\nu}u^{\mu}k^{\nu}$ to second order,
+
+$$ \mathcal{E} = \bar{\mathcal{E}} + \delta^{(1)}\mathcal{E} + \frac{1}{2}\delta^{(2)}\mathcal{E}. \quad (4.22) $$
+
+Using Eqs. (2.36), Eq. (2.83), (2.84), (4.20), (4.21), (B.10) and (B.11), we find that $\bar{\mathcal{E}} = 1$, and
+
+$$ \delta^{(1)}\mathcal{E} = \delta^{(1)}\nu + \Phi_1 - (v_{1i}n^i), \quad (4.23) $$
+
+$$ \delta^{(2)}\mathcal{E} = \delta^{(2)}\nu + \Phi_2 - (v_{2i}n^i) + 2\Phi_1\delta^{(1)}\nu - 2v_{1i}\delta^{(1)}n^i + \Phi_1^2 + (v_{1k}v_1^k) + 4\Psi_1(v_{1i}n^i). \quad (4.24) $$
+
+The perturbations to the photon energy given in Eqs. (4.23) and (4.24) are given explicitly in terms of the metric potentials in Appendix B.3, in Eqs. (B.14) and (B.15). Integrating Eqs. (4.20), (4.21), (B.10) and (B.11), with respect to the affine parameter, $\lambda$, from the observer to the source, we find the perturbed photon vector, $\delta k^{\mu}$. Note that $\delta k^{\mu}|_o = 0$, what can be seen explicitly in Eq. (B.14) and Eq. (B.15), so that
+
+$$ \delta^{(1)}\mathcal{E}|_o = \Phi_1|_o - (v_{1i}n^i)_o, \quad (4.25) $$
+
+$$ \delta^{(2)}\mathcal{E}|_o = \Phi_2|_o - (v_{2i}n^i)_o + (\Phi_1|_o)^2 + (v_{1k}v_1^k)_o + 4\Psi_1|_o(v_{1i}n^i)_o. \quad (4.26) $$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+The observed redshift defined by Eq. (4.12), then up to second order is
+
+$$
+1 + z = 1 + \bar{z} + \delta^{(1)}z + \frac{1}{2}\delta^{(2)}z = \frac{\mathcal{E}_s}{\mathcal{E}_o} = \frac{(\bar{\mathcal{E}} + \delta^{(1)}\mathcal{E} + \frac{1}{2}\delta^{(2)}\mathcal{E})_s}{(\bar{\mathcal{E}} + \delta^{(1)}\mathcal{E} + \frac{1}{2}\delta^{(2)}\mathcal{E})_o}. \quad (4.27)
+$$
+
+Note that in general, the expansion of the perturbed quotient up to second order is
+
+$$
+\frac{A + \delta^{(1)}A + \frac{1}{2}\delta^{(2)}A}{B + \delta^{(1)}B + \frac{1}{2}\delta^{(2)}B} = \frac{A}{B} \left( 1 + \frac{\delta^{(1)}A}{A} - \frac{\delta^{(1)}B}{B} + \frac{\delta^{(2)}A}{2A} - \frac{\delta^{(2)}B}{2B} - \frac{\delta^{(1)}A}{A} \frac{\delta^{(1)}B}{B} + \left[ \frac{\delta^{(1)}B}{B} \right]^2 \right). \tag{4.28}
+$$
+
+Using Eqs. (4.27) and (4.28), and ignoring the background redshift, we obtain
+
+$$
+1+z = 1 + (\delta^{(1)}\mathcal{E}|_{s} - \delta^{(1)}\mathcal{E}|_{o}) - \delta^{(1)}\mathcal{E}|_{s}\delta^{(1)}\mathcal{E}|_{o} + (\delta^{(1)}\mathcal{E}|_{o})^2 + \frac{1}{2}(\delta^{(2)}\mathcal{E}|_{s} - \delta^{(2)}\mathcal{E}|_{o}). \quad (4.29)
+$$
+
+where we defined the perturbed redshift $\delta z$ relative to the flat background, where
+the background value is zero. From Eq. (4.29) the redshift of a source $s$ is, at first
+order,
+
+$$
+\delta^{(1)}z = -(v_{1i}n^i + \Phi_1)|_o^s + \int_{\lambda_o}^{\lambda_s} [\Phi'_1 + \Psi'_1] d\lambda, \quad (4.30)
+$$
+
+where the integral runs with respect to the affine parameter $\lambda$ along the line of sight.
+In Eq. (4.30) we identify the following elements:
+
+a) *Doppler redshift*, which depends on the difference between the peculiar velocities of the source and the observer
+
+$$
+\delta^{(1)} z_{\text{Doppler}} = (v_{1i} n^i)_o - (v_{1i} n^i)_s . \qquad (4.31)
+$$
+
+b) *Gravitational redshift*, which describes the change of energy the photon experiences when it travels from a region with potential $\Phi_1|_s$ to a region with potential $\Phi_1|_o$
+
+$$
+\delta^{(1)} z_{\text{gravitational}} = \Phi_1|_o - \Phi_1|_s. \tag{4.32}
+$$
+
+c) The Integrated Sachs-Wolfe (ISW) effect, which describes the change in energy when a photon travels through a potential well between the source and the observer. This effect is only non-zero when the gravitational potential evolves during and along the photon's trajectory, so that the energy gained by going down the gravitational potential does not cancel out with the energy lost by
+---PAGE_BREAK---
+
+## 4. Galaxy Number Counts
+
+climbing out the potential at the other end,
+
+$$ \delta^{(1)}z_{\text{ISW}} = \int_{\lambda_o}^{\lambda_s} [\Phi_1' + \Psi_1'] d\lambda. \quad (4.33) $$
+
+At second order the redshift (B.17) can also be decomposed as above
+
+$$ \delta^{(2)}z = \delta^{(2)}z_{\text{Doppler}} + \delta^{(2)}z_{\text{gravitational}} + \delta^{(2)}z_{\text{ISW}} + \delta^{(2)}z_{\text{NL}}, \quad (4.34) $$
+
+where the nonlinear contribution from squared first order quantities denoted by ‘NL’
+is given by
+
+$$ \begin{aligned} \delta^{(2)} z_{\text{NL}} = & \delta^{(2)} z_{\text{gravitational} \times \text{gravitational}} + \delta^{(2)} z_{\text{gravitational} \times \text{ISW}} + \delta^{(2)} z_{\text{ISW}} \\ & + \delta^{(2)} z_{\text{gravitational} \times \text{Doppler}} + \delta^{(2)} z_{\text{Doppler} \times \text{Doppler}} + \delta^{(2)} z_{\text{Doppler} \times \text{ISW}}. \end{aligned} \quad (4.35) $$
+
+Here, just as in the linear case, we have
+
+(a) Nonlinear doppler redshift
+
+$$ \delta^{(2)} z_{\text{Doppler}} = \frac{1}{2} [ (v_{2i} n^i)_o - (v_{2i} n^i)_s ], $$
+
+(b) Nonlinear gravitational redshift
+
+$$ \delta^{(2)} z_{\text{gravitational}} = \frac{1}{2} [\Phi_2|_o - \Phi_2|_s], $$
+
+(c) Nonlinear ISW
+
+$$ \delta^{(2)} z_{\text{ISW}} = \frac{1}{2} \int_{\lambda_o}^{\lambda_s} (\Phi'_2 + \Psi'_2) d\lambda, $$
+
+Here the second order contribution to the effects described above are evident, plus
+the product of first order contributions:
+
+(1) Gravitational redshift squared
+
+$$ \delta^{(2)} z_{\text{gravitational} \times \text{gravitational}} = -\frac{3}{2} (\Phi_1|_s - \Phi_1|_o)^2 + 6\Phi_1|_s \Phi_1|_o, $$
+
+(2) Gravitational redshift × ISW
+
+$$ \delta^{(2)} z_{\text{gravitational} \times \text{ISW}} = 2 (\Phi_1|_s - \Phi_1|_o) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1'), $$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+(3) Gravitational redshift × Doppler
+
+$$
+\delta^{(2)} z_{\text{gravitational} \times \text{Doppler}} = \Phi_1|_o (v_{1i} n^i)_s - \Phi_1|_s (v_{1i} n^i)_o - 2 \Psi_1|_o (v_{1i} n^i)_o,
+$$
+
+(4) Doppler squared
+
+$$
+\delta^{(2)} z_{\text{Doppler} \times \text{Doppler}} = \frac{1}{2} \left[ (v_{1k} v_1^k)_s - (v_{1k} v_1^k)_o \right] - (v_{1i} n^i)_o \left[ (v_{1i} n^i)_s - (v_{1i} n^i)_o \right],
+$$
+
+(5) Doppler × ISW
+
+$$
+\delta^{(2)} z_{\text{Doppler} \times \text{ISW}} = (v_{1i} n^i)_o \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi'_1 + \Psi'_1) + 2v_{1i} \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1^{,i} + \Psi_1^{,i}),
+$$
+
+(6) Integrated ISW
+
+$$
+\begin{align*}
+\delta^{(2)} z_{\text{ISW}} &= 2 \int_{\lambda_o}^{\lambda_s} d\lambda [\Psi_1' (\Phi_1 + \Psi_1)] + 2 \int_{\lambda_o}^{\lambda_s} d\lambda \left[ \Phi_1 \left( \frac{d\Phi_1}{d\lambda} - 2\frac{d\Psi_1}{d\lambda} \right) \right] \\
+&\quad - 4 \int_{\lambda_o}^{\lambda_s} d\lambda [(\Psi_1 \Phi_{1,i} - \Phi_1 \Psi_{1,i}) n^i] + 4 \int_{\lambda_o}^{\lambda_s} d\lambda [n^i \Phi_{1,i} (\Phi_1 - \Psi_1)] \\
+&\quad + \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & 2 (\Phi_1' - \Psi_1') \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \\
+ & - n^i (\Phi_{1,i} + \Psi_{1,i}) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + \left(\frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda}\right) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')
+ \end{aligned}
+ \right. \\
+&+ 2 (\Phi_1 - \Psi_1) n^i \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i} \\
+&+ \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)^{,i} \right) \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i} \right) \\
+&- n^i \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i} \right) \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \right)
+\end{align*}
+$$
+
+4.4. Distance determinations and the observed
+volume
+
+4.4.1. Angular Diameter Distance
+
+To measure the angular diameter distance ($d_A$) introduced in Section 4.2.3, we must
+define a projector into the screen space perpendicular to the light-ray as shown
+in Fig. 4.3. The screen space is orthogonal to the light-ray *and* to the observer
+---PAGE_BREAK---
+
+4-velocity. In fact, the tensor
+
+$$
+\mathcal{P}_{\mu\nu} = g_{\mu\nu} + u_{\mu}u_{\nu} - n_{\mu}n_{\nu}, \tag{4.36}
+$$
+
+where $g_{\mu\nu}$ is the metric, $u_{\mu}$ is the 4-velocity and $n_{\mu}$ is the 4-direction of observation$^2$, projects 4-vectors onto screen space, as can be seen in Fig. 4.2. The projector tensor satisfies the relations
+
+$$
+\mathcal{P}_{\mu}{}^{\mu} = 2, \quad \mathcal{P}_{\mu\alpha}\mathcal{P}^{\alpha}{}_{\nu} = \mathcal{P}_{\mu\nu}, \quad \mathcal{P}_{\mu\nu}k^{\nu} = \mathcal{P}_{\mu\nu}u^{\nu} = \mathcal{P}_{\mu\nu}n^{\nu} = 0. \tag{4.37}
+$$
+
+The null expansion, $\theta$, and null shear, $\Sigma_{\mu\nu}$, are optical properties given in terms of the tangent vector $k^\mu$ by [16, 27, 64]
+
+$$
+\theta = \mathcal{P}^{\mu\nu} \nabla_{\mu} k_{\nu},
+$$
+
+$$
+\Sigma_{\mu\nu} = \mathcal{P}_{(\mu}{}^{\sigma} \mathcal{P}_{\nu)}{}^{\rho} \nabla_{\sigma} k_{\rho} - \frac{1}{2} \theta \mathcal{P}_{\mu\nu}. \quad (4.39)
+$$
+
+Here, $\theta$ describes the rate of expansion of the projected area of a bundle of light-rays and $\Sigma_{\mu\nu}$ describes its rate of shear illustrated in Fig. 4.3. Note that the wavevector can be obtained from a scalar potential ($S$), i.e. $k_\mu = \nabla_\mu S$, and thus there is no null vorticity, that is $\omega \equiv \nabla_{[\mu}k_{\nu]} = 0$ [95].
+
+To understand how the null expansion and the null shear evolve along the tra-
+jectory parametrised with the affine parameter, one can use the Sachs propagation
+equations, so the “null evolution” is given by (see e.g. Ref. [27] for full derivation)
+
+$$
+\frac{d\theta}{d\lambda} = -\frac{1}{2}\theta^2 - \Sigma_{\mu\nu}\Sigma^{\mu\nu} - R_{\mu\nu}k^{\mu}k^{\nu}, \quad (4.40)
+$$
+
+$$
+\frac{d\Sigma_{\mu\nu}}{d\lambda} = -\Sigma_{\mu\nu}\theta + C_{\mu\rho\nu\sigma}k^{\rho}k^{\sigma}, \quad (4.41)
+$$
+
+where $C_{\mu\rho\nu\sigma}$ is the Weyl tensor.
+
+Eqs. (4.40) and (4.41) allow us to compute the angular diameter distance as a parametric function depending only on the affine parameter $\lambda$, in contrast to previous works where the dependency is on the redshift [31–33] or the conformal time [35]. The advantages of maintaining this dependency are discussed in section 4.8.
+
+From Eqs. (4.13) and (4.40) we obtain a second order differential equation for the
+
+$^2$Note that in the background, $n^\mu = a^{-1}[0, n^i]$.
+---PAGE_BREAK---
+
+area distance,
+
+$$ \frac{d^2 d_A}{d\lambda^2} = -\frac{1}{2} (R_{\mu\nu} k^\mu k^\nu + \Sigma_{\mu\nu} \Sigma^{\mu\nu}) d_A. \quad (4.42) $$
+
+We require appropriate initial conditions to solve (4.42). These can be found from
+the series expansion of the squared distance given by Kristian and Sachs in [26]:
+
+$$ d_A^2(\lambda_s) = (u_\mu k^\mu)_o^2 (\lambda_o - \lambda_s) \left[ 1 - \frac{1}{6} (R_{\mu\nu} k^\mu k^\nu)_o (\lambda_o - \lambda_s)^2 + \dots \right], \quad (4.43) $$
+
+from where we obtain the boundary conditions at the observer
+
+$$ d_A(\lambda_o) = 0, \quad \text{and,} \quad \left. \frac{dd_A}{d\lambda} \right|_o = -\mathcal{E}_o. \qquad (4.44) $$
+
+In this section, we define a conformal metric $g_{\mu\nu} = a^{-2}\hat{g}_{\mu\nu}$ useful to compute
+the angular diameter distance. In our notation, a hat ($\hat$) denotes quantities on the
+physical spacetime, while quantities on the conformal spacetime have no hat. The
+background of the metric $g_{\mu\nu}$ is Minkowski spacetime, which simplifies both the
+equations and the calculations.
+
+Conformal maps preserve both angles and shapes of infinitesimally small figures,
+but not their overall size [96]. The conformal transformation $\hat{g}_{\mu\nu} \rightarrow g_{\mu\nu}$ maps the
+null geodesic equation of the perturbed FLRW metric $\hat{g}_{\mu\nu}$ to a null geodesic on the
+perturbed Minkowski metric $g_{\mu\nu}$ [97] and the angular diameter distance transforms
+as $\hat{d}_A = a d_A$. The affine parameter transforms as $d\lambda = a^{-2}d\hat{\lambda}$, so that the photon
+ray vector transforms as $\hat{k}^\mu = a^{-2}k^\mu \Longleftrightarrow \hat{k}_\mu = k_\mu$ [62]. For the 4-velocity we have
+$\hat{u}_\mu = au_\mu$. Finally, the energy transforms as $\hat{\mathcal{E}} = -\hat{u}_\nu \hat{k}^\nu = -a^{-1}u_\nu k^\nu = a^{-1}\mathcal{E}$.
+
+Hereafter, and until the end of this section, we will be working in a perturbed
+Minkowski spacetime, in order to finally conformally transform our result back to a
+FLRW spacetime.
+
+In the Minkowski background, Eq. (4.42) simplifies to
+
+$$ \frac{d^2 \bar{d}_A}{d\lambda^2} = 0, \qquad (4.45) $$
+
+since $\bar{R}_{\mu\nu}$ and the shear vanish in the background. The solution is then
+
+$$ \bar{d}_A = C_1 + \lambda C_2. \qquad (4.46) $$
+
+The initial conditions given in Eq. (4.44) give $C_1 = 0$ and $C_2 = -1$, so that
+
+$$ \bar{d}_A(\lambda_s) = \lambda_o - \lambda_s. \qquad (4.47) $$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+Mapping this into the FLRW background we get for the angular diameter distance
+
+$$
+\hat{d}_A(\hat{\lambda}_s) = a(\hat{\lambda}_s) (\hat{\lambda}_o - \hat{\lambda}_s), \quad (4.48)
+$$
+
+which can be expressed in terms of the comoving distance (4.9) as
+
+$$
+\hat{d}_{A}(\hat{z}) = \frac{\chi(\hat{z})}{1 + \hat{z}}, \tag{4.49}
+$$
+
+where we have used the definition of the scale factor $a(\hat{z}) = 1/(1+\hat{z})$ and used
+the fact that the comoving distance depends on the redshift as given in Eq. (4.10).
+Eqs. (4.49) and (4.10) will be useful when we are comparing our work with results
+in the literature.
+
+In general, at first order Eq. (4.42) takes the form
+
+$$
+\frac{d^2 \delta^{(1)} d_A}{d\lambda^2} = -\frac{1}{2} [2 \bar{R}_{\mu\nu} \bar{k}^\mu \delta^{(1)} k^\nu \bar{d}_A + \delta^{(1)} R_{\mu\nu} \bar{k}^\mu \bar{k}^\nu \bar{d}_A + \bar{R}_{\mu\nu} \bar{k}^\mu \bar{k}^\nu \delta^{(1)} d_A] - \bar{d}'_A \frac{d\delta^{(1)}\nu}{d\lambda} - 2 \bar{d}''_A \delta^{(1)}\nu, \quad (4.50)
+$$
+
+where we use that in the background the affine parameter is related to the conformal
+time like dλ = dη, so that
+
+$$
+\frac{d\bar{d}_A}{d\eta} = \frac{d\bar{d}_A}{d\lambda}. \tag{4.51}
+$$
+
+This relation is only fulfilled in the background, once perturbations are introduced
+the relation between the affine parameter and time becomes non-trivial.
+
+In Minkowski spacetime, Eq. (4.50) simplifies to
+
+$$
+\begin{equation}
+\frac{d^2 \delta^{(1)} d_A}{d\lambda^2} = -\frac{1}{2} \bar{d}_A \left[ 2 \left( \frac{d^2 \Psi_1}{d\lambda^2} \right) + \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\bar{d}_A} \frac{d\delta^{(1)}\nu}{d\lambda} \right], \tag{4.52}
+\end{equation}
+$$
+
+where we used the background solution for $d_A$ (4.47), the first order perturbation of
+the Ricci tensor $\delta^{(1)} R_{\mu\nu}$ given in Appendix B.2, and Eqs. (4.2) and (4.3).
+
+The solution to (4.52) is, upon several integrations by parts,
+
+$$
+\begin{equation}
+\begin{split}
+\frac{\delta^{(1)} d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} ={}& \Phi_1|_o - \Psi_1|_o - \Psi_1|_s - (v_{1i}n^i)_o - \frac{1}{\lambda_o - \lambda_s} \left\{
+ \begin{aligned}[t]
+ & 2 \int_{\lambda_o}^{\lambda_s} d\lambda \Psi_1 \\
+ & + \frac{1}{2} \int_{\lambda_o}^{\lambda_s} d\lambda (\lambda_s - \lambda)(\lambda_o - \lambda) [\nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij}] \\
+ & \qquad - \frac{2}{\lambda_o - \lambda_s} \frac{d\delta^{(1)}\nu}{d\lambda}
+ \end{aligned}
+ \right\}.
+\end{split}
+\tag{4.53}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+From Eq. (4.44), in general
+
+$$
+\delta^{(n)} d_A(\lambda_o) = 0, \quad \text{and,} \quad \left. \frac{\mathrm{d}\delta^{(n)}d_A}{\mathrm{d}\lambda} \right|_o = -\delta^{(n)}\mathcal{E}_o. \qquad (4.54)
+$$
+
+In the absence of anisotropic stress, $\Phi_1 = \Psi_1$ (see, e.g. Ref. [16]), we recover in Eq. (4.53) the fully relativistic lensing convergence, usually denoted as $\kappa$ [30, 35, 65, 95], at first order, which includes Sachs-Wolfe (SW), Integrated Sachs-Wolfe (ISW) and Doppler terms in addition to the standard lensing integral
+
+$$
+\begin{equation}
+\begin{split}
+\frac{\delta^{(1)} d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} &= -\Phi_1|_s - (v_{1i} n^i)_o - \frac{1}{\lambda_o - \lambda_s} \left\{ \begin{aligned}[t]
+&2 \int_{\lambda_o}^{\lambda_s} d\lambda \Phi_1 \\
+&+ \int_{\lambda_o}^{\lambda_s} d\lambda (\lambda_s - \lambda) (\lambda_o - \lambda) \left[ \nabla^2 (\Phi_1) - n^i n^j (\Phi_1)_{,ij} - \frac{1}{\lambda_o - \lambda_s} \frac{d\delta^{(1)}\nu}{d\lambda} \right] \end{aligned} \right\}
+\end{split}
+\tag{4.55}
+\end{equation}
+$$
+
+In Ref. [32], to simplify notation the authors define the Laplacian operator transverse
+to the radial direction by
+
+$$
+\nabla_{\perp}^2 X = \nabla^2(X) - n^i n^j (X)_{,ij} - \frac{2}{\lambda_o - \lambda_s} \frac{dX}{d\lambda}. \quad (4.56)
+$$
+
+Using Eqs. (4.18) and (4.56), Eq. (4.55) can be further simplified into
+
+$$
+\frac{\delta^{(1)} d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} = -\Phi_1|_s - (v_{1i} n^i)_o - \frac{1}{\lambda_o - \lambda_s} \left\{
+\begin{aligned}
+& 2 \int_{\lambda_o}^{\lambda_s} d\lambda \Phi_1 + \int_{\lambda_o}^{\lambda_s} d\lambda (\lambda_s - \lambda)(\lambda_o - \lambda) \nabla_{\perp}^2 \Phi_1 \\
+& - 2 [\bar{k}^\mu \bar{k}^\nu \delta^{(1)} R_{\mu\nu}] \delta^{(1)} d_A \\
+& - 2 [\bar{k}^\mu \bar{k}^\nu \delta^{(1)} R_{\mu\nu}] \delta^{(1)} d_A \\
+& - 2 [\delta^{(2)} \nu + (\delta^{(1)} \nu)^2] \bar{d}_A'' - \left(\frac{d\delta^{(2)} \nu}{d\lambda}\right) \bar{d}_A' - 4 (\delta^{(1)} \nu) (\delta^{(1)} d_A'') \\
+& - 2 [\bar{k}^\mu \bar{k}^\alpha \Gamma_{\mu\alpha} + \frac{d\delta^{(1)} \nu}{d\lambda}] \delta^{(1)} d_A'
+\end{aligned}
+\right\}, \quad (4.57)
+$$
+
+which is exactly what the authors obtain in Ref. [32]. In this thesis, we will not use
+(4.56) further as this expansion was for comparison with Ref. [32] only.
+
+At second order, Eq. (4.42) takes the form
+
+$$
+\begin{equation}
+\begin{aligned}
+\frac{\mathrm{d}^2 \delta^{(2)} d_A}{\mathrm{d}\lambda^2} &= -\left[2\bar{k}^\mu \delta^{(1)} k^\nu \delta^{(1)} R_{\mu\nu} + \frac{1}{2}\bar{k}^\mu \bar{k}^\nu \delta^{(2)} R_{\mu\nu} + \delta^{(1)} \Sigma_{\mu\nu} \delta^{(1)} \Sigma^{\mu\nu}\right] \bar{d}_A \\
+&\quad -[\bar{k}^\mu \bar{k}^\nu \delta^{(1)} R_{\mu\nu}] \delta^{(1)} d_A - 2[\delta^{(1)} k^\mu \nabla_\mu \delta^{(1)} \nu + 3\delta^{(1)} k^\mu \bar{k}^\alpha \Gamma^0_{\mu\alpha}] \bar{d}_A' \\
+&\quad -2[\delta^{(2)} \nu + (\delta^{(1)} \nu)^2] \bar{d}_A'' - \left(\frac{\mathrm{d}\delta^{(2)} \nu}{\mathrm{d}\lambda}\right) \bar{d}_A' - 4(\delta^{(1)} \nu)(\delta^{(1)} d_A'') \\
+&\quad -2[\bar{k}^\mu \bar{k}^\alpha \Gamma_{\mu\alpha} + \frac{\mathrm{d}\delta^{(1)} \nu}{\mathrm{d}\lambda}] \delta^{(1)} d_A',
+\end{aligned}
+\tag{4.58}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+where $\delta^{(1)}\Sigma_{\mu\nu}$ is the linear perturbation to the shear. Using Eq. (4.39) we obtain
+
+$$ \frac{d\delta^{(1)}\Sigma_{ij}}{d\lambda} = \frac{1}{2}\delta_{ij}\nabla^2(\Phi_1 + \Psi_1) - (\Phi_1 + \Psi_1)_{,ij}. \quad (4.59) $$
+
+Without loss of generality, we set the perturbation of the shear at the observer $\delta^{(1)}\Sigma^{\mu\nu}|_o = 0$, and integrating along the line of sight from the observer to the source ($\lambda_o$ to $\lambda_s$), we obtain
+
+$$ \delta^{(1)}\Sigma_{ij} = \int_{\lambda_o}^{\lambda_s} d\lambda \left[ \frac{1}{2} \delta_{ij} \nabla^2 (\Phi_1 + \Psi_1) - (\Phi_1 + \Psi_1)_{,ij} \right]. \quad (4.60) $$
+
+The contraction $\delta^{(1)}\Sigma_{ij}\delta^{(1)}\Sigma^{ij}$ is given by
+
+$$ \begin{align} \delta^{(1)}\Sigma_{ij}\delta^{(1)}\Sigma^{ij} &= \left[ \int_{\lambda_o}^{\lambda_s} d\lambda \left[ \frac{1}{2}\delta_{ij}\nabla^2(\Phi_1 + \Psi_1) - (\Phi_1 + \Psi_1)_{,ij} \right] \right] \times \nonumber \\ &\qquad \left[ \int_{\lambda_o}^{\lambda_s} d\lambda \left[ \frac{1}{2}\delta^{ij}\nabla^2(\Phi_1 + \Psi_1) - (\Phi_1 + \Psi_1)_{,ij}^{,ij} \right] \right], \tag{4.61} \\ &= \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,ij} \right) \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,ij}^{,ij} \right) - \frac{1}{4} \left[ \int_{\lambda_o}^{\lambda_s} d\lambda \nabla^2 (\Phi_1 + \Psi_1) \right]^2. \nonumber \end{align} $$
+
+In Eq. (B.19) we find the second order part of the diameter distance, using the background solution for $\bar{d}_A$, and the full expression $\delta^{(2)}R_{\mu\nu}$, the second order perturbation of the Ricci tensor given in Appendix B.2.
+
+Thus, the total area distance as a function of the affine parameter in a perturbed FLRW spacetime is given by
+
+$$ \hat{d}_A(\lambda_s) = a(\lambda_s)(\lambda_o - \lambda_s) \left[ 1 + \frac{\delta^{(1)}d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} + \frac{1}{2} \frac{\delta^{(2)}d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} \right], \quad (4.62) $$
+
+where the solutions for $\bar{d}_A(\lambda_s)$, $\delta^{(1)}d_A(\lambda_s)$ and $\delta^{(2)}d_A(\lambda_s)$ are given in Eqs. (4.47), (4.53) and (B.19), respectively. From here onwards, we abandon the conformal Minkowski spacetime and return to FLRW.
+
+### 4.4.2. Area distance as a function of observed redshift
+
+In order to compare with previous work done in the literature, we can convert the angular diameter distance in terms of the affine parameter to a function of the observed redshift. To do so, we need to perturbatively invert $z(\lambda)$ into $\lambda(z)$ and substitute this into Eq. (4.62). This means we need $d_A$ on surfaces of constant
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+observed redshift $z$ rather than on surfaces of constant affine parameter $\lambda$, which is
+not observable.
+
+We expand the affine parameter in perturbation theory as
+
+$$
+\lambda = \zeta + \delta^{(1)}\lambda + \frac{1}{2}\delta^{(2)}\lambda, \tag{4.63}
+$$
+
+where $\zeta$ is the affine parameter in redshift space corresponding to the redshift $\hat{z}$, as
+if there were no perturbations [32]. We define $\zeta$ using as an anchor the background
+relation
+
+$$
+a(\zeta) = \frac{1}{1+\hat{\zeta}}, \tag{4.64}
+$$
+
+with this relation we can fix $\delta^{(1)}\lambda$ and $\delta^{(2)}\lambda$, since it should always hold, and if
+there are any perturbations, they should cancel since Eq. (4.64) is only valid in the
+background. To begin with, we see that at any redshift $\hat{z}$, the derivatives of $a$ with
+respect to $\zeta$ are
+
+$$
+\begin{align*}
+\frac{1}{a} \frac{da}{d\zeta} &= \mathcal{H}(\zeta), \tag{4.65} \\
+\frac{1}{a} \frac{d^2 a}{d\zeta^2} &= \left[ \frac{d\mathcal{H}(\zeta)}{d\zeta} + \mathcal{H}^2(\zeta) \right]. \tag{4.66}
+\end{align*}
+$$
+
+We now expand the scale factor *a* about $\lambda$ up to and including second order pertur-
+bations as defined in Eq. (4.63), we have
+
+$$
+a(\lambda) = a(\zeta) \left[ 1 + \mathcal{H} \delta^{(1)} \lambda + \frac{1}{2} \mathcal{H} \delta^{(2)} \lambda + \frac{1}{2} \left( \frac{d\mathcal{H}}{d\lambda} + \mathcal{H}^2 \right) (\delta^{(1)}\lambda)^2 + \mathcal{O}((\delta^{(3)}\lambda))^2 \right] . \quad (4.67)
+$$
+
+Using Eqs. (4.27) and (4.67) we find that,
+
+$$
+\begin{equation}
+\begin{aligned}
+& \frac{1}{1+\hat{z}} = \frac{a(\zeta)}{a(\zeta_o)} \Biggl[ 1 + (\mathcal{H}\delta^{(1)}\lambda - \delta^{(1)}z) \\
+& \phantom{{}= \frac{1}{1+\hat{z}} = \frac{a(\zeta)}{a(\zeta_o)} \Biggl[} + \frac{1}{2} \left\{
+\begin{aligned}[t]
+& \mathcal{H}\delta^{(2)}\lambda - \delta^{(2)}z + 2(\delta^{(1)}z)^2 - 2\mathcal{H}\delta^{(1)}\lambda\delta^{(1)}z \\
+& + \left(\frac{d\mathcal{H}}{d\zeta} + \mathcal{H}^2\right) (\delta^{(1)}\lambda)^2
+\end{aligned}
+\right\} \Biggr].
+\end{aligned}
+\tag{4.68}
+\end{equation}
+$$
+
+From the background relation given in Eq. (4.64) and (4.68) we then find that the
+perturbations to the affine parameter must follow the following relations:
+
+$$
+\begin{align}
+\delta^{(1)}\lambda &= \frac{\delta^{(1)}z}{\mathcal{H}}, && (4.69) \\
+\delta^{(2)}\lambda &= \frac{1}{\mathcal{H}} \left[ \delta^{(2)}z - (\delta^{(1)}z)^2 \left( 1 + \frac{1}{\mathcal{H}^2} \frac{d\mathcal{H}}{d\zeta} \right) \right]. && (4.70)
+\end{align}
+$$
+---PAGE_BREAK---
+
+Finally, using these relations to substitute for $a(\lambda_s)$ ($\lambda_o - \lambda_s$), we find that the area
+distance (4.62) becomes
+
+$$
+\begin{equation}
+\begin{aligned}
+\hat{d}_A(\zeta) = a(\zeta)(\zeta_o - \zeta) & \left\{ 1 + \left[ \frac{\delta^{(1)}d_A}{\bar{d}_A}(\lambda) + \left(1 - \frac{1}{\zeta_o - \zeta}\delta^{(1)}z(\lambda)\right) \right] \right. \\
+& \left. \qquad + \frac{1}{2} \left[ \frac{\delta^{(2)}d_A}{\bar{d}_A}(\lambda) + \left(1 - \frac{1}{\zeta_o - \zeta}\delta^{(2)}z(\lambda)\right) + \frac{\mathcal{H}' - \mathcal{H}^2}{\mathcal{H}^3(\zeta_o - \zeta)} (\delta^{(1)}z)^2 \right. \right. \\
+& \left. \qquad \left. + 2 \left(1 - \frac{1}{\mathcal{H}(\zeta_o - \zeta)}\right) \frac{\delta^{(1)}d_A}{\bar{d}_A} \delta^{(1)}z \right] \right\}.
+\end{aligned}
+\tag{4.71}
+\end{equation}
+$$
+
+Up until here we have corrected the scale factor from the affine parameter $\lambda$ to $\zeta$. Now we need to convert the first order contributions because they give additional second order contributions. We introduce that, for a general first order quantity $\delta^{(1)}X$, converting to $\zeta$ gives
+
+$$
+\delta^{(1)} X(\lambda) = \delta^{(1)} X(\zeta) + \left. \frac{\partial \delta^{(1)} X}{\partial \lambda} \right|_{\zeta} \frac{\delta^{(1)} z(\zeta)}{\mathcal{H}}, \quad (4.72)
+$$
+
+where $\delta^{(1)}X(\zeta)$ is to be understood as substituting $\zeta$ in the expression for $\delta^{(1)}X(\lambda)$,
+i.e. $\delta^{(1)}X(\lambda \rightarrow \zeta)$. For $\partial_\lambda \delta^{(1)}X|_\zeta$ we are multiplying for a first order quantity, so it is
+taken to be a derivative evaluated in the background. Thus, we can write $d_\zeta \delta^{(1)}X$.
+With this, Eq. (4.71) finally becomes
+
+$$
+\begin{align}
+\hat{d}_A(\hat{z}) ={}& \frac{\zeta_o - \zeta}{1 + \hat{z}} \left\{
+ \begin{aligned}[t]
+ & 1 + \left[ \frac{\delta^{(1)} d_A}{\bar{d}_A} + \left(1 - \frac{1}{\mathcal{H}(\zeta_o - \zeta)}\right) \delta^{(1)} z \right] \\
+ & + \frac{1}{2} \left[ \frac{\delta^{(2)} d_A}{\bar{d}_A} + \left(1 - \frac{1}{\mathcal{H}(\zeta_o - \zeta)}\right) \delta^{(2)} z \right] \\
+ & + 2 \left(1 - \frac{1}{\mathcal{H}(\zeta_o - \zeta)}\right) \left( \frac{\delta^{(1)} d_A}{\bar{d}_A} + \frac{1}{\mathcal{H}} \frac{dz}{d\zeta} \right) \delta^{(1)} z \\
+ & + 2 \frac{d}{dz} \left( \frac{\delta^{(1)} d_A}{\bar{d}_A} \right) \frac{\delta^{(1)} z}{\mathcal{H}} + \frac{\mathcal{H}' - \mathcal{H}^2}{\mathcal{H}^3 (\zeta_o - \zeta)} (\delta^{(1)} z)^2
+ \end{aligned}
+\right\}. \tag{4.73}
+\end{align}
+$$
+
+We can now write the diameter distance as a function of the redshift, although it is
+written in terms of integrals over the comoving distance $\chi = \zeta_o - \zeta$, which depends
+on the redshift itself by Eq. (4.10).
+
+Using Eq. (4.73) written in terms of observable quantities such as the observable
+redshift and comoving distance, the angular diameter distance will, in principle,
+be measured with great accuracy by the upcoming surveys mentioned in Chapter
+1, and should complement to the known luminosity distance measurements quite
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+well. Alternatively, it can be use to compute the spherical harmonic expansion of $\hat{d}_A(\hat{z})$, which, then gives the deviation from the background geometry expected in the standard model. This latter ‘backreaction’ effect has been postulated to be both large and small, and is very important to calculate accurately, in order to correctly determine the background geometry and parameters [32].
+
+Combining Eqs. (4.30), (4.55) with (4.73), we have that at linear order the dia-
+meter distance as a function of redshift is given by,
+
+$$
+\begin{equation}
+\begin{aligned}
+\delta^{(1)} \hat{d}_A(\hat{z}_s) ={}& \frac{\chi_s}{1+\hat{z}_s} \left\{
+ \begin{aligned}[t]
+ & -\Psi_1|_s - \Psi_1|_o - \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_s + \left(2-\frac{2}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o \\
+ & \quad + \left(1-\frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_s + \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1'+\Psi_1') d\chi \\
+ & \quad - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi \\
+ & - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi-\chi_s) \chi \left[
+ \nabla^2 (\Phi_1+\Psi_1) - n^i n^j (\Phi_1+\Psi_1)_{,ij}
+ - \frac{2}{\chi} \frac{d\delta^{(1)\nu}}{d\zeta}
+ \right]
+ \end{aligned}
+\right\}.
+\end{aligned}
+\tag{4.74}
+\end{equation}
+$$
+
+The full expression for $\delta^{(2)}\hat{d}_A(\hat{z}_s)$ in terms of the metric potentials is given in Appendix B.3.
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+4.4.3. Physical Volume
+
+The area distance the light-ray bundle creates, changes along the line of sight as seen
+in Fig. 4.2, and we are interested in computing the volume that these hypersurfaces
+enclose, since therein lie the overdensities we are accounting for.
+
+The volume element (4.16) can be rewritten in terms of the quantities we have
+computed in the previous sections; the angular diameter distance in Eqs. (4.55) and
+(B.19), and the energy in Eqs. (4.23) and (4.24). It is given up to second order by,
+
+$$
+\begin{align}
+dV &= -\mathcal{E} d_A^2(\lambda) d\lambda d\Omega, \tag{4.75} \\
+&= -\bar{\mathcal{E}} \bar{d}_A^2 \Biggl[ \nonumber \\
+&\quad 1 + 2 \frac{\delta^{(1)} d_A}{\bar{d}_A} + \frac{\delta^{(1)} \mathcal{E}}{\bar{\mathcal{E}}} \nonumber \\
+&\quad + \left( \frac{\delta^{(1)} d_A}{\bar{d}_A} \right)^2 + \left( \frac{\delta^{(1)} \mathcal{E}}{\bar{\mathcal{E}}} \right) \left( \frac{\delta^{(1)} d_A}{\bar{d}_A} \right) + \frac{\delta^{(2)} d_A}{\bar{d}_A} + \frac{1}{2} \frac{\delta^{(2)} \mathcal{E}}{\bar{\mathcal{E}}} \Biggr] d\lambda d\Omega. \nonumber
+\end{align}
+$$
+
+The volume element is given in terms of the affine parameter $\lambda$, but we need to express our result in terms of the observed redshift $z$, and so we need to take the volume in bins of $dz$ instead of $d\lambda$. To do so we use the fact that we can write the affine parameter as a function of redshift, i.e. $\lambda(z)$, and using Eqs. (4.63), (4.69) and (4.70), we obtain the relation
+
+$$
+\begin{equation}
+\begin{split}
+\frac{d\lambda}{dz} ={}& -\frac{a}{H} \left[ 1 + \left( \frac{1}{H} + \frac{1}{H(1+\bar{z})} \right) \frac{d\delta^{(1)}z}{d\lambda} - \frac{\mathcal{H}'}{H^2} \delta^{(1)}z \right] \\
+& -\frac{a}{2H} \left[ \left( \frac{1}{H} + \frac{1}{H(1+\bar{z})} \right) \frac{d\delta^{(2)}z}{d\lambda} - \frac{\mathcal{H}'}{H^2}\delta^{(2)}z - \frac{\mathcal{H}'}{H^3(1+\bar{z})} \left( \frac{d\delta^{(1)}z}{d\lambda} \right) \delta^{(1)}z \right. \\
+& \left. + \frac{1}{H^2(1+\bar{z})} \left( 2 + \frac{1}{1+\bar{z}} \right) \left( \frac{d\delta^{(1)}z}{d\lambda} \right)^2 + \left( \frac{\mathcal{H}'}{H^2} \right) \left( 1 + \frac{\mathcal{H}'}{H^2} \right) (\delta^{(1)}z)^2 \right. \\
+& \left. - \frac{1}{H} \left( 2 \frac{(\mathcal{H}')^2}{H^2} - \frac{\mathcal{H}''}{H} \right) (\delta^{(1)}z)^2 - \frac{1}{H} \left( 1 + \frac{\mathcal{H}'}{H^2} \right) \frac{d}{d\lambda} \left[ (\delta^{(1)}z)^2 \right] ,
+\end{split}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+modifying Eq. (4.75) into
+
+$$
+\begin{align}
+dV(z) &= -\mathcal{E}(z)d_A^2(z) \left(\frac{d\lambda}{dz}\right) dz d\Omega, \nonumber \\
+&= \frac{\bar{\mathcal{E}} \bar{d}_A^2}{\mathcal{H}(1+z)} \Biggl[ 1 + \frac{2}{\mathcal{H}} \frac{d\delta^{(1)}z}{d\lambda} - \frac{\mathcal{H}'}{\mathcal{H}^2} \delta^{(1)}z + 2 \frac{\delta^{(1)}d_A}{\bar{d}_A} + \frac{\delta^{(1)}\mathcal{E}}{\bar{\mathcal{E}}} \nonumber \\
+&\quad - \frac{1}{\mathcal{H}} \frac{d\delta^{(2)}z}{d\lambda} + \frac{1}{2}\frac{\mathcal{H}'}{\mathcal{H}^2}\delta^{(2)}z - \frac{3}{2\mathcal{H}^2}\left(\frac{d\delta^{(1)}z}{d\lambda}\right)^2 - \frac{1}{2}\left(\frac{\mathcal{H}'}{\mathcal{H}^2}\right)\left(1+\frac{\mathcal{H}'}{\mathcal{H}^2}\right)\left(\delta^{(1)}z\right)^2 \nonumber \\
+&\quad + \frac{1}{2\mathcal{H}^2}\left(2\frac{(\mathcal{H}')^2}{\mathcal{H}^2} - \frac{\mathcal{H}''}{\mathcal{H}}\right)\left(\delta^{(1)}z\right)^2 + \frac{1}{2\mathcal{H}}\left(1+2\frac{\mathcal{H}'}{\mathcal{H}^2}\right)\left(\frac{d\delta^{(1)}z}{d\lambda}\right)\delta^{(1)}z \nonumber \\
+&\quad + \left(\frac{\delta^{(1)}d_A}{\bar{d}_A}\right)^2 + \left(\frac{\delta^{(1)}\mathcal{E}}{\bar{\mathcal{E}}}\right)\left(\frac{\delta^{(1)}d_A}{\bar{d}_A}\right) + \frac{\delta^{(2)}d_A}{\bar{d}_A} + \frac{1}{2}\frac{\delta^{(2)}\mathcal{E}}{\bar{\mathcal{E}}} \Biggr] dz d\Omega. \tag{4.77}
+\end{align}
+$$
+
+We now give an expression for the volume element order by order. In the back-
+ground we have
+
+$$
+d\bar{V} = -\bar{\mathcal{E}}\bar{d}_A^2 d\lambda d\Omega = a^2 (\lambda_s) [\lambda_s - \lambda_o]^2 d\lambda d\Omega, \quad (4.78)
+$$
+
+$$
+= \frac{\bar{\mathcal{E}} \bar{d}_A^2}{\mathcal{H}(1+z)} dz d\Omega = \frac{\chi^2}{\mathcal{H}(1+z)} dz d\Omega. \quad (4.79)
+$$
+
+From Eq. (4.77) and using Eqs. (B.14) and (4.74), we have that the first order
+perturbation to the physical volume is
+
+$$
+\begin{align}
+d\delta^{(1)}V &= \frac{\bar{\mathcal{E}} \bar{d}_A^2}{\mathcal{H}(1+z)} \left[ \frac{2}{\mathcal{H}} \frac{d\delta^{(1)}z}{dz} - \frac{\mathcal{H}'}{\mathcal{H}^2} \delta^{(1)}z + 2 \frac{\delta^{(1)}d_A}{\bar{d}_A} + \frac{\delta^{(1)}\mathcal{E}}{\bar{\mathcal{E}}} \right] dz d\Omega, \nonumber \\
+&= \frac{\chi^2}{\mathcal{H}(1+z)} \left[ \begin{aligned}[t]
+& \frac{2}{\mathcal{H}} \left( \Psi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{dz} \right) - 2(\Phi_1 + \Psi_1) - 3(v_{1i}n^i) \\
+& + \left( \frac{\mathcal{H}'}{\mathcal{H}^2} + \frac{2}{\mathcal{H}\chi} \right) \left( \Phi_1 - (v_{1i}n^i) + \int_0^\chi d\tilde{\chi} (\Phi_1' + \Psi_1') \right) - \frac{4}{\chi} \int_0^\chi d\tilde{\chi} \Psi_1 \\
+& - \frac{1}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left\{
+ \begin{aligned}[t]
+ & \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\tilde{\chi}} \frac{d\delta^{(1)\nu}}{dz}
+ \end{aligned}
+ \right\} \\
+& + 3 \int_0^\chi d\tilde{\chi} (\Phi_1' + \Psi_1')
+\end{aligned} \right] dz d\Omega, \tag{4.80}
+\end{align}
+$$
+
+and using Eqs. (B.15) and (B.19) we find that the second order perturbation to the
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+physical volume is
+
+$$
+\begin{equation}
+\begin{aligned}
+d\delta^{(2)}V = \frac{\bar{\mathcal{E}} d_A^2}{\mathcal{H}(1+z)} & \left[ -\frac{1}{\mathcal{H}} \frac{d\delta^{(2)}z}{d\lambda} + \frac{1}{2}\frac{\mathcal{H}'}{\mathcal{H}^2}\delta^{(2)}z - \frac{3}{2\mathcal{H}^2}\left(\frac{d\delta^{(1)}z}{d\lambda}\right)^2 - \frac{1}{2}\left(\frac{\mathcal{H}'}{\mathcal{H}^2}\right)\left(1+\frac{\mathcal{H}'}{\mathcal{H}^2}\right)(\delta^{(1)}z)^2 \right. \\
+& \left. + \frac{1}{2\mathcal{H}^2}\left(2\left(\frac{\mathcal{H}'}{\mathcal{H}^2}\right)^2 - \frac{\mathcal{H}''}{\mathcal{H}}\right)(\delta^{(1)}z)^2 + \frac{1}{2\mathcal{H}}\left(1+2\frac{\mathcal{H}'}{\mathcal{H}^2}\right)\left(\frac{d\delta^{(1)}z}{d\lambda}\right)\delta^{(1)}z \right. \\
+& \left. + \left(\frac{\delta^{(1)}d_A}{\bar{d}_A}\right)^2 + \left(\frac{\delta^{(1)}\mathcal{E}}{\bar{\mathcal{E}}}\right)\left(\frac{\delta^{(1)}d_A}{\bar{d}_A}\right) + \frac{\delta^{(2)}d_A}{\bar{d}_A} + \frac{1}{2}\frac{\delta^{(2)}\mathcal{E}}{\bar{\mathcal{E}}} \right] dz d\Omega.
+\end{aligned}
+\tag{4.81}
+\end{equation}
+$$
+
+and the full expression in terms of the metric potentials is given in Appendix B.3.
+
+With this expansion at hand, we have all the necessary quantities to compute our main result of the galaxy number density up to second order in the next section.
+
+**4.5. Galaxy number density**
+
+In this section, we compute our main result; the galaxy number overdensity at second order. Here, $V(n^i, z)$ is the physical survey volume density per redshift bin per solid angle given by (4.16), where $n^i$ is the direction of observation and $z = z(\lambda_s)$. The volume is a perturbed quantity since the solid angle of observation as well as the redshift bin are distorted between the source and the observer
+
+$$
+V(n^i, z) = \bar{V}(z) + \delta^{(1)}V(n^i, z) + \frac{1}{2}\delta^{(2)}V(n^i, z). \quad (4.82)
+$$
+
+In Eqs. (4.80) and (B.21) we provide the first and second order perturbations to the volume, respectively. **Note.** We use $\delta(dV)/d\bar{V}$ where other authors in the literature use $\delta V/\bar{V}$ (see, e.g. Ref [30]).
+
+In a galaxy redshift survey, we measure the number of galaxies in direction $n^i$ at redshift $z$. Let us call this $N(n^i, z)d\Omega_n dz$, where $d\Omega_n$ is the solid angle the survey spans. Then one must average over the angles to obtain their redshift distribution, $\langle N \rangle(z)dz$, where the angle brackets correspond to this angular average [98]
+
+$$
+\langle N \rangle(z) dz = dz \int_{\Omega_n} N(n^i, z) d\Omega, \quad (4.83)
+$$
+
+where the integral is over the solid angle the survey spans.
+
+We can then build the matter density perturbation, number density contrast, in
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+redshift space, i.e. the perturbation variable [30]
+
+$$
+\delta_z(n^i, z) \equiv \frac{\rho(n^i, z) - \langle\rho\rangle(z)}{\langle\rho\rangle(z)}. \qquad (4.84)
+$$
+
+and expand it up to second order as
+
+$$
+\delta_z(n^i, z) = \delta_z^{(1)}(n^i, z) + \frac{1}{2} \delta_z^{(2)}(n^i, z). \tag{4.85}
+$$
+
+Our aim in this chapter is to compute the observed matter number density per-
+turbation since the density of sources is proportional to the number of the sources
+within a given volume, i.e.
+
+$$
+\rho(n^i, z) = \frac{N(n^i, z)}{V(n^i, z)}, \tag{4.86}
+$$
+
+and expanding Eq. (4.86) we show that at any order
+
+$$
+\delta_z(n^i, z) = \frac{N(n^i, z) - \langle N \rangle(z)}{\langle N \rangle(z)} - \frac{\delta V(n^i, z)}{V(z)}. \quad (4.87)
+$$
+
+The observed quantity is the perturbation in the number density of galaxies, $\Delta$, and it is defined as
+
+$$
+\Delta(n^i, z) \equiv \frac{N(n^i, z) - \langle N \rangle(z)}{\langle N \rangle(z)} = \delta_z(n^i, z) + \frac{\delta V(n^i, z)}{V(z)}, \quad (4.88)
+$$
+
+and so we have that
+
+$$
+\Delta_g^{(1)}(n^i, z) = \delta_z^{(1)}(n^i, z) + \frac{\delta^{(1)}V(n^i, z)}{\bar{V}(z)}, \quad (4.89)
+$$
+
+$$
+\Delta_g^{(2)}(n^i, z) = \delta_z^{(2)}(n^i, z) + \frac{\delta^{(2)}V(n^i, z)}{\bar{V}(z)} + \delta_z^{(1)}(n^i, z) \frac{\delta^{(1)}V(n^i, z)}{\bar{V}(z)}. \quad (4.90)
+$$
+
+In order to compute the above, let us first relate $\delta_z(n^i, z)$ to the matter density quantity $\delta(x^i, \eta)$ and the perturbations on the redshift computed in Section 4.2. The
+---PAGE_BREAK---
+
+redshift density up to second order in redshift space is
+
+$$
+\begin{align}
+\delta_z(n^i, z) &= \frac{\rho(n^i, z) - \bar{\rho}(z)}{\bar{\rho}(z)} = \frac{\bar{\rho}(z) + \delta^{(1)}\rho(n^i, z) + \frac{1}{2}\delta^{(2)}\rho(n^i, z) - \bar{\rho}(z)}{\bar{\rho}(z)} \tag{4.91} \\
+&= \frac{\bar{\rho}(\bar{z}) + \delta^{(1)}z + \delta^{(2)}z + \delta^{(1)}\rho(n^i, z) + \frac{1}{2}\delta^{(2)}\rho(n^i, z) - \bar{\rho}(z)}{\bar{\rho}(z)} \nonumber \\
+&= \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + \frac{d\bar{\rho}\delta^{(1)}z(n^i, z)}{d\bar{z}\bar{\rho}(\bar{z})} \nonumber \\
+&\quad + \frac{1}{2}\frac{\delta^{(2)}\rho(n^i, z)}{\bar{\rho}(z)} + \frac{1}{2}\frac{d\bar{\rho}\delta^{(2)}z(n^i, z)}{d\bar{z}\bar{\rho}(\bar{z})} + \frac{1}{2}\frac{d^2\bar{\rho}}{d\bar{z}^2} \frac{[\delta^{(1)}z(n^i, z)]^2}{\bar{\rho}(\bar{z})} + \frac{d\delta^{(1)}\rho}{d\bar{z}} \frac{\delta^{(1)}z(n^i, z)}{\bar{\rho}(\bar{z})}. \nonumber
+\end{align}
+$$
+
+Structure in the universe is formed mainly from dark matter and this pressureless component evolves with redshift as
+
+$$
+\bar{\rho}(z) \approx \rho_0 (1+z)^3. \tag{4.92}
+$$
+
+Thus we have that
+
+$$
+\frac{d\bar{\rho}}{d\bar{z}} = 3\frac{\bar{\rho}}{1+\bar{z}}, \quad (4.93)
+$$
+
+so using Eq. (4.30), the redshift density perturbation at first order is given by
+
+$$
+\begin{equation}
+\delta_z^{(1)}(n^i, z) = \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + \frac{3}{1+\bar{z}} \left[ (v_{1i}n^i + \Phi_1)|_o^s + \int_0^{\chi_s} d\chi \{\Phi_1' + \Psi_1'\} \right]. \tag{4.94}
+\end{equation}
+$$
+
+Combining (4.80) and (4.94) we find that the galaxy number density fluctuation in redshift space as defined in Eq. (4.89) is, at first order,
+
+$$
+\begin{equation}
+\begin{aligned}
+\Delta_g^{(1)}(n^i, z) = & \left[ \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + 3\Phi_1 \right] - 2(\Phi_1 + \Psi_1) + \frac{1}{\mathcal{H}} \left( \Psi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{d\zeta} \right) \\
+& + \left( \frac{\mathcal{H}'}{\mathcal{H}^2} + \frac{2}{\mathcal{H}\chi} \right) \left[ \Phi_1 - (v_{1i}n^i) + \int_0^\chi d\tilde{\chi} (\Phi_1' + \Psi_1') \right] \\
+& - \frac{4}{\chi} \int_0^\chi d\tilde{\chi} \Psi_1 \\
+& - \frac{1}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - 2 \frac{d\delta^{(1)}\nu}{d\zeta} \right].
+\end{aligned}
+\tag{4.95}
+\end{equation}
+$$
+
+From Eq. (4.92), we have that the second derivative of the background density is
+
+$$
+\frac{d^2 \bar{\rho}}{d\bar{z}^2} = 6 \frac{\bar{\rho}}{(1+\bar{z})^2}, \qquad (4.96)
+$$
+
+so using Eqs. (4.30), (B.16) and (4.96) in Eq. (4.91) we find that the redshift density
+---PAGE_BREAK---
+
+perturbation at second order is given by
+
+$$
+\begin{equation}
+\begin{split}
+\delta_z^{(2)}(n^i, z) = \frac{1}{2} & \frac{\delta^{(2)}\rho(n^i, z)}{\bar{\rho}(\bar{z})} + \frac{3}{2(1+\bar{z})}\delta^{(2)}z(n^i, z) \\
+& + \frac{3}{(1+\bar{z})^2}[\delta^{(1)}z(n^i, z)]^2 + \frac{d\delta^{(1)}\rho}{d\bar{z}} \frac{\delta^{(1)}z(n^i, z)}{\bar{\rho}},
+\end{split}
+\tag{4.97}
+\end{equation}
+$$
+
+where the full expression in terms of the metric potentials is given in Appendix B.3,
+Eq. (B.22). Finally, combining Eqs. (B.21) and (B.22) we find the galaxy number
+density fluctuation at second order as defined in Eq. (4.90) is
+
+$$
+\begin{align}
+\Delta_g^{(2)}(n^i, z) ={}& \frac{1}{2} \frac{\delta^{(2)} \rho(n^i, z)}{\rho(\bar{z})} + \frac{3}{2} \Biggl[ -\frac{1}{2} \Phi_2|_o^s - \frac{1}{2} (v_{2i} n^i)_o^s \nonumber \\
+& \qquad + \frac{1}{2} \int_0^{\chi_s} d\chi (\Phi_2' + \Psi_2') + \frac{1}{2} (v_{1k} v_1^k)_o^s - \frac{3}{2} (\Phi_1|_o^s)^2 + 6 \Phi_1|_s \Phi_1|_o + \Phi_1|_o (v_{1i} n^i)_s \nonumber \\
+& \qquad - \Phi_1|_s (v_{1i} n^i)_o - (v_{1i} n^i)_o (v_{1i} n^i)_o^s - 2 \Psi_1|_o (v_{1i} n^i)_o + \Phi_1|_o^s \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \nonumber \\
+& \qquad + (v_{1i} n^i)_o \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2 v_{1i} \int_0^{\chi_s} d\chi (\Phi_{1,i} + \Psi_{1,i}) \nonumber \\
+& \qquad + 2 \int_0^{\chi_s} d\chi [\Psi_1' (\Phi_1 + \Psi_1)] + 2 \int_0^{\chi_s} d\chi \left[ \Phi_1 \left( \frac{d\Phi_1}{d\zeta} - 2 \frac{d\Psi_1}{d\zeta} \right) \right] \nonumber \\
+& \qquad - 4 \int_0^{\chi_s} d\chi [(\Psi_1 \Phi_{1,i} - \Phi_1 \Psi_{1,i}) n^i] + 4 \int_0^{\chi_s} d\chi [n^i \Phi_{1,i} (\Phi_1 - \Psi_1)] \nonumber \\
+& \qquad + \int_0^{\chi_s} d\tilde{\chi} \Biggl\{ 2 (\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i (\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \nonumber \\
+& \qquad + \left(\frac{d\Phi_1}{d\zeta} - \frac{d\Psi_1}{d\zeta}\right) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i} \nonumber \\
+& \qquad + \left(\int_0^{\chi_s} d\chi (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \nonumber \\
+& \qquad - n^i \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')\right) \Biggr\} \nonumber \\
+& + 3 \Biggl[ -(v_{1i} n^i + \Phi_1)|_o^s + \int_0^{\chi_s} [\Phi_1' + \Psi_1'] d\chi \Biggr]^2 \nonumber \\
+& + \frac{d\delta^{(1)}\rho}{d\bar{z}} \frac{1}{\bar{\rho}} \Biggl[ -(v_{1i} n^i + \Phi_1)|_o^s + \int_0^{\chi_s} [\Phi_1' + \Psi_1'] d\chi \Biggr] \nonumber \\
+& + \frac{1}{H} \Biggl[ \frac{1}{2} (\Psi_2' - \partial_\chi \Phi_2 - \frac{d(v_{2i} n^i)}{d\zeta}) + \frac{d(v_{1k} v_1^k)}{d\zeta} \Biggr]
+\end{align}
+$$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+$$
+\begin{align*}
+& -3\Phi_1 \left(\frac{d\Phi_1}{d\zeta}\right) + \frac{d\Phi_1}{d\zeta} (v_{1i}n^i) + \Phi_1 \frac{d(v_{1i}n^i)}{d\zeta} - (v_{1i}n^i) \frac{d(v_{1i}n^i)}{d\zeta} - 2\frac{d\Psi_1}{d\zeta} (v_{1i}n^i) \\
+& - 2\Psi_1 \frac{d(v_{1i}n^i)}{d\zeta} + \frac{d\Phi_1}{d\zeta} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') \\
+& + \frac{d(v_{1i}n^i)}{d\zeta} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + (v_{1i}n^i) (\Phi_1' + \Psi_1') \\
+& + \frac{d\Phi_1}{d\zeta} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') + 2\frac{dv_{1i}}{d\zeta} \int_0^{\chi_s} d\chi (\Phi_{1,}^i + \Psi_{1,}^i) + 2v_{1i} (\Phi_{1,}^i + \Psi_{1,}^i) \\
+& + 2[\Psi_1'(\Phi_1 + \Psi_1)] + 2\left[\Phi_1 \left(\frac{d\Phi_1}{d\zeta} - 2\frac{d\Psi_1}{d\zeta}\right)\right] - 4[(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] \\
+& + 4[n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] + 2(\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \\
+& + \left(\frac{d\Phi_1}{d\zeta} - \frac{d\Psi_1}{d\zeta}\right) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_i \\
+& + \left(\int_0^{\chi_s} d\chi (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \\
+& - n^i \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')\right) \\
+& - \frac{1}{2}\frac{\mathcal{H}'}{\mathcal{H}^2} \Biggl[ -\frac{1}{2}\Phi_2|_o^s - \frac{1}{2}(v_{2i}n^i)_o^s + \frac{1}{2}\int_0^{\chi_s} d\chi (\Phi_2' + \Psi_2') + \frac{1}{2}(v_{1k}v_1^k)_o^s \\
+& - \frac{3}{2}(\Phi_1|_o^s)^2 + 6\Phi_1|_s\Phi_1|_o + \Phi_1|_o (v_{1i}n^i)_s - \Phi_1|_s (v_{1i}n^i)_o - (v_{1i}n^i)_o (v_{1i}n^i)_o^s \\
+& - 2\Psi_1|_o (v_{1i}n^i)_o + \Phi_1|_o^s \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + (v_{1i}n^i)_o \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \\
+& + \Phi_1 \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2v_{1i} \int_0^{\chi_s} d\chi (\Phi_{1,}^i + \Psi_{1,}^i) \\
+& + 2 \int_0^{\chi_s} d\chi [\Psi_1'(\Phi_1 + \Psi_1)] + 2 \int_0^{\chi_s} d\chi \left[\Phi_1 \left(\frac{d\Phi_1}{d\zeta} - 2\frac{d\Psi_1}{d\zeta}\right)\right] \\
+& - 4 \int_0^{\chi_s} d\chi [(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] + 4 \int_0^{\chi_s} d\chi [n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] \\
+& + \int_0^{\chi_s} d\tilde{\chi} \left\{
+ \begin{aligned}[t]
+ & 2(\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \\
+ & + \left(\frac{d\Phi_1}{d\zeta} - \frac{d\Psi_1}{d\zeta}\right) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i} \\
+ & + \left(\int_0^{\chi_s} d\chi (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \\
+ & - n^i \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')\right)
+ \end{aligned}
+ \right\}
++ \frac{3}{2\mathcal{H}^2} \left[\Psi'_1 - \partial_\chi \Phi'_1 - \frac{d(v_{1i}n^i)}{d\zeta}\right]^2
+\end{align*}
+$$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+$$
+\begin{align*}
+&+ \frac{1}{2} \left( \frac{\mathcal{H}'}{\mathcal{H}^2} \right) \left( 1 + \frac{\mathcal{H}'}{\mathcal{H}^2} \right) \left[ \left( v_{1i} n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \right) \right]^2 \\
+&+ \frac{1}{2\mathcal{H}^2} \left( 2 \left[ \frac{\mathcal{H}'}{\mathcal{H}} \right]^2 + \frac{\mathcal{H}''}{\mathcal{H}} \right) \left[ \left( v_{1i} n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \right) \right]^2 \\
+&+ \frac{1}{2\mathcal{H}} \left( 1 + 2\frac{\mathcal{H}'}{\mathcal{H}^2} \right) \left( \Psi_1' - \partial_\chi \Phi_1 - \frac{d(v_{1i}n^i)}{d\zeta} \right) \left[ v_{1i} n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \right] \\
+&+ \left[ -\Psi_1|_s - \Psi_1|_o - \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_s + \left(2 - \frac{2}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_s \right. \\
+&\qquad \left. + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi \right. \\
+&- \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\zeta} \right]^2 \\
+&+ \left[ -\Phi_1|_o^s + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi + \Phi_1 - (v_{1i}n^i) \right] \left[ -\Psi_1|_s - \Psi_1|_o - \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_s \right. \\
+&\qquad \left. + \left(2 - \frac{2}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_s + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \right. \\
+&- \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\zeta} \right] \\
+&+ \frac{1}{2} \Biggl[ \delta^{(2)}\nu + \Phi_2 - (v_{2i}n^i) + 2\Phi_1\delta^{(1)}\nu - 2v_{1i}\delta^{(1)}n^i + \Phi_1^2 + (v_{1k}v_1^k) + 4\Psi_1 (v_{1i}n^i) \Biggr] \\
+&+ \frac{\delta^{(2)}d_A}{\bar{d}_A} + \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + 3 \left[ (v_{1i}n^i + \Phi_1)|_o^s + \int_0^{\chi_s} d\chi \{\Phi_1' + \Psi_1'\} \right] \\
+&\qquad \times \\
+&\qquad \left[ \frac{2}{\mathcal{H}} (\Psi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{d\zeta}) - 2(\Phi_1 + \Psi_1) - 3(v_{1i}n^i) + (\frac{\mathcal{H}'}{\mathcal{H}^2} + 2\frac{\mathcal{H}'}{\mathcal{H}\chi}) (\Phi_1 - (v_{1i}n^i) + \int_0^\chi d\tilde{\chi} (\Phi_1' + \Psi_1')) - 4\frac{\chi}{\chi'} \int_0^\chi d\tilde{\chi}\Psi_1 - 3\frac{\chi}{\chi'} \int_0^\chi d\tilde{\chi}(\tilde{\chi}-\chi)\tilde{\chi}(\Phi_1-\Psi_1) - 3\frac{\chi}{\chi'} d\zeta(d\zeta)^{-1} + 3\int_0^\chi d\tilde{\chi}(\Phi_1'+\Psi_1') \right].
+\end{align*}
+$$
+
+Which is the main result of this chapter. In the following section we make a compar-
+ison of our result with others in the literature [31–33]. The second-order effects that
+we derive, especially those involving integrals along the line of sight, may make a
+non-negligible contribution to the observed number counts. This will be important
+---PAGE_BREAK---
+
+for removing potential biases on parameter estimation in precision cosmology with galaxy surveys. It will also be important for an accurate analysis of the ‘contamination’ of primordial non-Gaussianity by relativistic projection effects [31, 32].
+
+## 4.6. Comparison with previous work
+
+In this section we compare our linear result given in Eq. (4.95) with those in the literature given in Refs. [31, 32, 35] which also compute second order corrections and in particular with Di Dio, et al. [33]. We compare to ensure that our result is correct, since, since the number counts are well established to linear order with Refs. [28, 30]. In Section 4.7 we perform a comparison of the leading terms of the second order expansion of the galaxy number counts.
+
+Our result, as given in Eq. (4.88) is
+
+$$
+\begin{aligned}
+\Delta_g^{(1)}(n^i, z) = & \left[ \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + 3\Phi_1 \right] - 2(\Phi_1 + \Psi_1) + \frac{1}{\mathcal{H}} \left( \Psi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{d\zeta} \right) \\
+& + \left( \frac{\mathcal{H}'}{\mathcal{H}^2} + \frac{2}{\mathcal{H}\chi} \right) \left[ \Phi_1 - (v_{1i}n^i) + \int_0^\chi d\tilde{\chi} (\Phi_1' + \Psi_1') \right] - \frac{4}{\chi} \int_0^\chi d\tilde{\chi} \Psi_1 \\
+& - \frac{1}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\tilde{\chi}} \frac{d\delta^{(1)}\nu}{d\zeta} \right].
+\end{aligned}
+\quad (4.99) $$
+
+### 4.6.1. Di Dio, et al.
+
+Rewriting the result from Ref. [33], in Poisson gauge, allowing for anisotropic stress. At first order, Ref. [33] have
+
+$$
+\begin{aligned}
+\Delta_{\text{Di Dio}}^{(1)} ={}& \delta_{\rho}^{(1)} + \left(\frac{2}{\mathcal{H}r} + \frac{\mathcal{H}'}{\mathcal{H}^2}\right) \left[(v_{1i}n^i) + \psi^I - \psi^A + 2 \int_{\eta_s}^{\eta_o} d\eta' \partial_{\eta'} \psi^I\right] - \psi^I && (4.100) \\
+& + \frac{4}{r} \int_{\eta_s}^{\eta_o} d\eta' \psi^I - \frac{2}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 \psi^I + \frac{1}{\mathcal{H}} [\partial_\eta \psi^I + \partial_r (v_{1i}n^i)] \\
+& - 3\psi^A + \frac{1}{\mathcal{H}} \partial_\eta \psi^A,
+\end{aligned}
+$$
+
+where $\mathcal{H} = a'(\eta)/a(\eta)$ is the Hubble parameter, the 's' denotes *source* and the 'o' denotes *observer*, and
+
+$$
+\begin{gathered}
+\psi^I = \frac{\psi + \phi}{2}, \quad \text{and,} \\
+\psi^A = \frac{\psi - \phi}{2},
+\end{gathered}
+\quad (4.101)
+$$
+---PAGE_BREAK---
+
+which rewriting in our notation is
+
+$$
+\begin{align}
+\Delta_{\text{Di Dio}}^{(1)} ={}& \delta_{\rho}^{(1)} + \left(\frac{2}{\mathcal{H}r} + \frac{\mathcal{H}'}{\mathcal{H}^2}\right) \Biggl[ (v_{1i}n^i) + \Phi_1 + \int_{\eta_s}^{\eta_o} d\eta' (\Phi_1' + \Psi_1') \Biggr] \tag{4.102} \\
+& + (2\Psi_1 - \Phi_1) + \frac{2}{r} \int_{\eta_s}^{\eta_o} d\eta' (\Phi_1 + \Psi_1) - \frac{1}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 (\Phi_1 + \Psi_1) \nonumber \\
+& + \frac{1}{\mathcal{H}} [\Psi_1' + \partial_r (v_{1i}n^i)] . \nonumber
+\end{align}
+$$
+
+Computing the difference between Eq. (4.100) and Eq. (4.95), we have
+
+$$
+\begin{equation}
+\Delta_g^{(1)} - \Delta_{\text{Di Dio}}^{(1)} \approx
+\begin{aligned}[t]
+& \left[ \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + 3\Phi_1 \right] - \left[ \delta_\rho^{(1)} \right] && (4.103) \\
+& - \frac{1}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} \right] \\
+& + \left[ \frac{1}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 (\Phi_1 + \Psi_1) \right]
+\end{aligned}
+\end{equation}
+$$
+
+where the first line cancels out from the definition of the comoving density pertur-
+bation ($\delta_{\rho}^{(1)}$), and the last integral cancels out from the definition of the angular
+operator $\Delta_2$, both given in Ref. [33], and we find,
+
+$$
+\Delta_g^{(1)} - \Delta_{\text{Di Dio}}^{(1)} = 0. \tag{4.104}
+$$
+
+**4.6.2. Bertacca, et al.**
+
+In Refs. [31, 32], their result is written in terms of “cosmic rulers” and it is given by
+
+$$
+\Delta_{\text{Bertacca}}^{(1)} = \delta_g^{(1)} + \frac{1}{2} \hat{g}_{\mu}^{\mu(1)} + b_e \Delta \ln a^{(1)} + \partial_{||} \Delta x_{||}^{(1)} + \frac{2}{\bar{\chi}} \Delta x_{||}^{(1)} - 2\kappa^{(1)} + E_0^{0(1)} + E_0^{\parallel(1)}, \quad (4.105)
+$$
+
+which in Poisson gauge, translates into
+
+$$
+\begin{align}
+\Delta_{\text{Bertacca}}^{(1)} ={}& \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(n^i, z)} - \left(\frac{\mathcal{H}'}{\mathcal{H}^2} + \frac{2}{\bar{\chi}\mathcal{H}}\right) \Biggl[ (v_{1i}n^i - \Phi_1)_o^s - 2 \int_0^{\bar{\chi}} \Phi_1' d\tilde{\chi} \Biggr] \tag{4.106} \\
+& - \Phi_1 + \frac{\Phi_1'}{\mathcal{H}} + \frac{4}{\bar{\chi}} \int_0^{\bar{\chi}} \Phi_1 d\tilde{\chi} - \frac{1}{\mathcal{H}} \frac{d}{d\chi} (v_{1i}n^i) - \frac{1}{\mathcal{H}} \frac{d\Phi_1}{d\chi} \nonumber \\
+& - 2 \int_0^{\bar{\chi}} d\tilde{\chi} (\bar{\chi} - \tilde{\chi}) \frac{\tilde{\chi}}{\bar{\chi}} \Biggl[ \nabla^2 \Phi_1 + \frac{d^2\Phi_1}{d\tilde{\chi}^2} + \Phi_1'' - 2 \frac{d\Phi_1'}{d\tilde{\chi}} - \frac{2}{\bar{\chi}} \left( \frac{d\Phi_1}{d\tilde{\chi}} - \Phi_1' \right) \Biggr], \nonumber
+\end{align}
+$$
+---PAGE_BREAK---
+
+where we omitted the terms with the evolution bias $b_e$. We must rewrite our own result taking $\Psi_1 = \Phi_1$ in Eq. (4.95) to make the comparison, so we have that
+
+$$
+\begin{aligned}
+\Delta_g^{(1)}(n^i, z) = & \left[ \frac{\delta^{(1)}\rho(n^i, z)}{\bar{\rho}(z)} + 3\Phi_1 \right] - 4\Phi_1 + \frac{1}{\mathcal{H}} \left( \Phi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{d\zeta} \right) && (4.107) \\
+& + \left( \frac{\mathcal{H}'}{\mathcal{H}^2} + \frac{2}{\mathcal{H}\chi} \right) \left[ \Phi_1 - (v_{1i}n^i) + 2 \int_0^\chi d\tilde{\chi} \Phi_1' \right] - \frac{4}{\chi} \int_0^\chi d\tilde{\chi} \Phi_1 \\
+& - \frac{2}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left[ \nabla^2 \Phi_1 - n^i n^j \Phi_{1,ij} - \frac{1}{\tilde{\chi}} \frac{d\delta^{(1)}\nu}{d\zeta} \right].
+\end{aligned}
+$$
+
+Computing the difference between Eq. (4.106) and Eq. (4.95), we have
+
+$$ \Delta_g^{(1)} - \Delta_{\text{Bertacca}}^{(1)} \approx \frac{1}{\mathcal{H}} \left( \frac{d(v_{1i}n^i)}{d\zeta} \right) + \frac{1}{\mathcal{H}} \frac{d}{d\chi} (v_{1i}n^i), \quad (4.108) $$
+
+where both are derivatives of first order terms with respect to background quantities, and in the background $d\chi = d\zeta$. Note that the direction in the sky, $n^i$, is $(-n^i)$ from Refs. [31, 32], so
+
+$$ \Delta_g^{(1)} - \Delta_{\text{Bertacca}}^{(1)} = 0. \qquad (4.109) $$
+
+### 4.6.3. Yoo & Zaldarriaga
+
+The galaxy overdensity in [35], is given by
+
+$$ \delta_g^{\text{obs}(1)} = \delta_g^{\text{int}(1)} + 3\delta z + \delta g + 2 \frac{\delta r}{\bar{r}_z} - 2\kappa + H_z \frac{\partial \delta r}{\partial z} + \delta u^0 + V_{\parallel} - e_1 \delta z_{t_p} - t_1 \delta D_L, \quad (4.110) $$
+
+which in Poisson gauge, allowing for anisotropic stress takes the form
+
+$$
+\begin{aligned}
+\Delta_{Yoo}^{(1)} ={}& \delta_g^{\text{int}(1)} + 3H_o\delta\tau_o - 3\Phi_1|_o^z - 3\int_0^{\bar{r}_z} d\bar{r}(\Phi_1' + \Psi_1') + 3\Phi_1 + 3v_{1i}n^i + \Phi_1 + 3\Psi_1 \\
+& + \frac{2}{r_z}\Biggl[ \delta\tau_o - \frac{1}{H_z}\Biggl(H_o\delta\tau_o - \Phi_1|_o^z - \int_0^{\bar{r}_z} d\bar{r}(\Phi_1' + \Psi_1') + (v_{1i}n^i)_o^z\Biggr) \\
+& + \int_0^{\bar{r}_z} (\Phi_1 - \Psi_1) d\bar{r} - 2\kappa + H_z \frac{\partial}{\partial z}\Biggl(\delta\tau_o - \frac{1}{H_z}\Bigl\{H_o\delta\tau_o - \Phi_1|_o^z - \int_0^{\bar{r}_z} d\bar{r}(\Phi_1' + \Psi_1') \\
+& + (v_{1i}n^i)_o^z\Bigr\} + \int_0^{\bar{r}_z} d\bar{r}(\Phi_1 - \Psi_1)\Biggr) - \Phi_1 + v_{1i}n^i \Biggr],
+\end{aligned}
+\quad (4.111)
+$$
+
+where we did not use the evolution bias or the running and slope of the luminosity.
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+The difference between Eq. (4.111) and Eq. (4.95) is then,
+
+$$
+\begin{equation}
+\begin{split}
+\Delta_g^{(1)} - \Delta_{Yoo}^{(1)} &\approx \left[ \frac{\delta^{(1)} \rho(n^i, z)}{\bar{\rho}(z)} + 3\Phi_1 \right] - \delta_g^{\text{int}(1)} - 3\mathcal{H}_o \delta \tau_o - \frac{2}{r_z} \delta \tau_o \\
+&\quad - \frac{1}{\chi} \int_0^\chi d\tilde{\chi} (\tilde{\chi} - \chi) \tilde{\chi} \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{ij} \right] + \frac{4}{r_z} \kappa,
+\end{split}
+\tag{4.112}
+\end{equation}
+$$
+
+where the first line is zero from the definition of $\delta_g^{\text{int}(1)}$, and without loss of generality we take $\delta\tau_o = 0$, and the integrals in the second line cancel from the definition of $\kappa$ in Ref. [35], so
+
+$$
+\Delta_g^{(1)} - \Delta_{\text{Yoo}}^{(1)} = 0. \tag{4.113}
+$$
+
+4.7. Second order comparison with literature
+
+4.7.1. Introduction
+
+In 2014, almost simultaneously, three different derivations of the second order num-
+ber counts were published [31–33, 35].
+
+Even though these works are interesting on their own, it is very hard to compare
+them as the final expressions for the galaxy number density occupy several pages.
+In particular, the result in Ref. [35] has to be put together from a multitude of
+different contributions. On top of this, the notation and the break-up into separate
+terms is very different throughout all the derivations. An additional difficulty is that
+terms can be converted into each other by integration by parts, in a non-trivial way,
+making the comparison of even partial results tricky at best.
+
+Because of these difficulties, there is still a general question of whether or not all
+these derivations coincide. In Ref. [39] the authors concentrate on the terms which
+dominate on sub-horizon scales, considering only the terms of the order of $(k/\mathcal{H})^4 \Psi^2$
+and neglect smaller contributions to the second order number count. Here, $k$ is the
+comoving wave number, $\mathcal{H}$ the conformal Hubble parameter and $\Psi$ a scalar metric
+perturbation. In Ref. [39] the authors use a straight-forward derivation to reproduce
+the result of Ref. [33], finding disagreements concerning lensing terms and a double
+counting of volume distortion effects in Refs. [31] and [35], respectively.
+
+In this chapter, we use our independent derivation of the second order number
+counts given in Eq. (4.98) and follow a similar approach as the one made in Ref. [39]
+comparing leading terms in the aforementioned literature.
+---PAGE_BREAK---
+
+4.7.2. Dominant terms at second order
+
+To determine the leading terms of the second order number counts, we first need to
+analyse our result given in Eq. (4.98). From Eqs. (4.89) and (4.90) we consider that
+the general expression for the dominating terms is of the form
+
+$$
+\Delta_{\text{Leading}} = (1 + \delta)(1 + \delta V) \approx (1 + \delta)(1 + \text{RSD})(1 + \kappa), \quad (4.114)
+$$
+
+where $\delta$ is the matter overdensity, $\delta V$ is the perturbed volume, and we further split
+the volume perturbation into its dominant components, being the lensing contribu-
+tion ($\kappa$), and redshift space distortions (RSD).
+
+Perturbing Eq. (4.114) up to second order, we find that the nonlinear contribution
+to the leading terms is given by
+
+$$
+\begin{align}
+\Delta_{\text{Leading}}^{(2)} &= \delta_g^{(2)} + \delta_g^{(1)}\delta^{(1)}V + \delta^{(2)}V, \tag{4.115} \\
+&= \delta_g^{(2)} + [\text{RSD}]^{(2)} + \kappa^{(2)} + \delta_g^{(1)}[\text{RSD}]^{(1)} + \delta_g^{(1)}\kappa^{(1)} + [\text{RSD}]^{(1)}\kappa^{(1)}. \nonumber
+\end{align}
+$$
+
+We now present the leading terms of our calculation to second order given in
+Eq. (4.98), which is
+
+$$
+\begin{equation}
+\begin{aligned}
+\Delta_{\text{Leading}}^{(2)} &\approx \delta_g^{(2)} - \frac{1}{2H} \frac{\mathrm{d}(v_{2i}n^i)}{\mathrm{d}\zeta} + \frac{1}{2H} \frac{\mathrm{d}(v_{1k}v_1^k)}{\mathrm{d}\zeta} - (v_{1i}n^i) \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \\
+&\quad + \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \int_0^{\chi_s} \mathrm{d}\chi (\Phi_1' + \Psi_1') - \frac{\mathcal{H}''}{\mathcal{H}^3} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \int_0^{\chi_s} \mathrm{d}\chi (\Phi_1' + \Psi_1') \\
+&\quad + \frac{2}{H} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \int_0^{\chi_s} \mathrm{d}\chi (\Phi_1' + \Psi_1') + \frac{\delta_g^{(1)}}{H} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \\
+&\quad + \frac{1}{H} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \frac{1}{\chi} \int_0^{\chi_s} \mathrm{d}\chi \left[ \nabla^2 (\Phi_1 + \Phi_1) + n^i n^j (\Phi_1 + \Psi_1)_{,ij} + \frac{2}{\chi} \frac{\mathrm{d}\delta^{(1)\nu}}{\mathrm{d}\zeta} \right] \\
+&\quad + \frac{\delta_g^{(1)}}{\chi} \int_0^{\chi_s} \mathrm{d}\chi \left[ \nabla^2 (\Phi_1 + \Psi_1) + n^i n^j (\Phi_1 + \Psi_1)_{,ij} + \frac{2}{\chi} \frac{\mathrm{d}\delta^{(1)\nu}}{\mathrm{d}\zeta} \right] \\
+&\quad + \frac{2}{\chi} \int_0^{\chi_s} \mathrm{d}\chi \left[ \nabla^2 (\Psi_2 + \Phi_2) + n^i n^j (\Phi_2 + \Psi_2)_{,ij} + \frac{2}{\chi} \frac{\mathrm{d}\delta^{(2)\nu}}{\mathrm{d}\zeta} \right].
+\end{aligned}
+\tag{4.116}
+\end{equation}
+$$
+
+All these terms come from density fluctuations,
+
+$$
+\Delta_{\text{Leading}-\delta}^{(2)} \approx \delta_g^{(2)}, \qquad (4.117)
+$$
+---PAGE_BREAK---
+
+redshift space distortions
+
+$$
+\begin{equation}
+\begin{split}
+\Delta_{\text{Leading-RSD}}^{(2)} \approx {}& -\frac{1}{2H} \frac{\mathrm{d}(v_{2i}n^i)}{\mathrm{d}\zeta} + \frac{1}{2H} \frac{\mathrm{d}(v_{1k}v_1^k)}{\mathrm{d}\zeta} - (v_{1i}n^i) \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \\
+& + \left[1 - \frac{H''}{H^3} + \frac{2}{H}\right] \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \int_0^{\chi_s} \mathrm{d}\chi (\Phi_1' + \Psi_1'),
+\end{split}
+\tag{4.118}
+\end{equation}
+$$
+
+lensing terms
+
+$$
+\Delta_{\text{Leading-}\kappa}^{(2)} \approx \frac{2}{\chi} \int_{0}^{\chi_s} d\chi \left[ \nabla^2 (\Psi_2 + \Phi_2) + n^i n^j (\Phi_2 + \Psi_2)_{,ij} + \frac{2}{\chi} \frac{d\delta^{(2)}\nu}{d\zeta} \right], \quad (4.119)
+$$
+
+and crossed terms
+
+$$
+\Delta_{\text{Leading}-\delta \times \text{RSD}}^{(2)} \approx \frac{\delta_g^{(1)}}{\mathcal{H}} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta}, \qquad (4.120)
+$$
+
+$$
+\Delta_{\text{Leading}-\delta \times \kappa}^{(2)} \approx \frac{\delta_g^{(1)}}{\chi} \int_0^{\chi_s} d\chi \left[ \nabla^2 (\Phi_1 + \Psi_1) + n^i n^j (\Phi_1 + \Psi_1)_{,ij} + \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\zeta} \right], (4.121)
+$$
+
+$$
+\Delta_{\text{Leading-RSD}\times\kappa}^{(2)} \approx \frac{1}{\mathcal{H}} \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\zeta} \frac{1}{\chi} \int_0^{\chi_s} d\chi \left[ \nabla^2 (\Phi_1 + \Phi_1) + n^i n^j (\Phi_1 + \Psi_1)_{,ij} + \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\zeta} \right]. \quad (4.122)
+$$
+
+4.7.3. Comparison with Di Dio, et al.
+
+In the following, we identify and match terms from Ref. [33] to Eq. (4.98). We start
+by relating the notation of one to the other, the main notational differences between
+our work and Ref. [33] are:
+
+• Work in the geodesic light-cone gauge (GLC) to obtain their solution which is then expanded in a more conventional gauge, Poisson gauge, to second order.
+
+• Latin indices in the GLC take only the values 1, 2.
+
+• Maintain their integrals in terms of the conformal time η.
+
+* Separate the final result into an isotropic and anisotropic part.
+
+• Projected notation is used $v_\parallel = n^i v_i$.
+
+* There is a factor of (-1) in the definition of the observation vector $n^i$.
+
+To second order, the main result is given by Eq. (4.41) in their paper,
+
+$$
+\Delta^{(2)} = \Sigma - \langle \Sigma \rangle, \tag{4.123}
+$$
+---PAGE_BREAK---
+
+where
+
+$$
+\Sigma = \Sigma_{\text{IS}} + \Sigma_{\text{AS}}, \tag{4.124}
+$$
+
+and the isotropic, ΣIS, and anisotropic, ΣAS, parts are given in Eqs. (4.42) and (4.43)
+of Ref. [33], respectively.
+
+The translation of the majority of the terms is straightforward. *r* is the comoving
+distance we call χ and ∂η = d/dη = d/dζ − ni∂i = −d/dχ. Thankfully, the authors
+of Ref. [33] include a *leading* order second order contribution in their paper, which
+is
+
+$$
+\begin{equation} \tag{4.125}
+\begin{split}
+{}^{(2)}\Delta_{\text{Leading}}^{\text{Di Dio}} \approx & \delta_{\rho}^{(2)} + \frac{1}{\mathcal{H}} \frac{d(v_{2i}n^i)}{d\zeta} - \frac{1}{2r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 (\Psi_2 + \Phi_2) \\
+& + \frac{1}{\mathcal{H}} \left[ (v_{1i}n^i) \frac{d^2(v_{1i}n^i)}{d\zeta^2} + \left(\frac{d(v_{1i}n^i)}{d\zeta}\right)^2 \right] - \frac{2}{\mathcal{H}} \frac{d(v_{1i}n^i)}{d\zeta} \frac{1}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 \psi^I \\
+& - \frac{2}{\mathcal{H}} \partial_a \left(\frac{d(v_{1i}n^i)}{d\zeta}\right) \int_{\eta_s}^{\eta_o} d\eta' \gamma_0^{ab} \partial_b \int_{\eta_s}^{\eta_s} d\eta'' \psi^I + 2 \left(\frac{1}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 \psi^I\right)^2 \\
+& + \frac{4}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \left\{
+\begin{aligned}[t]
+& \partial_b [\Delta_2 \psi^I] \int_{\eta_s}^{\eta_o} d\eta'' \gamma_0^{ab} \partial_a \int_{\eta''}^{\eta_o} d\eta''' \psi^I \\
+& + \Delta_2 \left[-\frac{1}{2}\gamma_0^{ab}\partial_a\left(\int_{\eta'}^{\eta_o} d\eta''\psi^I\right) \partial_b\left(\int_{\eta'}^{\eta_o} d\zeta''\psi^I\right)\right]
+\end{aligned}
+\right\} \\
+& - 4 \int_{\eta_s}^{\eta_o} d\eta' \left\{
+\begin{aligned}[t]
+& \gamma_0^{ab} \partial_b \left(\int_{\eta'}^{\eta_o} d\eta'' \psi^I\right) \frac{1}{\eta_o - \eta'} \int_{\eta'}^{\eta_o} d\eta'' \frac{\eta'' - \eta'}{\eta_o - \eta''} \partial_a \Delta_2 \psi^I \\
+& + \left[\frac{1}{\mathcal{H}} \left(\frac{d(v_{1i}n^i)}{d\zeta}\right) - \frac{2}{r} \int_{\eta_s}^{\eta_o} d\eta' \frac{\eta' - \eta_s}{\eta_o - \eta'} \Delta_2 \psi^I\right] \delta_{\rho}^{(1)} + \frac{1}{\mathcal{H}} (v_{1i}n^i) \frac{d\delta_{\rho}^{(1)}}{d\zeta}
+\end{aligned}
+\right\} \\
+& - 2 \partial_a \delta_{\rho}^{(1)} \int_{\eta_s}^{\eta_o} d\eta' \gamma_0^{ab} \partial_b \int_{\eta'}^{\eta_o} d\eta \psi^I.
+\end{split}
+\end{equation}
+$$
+
+After some integrations by parts to rewrite some terms, and rewriting what the
+angular Laplacian is in our notation, the only difference between our leading terms
+and the ones from Ref. [33] only comes from the different definition of the observation
+vector $n^i$, and a numerical factor between the four velocities, one half.
+
+$$
+\begin{align}
+{}^{(2)}\Delta_{\text{Leading}}^{\text{(Di Dio)}} &\approx [\delta_g^{(2)} - \delta_\rho^{(2)}] - \frac{1}{\mathcal{H}} \frac{d(v_{2i}n^i)}{d\zeta} \left[\frac{1}{2} + 1\right], && (4.126) \\
+&\approx -\frac{1}{\mathcal{H}} \frac{d(v_{2i}n^i)}{d\zeta} \left[\frac{1}{2} + 1\right], &
+\end{align}
+$$
+
+where it can be seen explicitly that the difference comes from the different sign in
+the definition of the observation vector $n^i$, and a (1/2)-factor in the definition
+---PAGE_BREAK---
+
+of our second order velocity perturbation.
+
+#### 4.7.4. Comparison with Bertacca, et al.
+
+We now proceed to identify the terms of Refs. [31, 32], the main remarks about the notation here are:
+
+• They work with cosmic rulers, then change to Poisson gauge.
+
+• There is a factor of $(-1)$ in the definition of the observation vector $n^i$.
+
+• Projected derivatives, meaning $\partial_{\parallel} = n^i \partial_i$ and $\partial_{\perp}^i = r^{-1} \partial^i$.
+
+The leading terms in the expression for the number counts, would be
+
+$$
+\begin{aligned}
+& {}^{(2)}\Delta_{\text{Leading}}^{\text{Bertacca}} \approx \delta_g^{(2)} - \frac{1}{\mathcal{H}} \frac{d^2(v_{2i}n^i)}{d\zeta^2} - 2\kappa^{(2)} + 4[\kappa^{(1)}]^2 - 4\delta_g^{(1)}\kappa^{(1)} && (4.127) \\
+& \quad - 2\frac{\delta_g^{(1)}}{\mathcal{H}} \frac{d^2(v_{1i}n^i)}{d\zeta^2} + 4\frac{\kappa^{(1)}}{\mathcal{H}} \frac{d^2(v_{1i}n^i)}{d\zeta^2} + \frac{2}{\mathcal{H}^2} \left[ \frac{d^2(v_{1i}n^i)}{d\zeta^2} \right]^2 + \frac{2}{\mathcal{H}^2} \left[ \frac{d(v_{1i}n^i)}{d\zeta} \right] \left[ \frac{d^3(v_{1i}n^i)}{d\zeta^3} \right] \\
+& \quad - \frac{2}{\mathcal{H}} \frac{d\delta_g^{(1)}}{d\chi} \Delta \ln a^{(1)} + \frac{2}{\chi} \left[ (\delta_g^{(1)})_{,i} - \frac{1}{\mathcal{H}} \frac{d^2(v_{1k}n^k)_{,i}}{d\zeta^2} \right] \int_0^{\chi_s} d\chi (\Phi_{1,i}^{} + \Psi_{1,i}^{}) \\
+& \quad - 2 \left[ (\delta_g^{(1)})_{,i} - \frac{1}{\mathcal{H}} \frac{d^2(v_{1k}n^k)_{,i}}{d\zeta^2} \right] \int_0^{\chi_s} d\chi \frac{1}{\chi} (\Phi_{1,i}^{} + \Psi_{1,i}^{}) \\
+& \quad - 4 \left( \int_0^{\chi_s} d\tilde{\chi}_{\overline{\chi}} \frac{\tilde{\chi}_{\overline{\chi}}}{\overline{\chi}} (\bar{\chi} - \tilde{\chi}) P_i^n P^{jm} \partial_m \partial_n \Phi_1^{} \right) \left( \int_0^{\chi_s} d\tilde{\chi}_{\overline{\chi}} \frac{\tilde{\chi}_{\overline{\chi}}}{\overline{\chi}} (\bar{\chi} - \tilde{\chi}) P_i^p P^{jq} \partial_p \partial_q \Phi_1^{} \right).
+\end{aligned}
+$$
+
+The translation of the majority of the terms is straightforward, $a^{(1)}$ is the first order perturbation of the scale factor taken as $1/(1+z)$. To leading order, we can substitute $\Delta \ln a^{(1)} = -\partial_\chi (v_{1i}n^i)$.
+
+After several integrations by parts and translations between the leading expression in our notation and the authors from Ref. [31], the main difference comes in the definition of the convergence, where there is a numerical value factor of difference.
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+Note that we are not taking into account the so called ‘post-Born’ contributions.
+
+$$
+\begin{align}
+& \Delta_{\text{Leading}}^{(2)} - {}^{(2)}\Delta_{\text{Leading}}^{\text{Bertacca}} \approx \tag{4.128} \\
+& \quad \frac{\delta_g^{(1)}}{\chi} \int_0^{\chi_s} d\chi \left[ \nabla^2 (\Phi_1 + \Psi_1) + n^i n^j (\Phi_1 + \Psi_1)_{,ij} + \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\zeta} \right] - 4\delta_g^{(1)}\kappa^{(1)} \nonumber \\
+& \quad + \frac{2}{\chi} \int_0^{\chi_s} d\chi \left[ \nabla^2 (\Psi_2 + \Phi_2) + n^i n^j (\Phi_2 + \Psi_2)_{,ij} + \frac{2}{\chi} \frac{d\delta^{(2)}\nu}{d\zeta} \right] - 2\kappa^{(2)}, \nonumber \\
+& \approx 2\delta_g^{(1)}\kappa^{(1)} - 4\delta_g^{(1)}\kappa^{(1)} + \kappa^{(2)} - 2\kappa^{(2)}, \nonumber \\
+& = -2\delta_g^{(1)}\kappa^{(1)} - \kappa^{(2)}, \tag{4.129}
+\end{align}
+$$
+
+where in the second equality we used the definition given in Ref. [31] [see Eqs. (209)
+and (217) therein], to rewrite our notation into their convergence to explicitly see
+the difference that arises from the convergence, where it appears to be adding twice
+as much to the galaxy overdensity.
+
+4.7.5. Comparison with Yoo and Zaldarriaga
+
+We now proceed to identify the terms of Ref. [35]. Since the full final result is
+not written down in closed form, we have to perform a *stitching-together* by going
+backwards through the paper. The way the results are presented is one by one,
+so the main result – the galaxy overdensity – is not written explicitly; it is only
+shown in terms of previously found expressions, that the reader needs to find and
+then “stitch-together” in order to obtain the full expression. The main differences
+between our notation and Ref. [35] are:
+
+• Latin indices go from 0 to 3, Greek indices go from 1 to 3 (the opposite of our notation).
+
+• Metric perturbations are called $\mathcal{A}$ and $C_{\alpha\beta}$, where $C_{\alpha\beta} = \Psi\delta_{\alpha\beta}$ in our notation, for purely scalar perturbations. The second order perturbations are defined with no factor 2 at second order.
+
+• All perturbation orders are left implicit.
+
+• Work in a different basis that depends on angles, and leave some factors of $(\sin \theta)$ between expressions, which are not present in our derivation.
+
+From Eq. (4.115), we have that for Ref. [35] the leading terms are
+
+$$(^{(2)}\Delta_{\text{Leading}}^{\text{Yoo}} = \delta_g^{(2)} + \delta^{(2)}V + \delta_g^{(1)}\delta^{(1)}V. \quad (4.130)$$
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+The first order volume perturbation in Ref. [35] is given by
+
+$$
+\delta^{(1)}V = -2\kappa^{(1)} + H_z \partial_z \delta r^{(1)} = -2\kappa^{(1)} + \frac{1}{H} \frac{d(v_{1i}n^i)}{d\zeta}, \quad (4.131)
+$$
+
+where $\partial_z = H_z^{-1} \partial_\chi$. In Ref. [35] the second order perturbation of the volume is
+
+$$
+\delta^{(2)} V = \delta D_L^{(2)} + H_z \partial_z \delta r^{(2)} - 2 H_z \kappa^{(1)} \partial_z \delta r^{(1)} + \Delta x^{(1)b} \partial_b \delta^{(1)} V, \quad (4.132)
+$$
+
+where $\delta D_L^{(2)}$ is the luminosity distance, which is related to $\delta^{(2)}d_A$ through the *Etherington's reciprocity theorem*, which is expressed as $d_L = (1+z)^2 d_A$. Lastly we need to expand
+
+$$
+\begin{equation}
+\Delta x^{(1)b} \partial_b \delta^{(1)} V = -2\nabla^a \Phi_1 \nabla_a \kappa^{(1)} + \frac{1}{\mathcal{H}} \nabla^a \Phi_1 \nabla_a \frac{\mathrm{d}(v_{1i} n^i)}{\mathrm{d}\zeta} + \frac{1}{\mathcal{H}^2} \left(\frac{\mathrm{d}(v_{1i} n^i)}{\mathrm{d}\zeta}\right) \left(\frac{\mathrm{d}^2(v_{1i} n^i)}{\mathrm{d}\zeta^2}\right). \tag{4.133}
+\end{equation}
+$$
+
+All these terms are already accounted for in $\delta D_L^{(2)}$ and in $\delta r^{(2)}$. To avoid the cumbersome rewriting of the full term, we refrain from rewriting the terms here. For reference they are given in Eqs. (78) and (50) in Ref. [35], respectively. Here, in agreement with Ref. [39], it can be seen that with these two terms, there is a double-counting effect, so this is the only difference between our leading terms, if we ignore this, then we are in agreement.
+
+$$
+\begin{equation}
+\begin{split}
+\Delta_{\text{Leading}}^{(2)} - {}^{(2)}\Delta_{\text{Leading}}^{\text{Yoo}} &\approx -2\nabla^a \Phi_1 \nabla_a \kappa^{(1)} + \frac{1}{\mathcal{H}} \nabla^a \Phi_1 \nabla_a \frac{\mathrm{d}(v_{1i} n^i)}{\mathrm{d}\zeta} \\
+&\qquad + \frac{1}{\mathcal{H}^2} \left(\frac{\mathrm{d}(v_{1i} n^i)}{\mathrm{d}\zeta}\right) \left(\frac{\mathrm{d}^2(v_{1i} n^i)}{\mathrm{d}\zeta^2}\right),
+\end{split}
+\tag{4.134}
+\end{equation}
+$$
+
+where we show explicitly that the leading terms are in complete agreement, except
+for those terms which are accounted for twice inside the luminosity distance and the
+radial perturbation.
+
+**4.8. Discussion**
+
+In this chapter we presented a new and independent approach to calculate the galaxy number overdensity. We have shown that through an independent approach we could reproduce the leading terms that have only been computed by three groups before, in Refs. [31, 33, 35]. We present the galaxy number counts in a general form depending only on the affine parameter, which allows for simple plotting along the line of sight if the potentials are known. The potentials can be calculated either
+---PAGE_BREAK---
+
+4. Galaxy Number Counts
+
+using the field equations discussed in Section 2.3 or N-body simulations. We also present the second order galaxy number counts in terms of observable quantities such as the redshift, so future surveys can potentially measure this quantity and provide sufficient information on large and small scales. Our results will aid in the analysis of the data and enable comparisons of the theoretical number counts with observed quantities.
+
+This result can be used to study the impact of relativistic effects on parameters estimation. Since we expect that the relativistic effects do not significantly shift the position of the BAO peak we can focus on the bias parameters and astrophysical systematics in the cross-correlations. The main result in this Chapter is presented in Eq. (4.98) – the galaxy number counts up to and including second order in cosmological perturbation theory. We used scalar perturbations in longitudinal gauge allowing for non-zero anisotropic stress. We assumed a flat FLRW background universe filled with a pressureless fluid throughout the whole chapter, except where otherwise stated.
+
+As discussed in Section 4.1 we are not the first group to perform this calculation. We performed a comparison of our main result with others in the literature. We find that at linear order we are in complete agreement. Nevertheless, the approaches taken by different groups lead to slight differences at higher order. We provide a comparison of the leading terms at second order in Section 4.7, finding that our approach and the previous works differ by numerical factors with one group, and that other groups double count some of the effects, leading to a more significant difference with our expression. Although we do not provide a full comparison of the complete expression, we will return to this issue in the future. Our result is in agreement with the previous comparison made in Ref. [39].
+
+The contribution to the bispectrum from the dominant terms discussed in Section 4.7 has been computed numerically in [99]. There, it is shown that for equal redshifts, the result is dominated by standard Newtonian terms. However, for different redshifts, the Newtonian terms rapidly decay and the result is soon dominated by new lensing contributions.
+
+The dominant projection effects are the redshift space distortions, which contribute up to 30% of the total signal at equal redshifts, both in the power spectrum and in the bispectrum, and the lensing terms which dominate the signal (99% of the total) for widely separated redshifts [99].
+---PAGE_BREAK---
+
+# 5. Conclusions and Outlook
+
+In this thesis, we have investigated instances in which nonlinear cosmological perturbation theory is needed to understand the Universe. We focused particularly on the late Universe and derived new analytic solutions to the gravitational wave or tensor evolution equation at linear order. We derived in an independent approach, the galaxy number overdensity up to second order and computed the differences with other groups in the literature, demonstrating the equivalence between the different approaches at linear order and for the leading terms at second order in perturbation theory. In spite of the emphasis of this thesis being only on the late Universe, many of the techniques used can be applied in far more general settings in cosmology.
+
+We started with a review of cosmological perturbation theory in Chapter 2, by discussing the main aspects of general relativity. We presented the governing equations for the evolution of spacetime, Einstein's field equations, both for the geometry as well as that of matter. We then reviewed relativistic perturbation theory in detail, accounting for the gauge issue and establishing general expressions for the later parts of the thesis. Finally, we applied the results to the case of perturbations around a FLRW spacetime and we wrote down the perturbed field equations up to second order.
+
+Chapter 3 included the research published in Ref. [100], where we derived new analytical solutions to the gravitational wave evolution equation at linear order in cosmological perturbation theory using the double power series method for approximating cosmological perturbations presented in Ref. [79] and including neutrino anisotropic stress. A key objective of this study was to find an approximate solution that would provide as much information as the numerical solution would, without having to perform the full numerical simulation, thus introducing a faster way to obtain solutions. We succeed in obtaining an approximation that is accurate to within 1% and is demonstrated in Figure 3.4. We then apply our analytical solutions to the governing equations for primordial gravitational waves in a radiation-matter model, presenting our main result in Eq. (3.39) which is a good approximation on both sub-horizon ($\tau \lesssim 1/k$) and super-horizon ($\tau \gtrsim 1/k$) scales for wavenumbers $k$ over
+---PAGE_BREAK---
+
+a wide range of values relevant for structure formation in the Universe. The best approximation we have found in the literature for sub-horizon primordial gravitational waves is, in fact, the WKB solution. This is accurate to within 0.8%, which compares with the accuracies for the two approximations of Figure 3.4 of ~0.25% for the real part (cos) and 1% for the imaginary part (sin), but is still considerably less accurate than our matching approximation for the radiation-matter mixture when started outside the horizon.
+
+Future work on this topic could take different directions. LIGO is detecting gravitational wave signals more often than ever and so it is important to take into account the existence of a gravitational wave background. Our approximation will be useful since it does not require the computational time demanded by numerical simulation and does not compromise on accuracy. For example, in second order cosmological perturbation theory, the governing equations include terms of the form $h_{ij}h^{ij}$ and different forms of the curvature perturbation, $\zeta$, at second order differ by terms proportional to this $h_{ij}h^{ij}$ (see e.g. Ref. [101]). Another effect our approximation allows us to study, is the dependence of the curvature perturbation at second order on the wavenumber and the neutrino-radiation ratio $f_\nu$, since the existence of neutrinos should be taken into account if we want accurate results.
+
+In Chapter 4, we presented an independent approach to computing the galaxy number counts, presenting the work done in Refs. [102, 103]. We have reviewed the research undertaken in the literature, from the first papers on cosmological observables by Kristian and Sachs in Ref. [26] in 1966 to one of the latest theoretical studies of the relativistic redshift in Ref. [37]. We then introduce definitions to provide an understanding of the galaxy number density, defining the photon wavevector, observed redshift, the angular diameter distance and the physical volume in which galaxies reside. We then proceed to apply the results from cosmological perturbation theory discussed in Chapter 2 and obtain the perturbed expressions for the null geodesics, the photon energy, the observed redshift, the angular diameter distance and the physical volume, all of which all of which define the galaxy number counts. We present all of our results in terms of the affine parameter $\lambda$ which parametrises the geodesic equation and makes our result easy to program, making it easy to compare with numerical simulations. We also provide an expression for the angular diameter distance in terms of the observed redshift, which can in principle be measured by the next generation of galaxy surveys and can be complementary to the luminosity distance through Etherington's reciprocity theorem mentioned in Section 4.7.5.
+---PAGE_BREAK---
+
+5. Conclusions and Outlook
+
+One of the main results of Chapter 4, presented in Eq. (4.98), is the galaxy number density fluctuation at second order. We proceed to compare this result to expressions derived in the literature, starting with the linear perturbation and finding that our result is in complete agreement with those in previous works. Finally, we present a comparison of the second order leading terms of the galaxy number overdensity that had been computed previously in Refs. [31–33, 35], finding that there is a slight difference arising from our definition of the direction of observation, the definition of convergence and double counting of some terms in Refs. [31, 32, 35] which would, in principle, over-estimate the galaxy number counts.
+
+We are still working to perform the full comparison term by term, including those that are only important at ultra large scales, where normally different observables tend to take a different shape depending on the gauge choice, similar to the power spectrum. We will also include vector and tensor perturbations up to and including second order, for completeness. We shall also include the effects of biasing and magnification bias which have been neglected in this first discussion. The calculation of its bispectrum and the comparison with others, will include the nonlinear effects of gravity, with a possible primordial bispectrum, which is necessary for any conclusions on primordial non-Gaussianities.
+
+Future work also includes the calculation of the Cartesian Fourier-space galaxy bispectrum and the galaxy 3-point correlation function including relativistic corrections using our model to probe non-Gaussianity. We could also perform a similar comparison as the one made in Section 4.7 instead using numerical simulations to get the differences between the different results studied in 4.7 and then plot a percentage difference, not only taking the leading terms but the full second order expressions. The main issue with this comparison would be that since it is numerical we would not be able to discern from which term (or terms) the difference comes from; integrated effects, pseudo-RSDs, or new unknown effects. Another possible issue is that the precision of upcoming galaxy surveys may not be able to measure these small differences. However, there will be more precise surveys in the future and this approach should not be neglected.
+
+The formalism followed in this chapter can also be used to study the impact of relativistic effects in the 3-dimensional cross-correlation between Lyman-α forest and quasars, or other combination of observables, taking into account the density parameters that go with each one of them.
+
+Throughout the thesis, we worked in standard unmodified theory of gravity, that is general relativity. However we have also studied a modified version of gravity
+---PAGE_BREAK---
+
+which has recently become popular whilst writing this thesis, and our results are included and presented in Appendix C; we present the calculation of the equations of motion in a modified Gauss-Bonnet theory of gravity at linear order in cosmological perturbation theory. Future work has been planned for this project in Ref. [104], since there has been a surge in interest in these modified theories of gravity in the past year (see, e.g. Refs. [9, 10]). Another interesting avenue of research to take would be the study of observables in such modified theories of gravity, and the possibility of these observables to act as a test for other gravity formulations.
+
+Finally, it is important to mention that during the research for this thesis, there were many challenging moments in which we encountered many setbacks. However, we overcame these challenges and proceeded to devise new solutions. One of the main problems that occurred whilst working on the galaxy number density was the problem of the notation; different groups used different notations and surprisingly, the notation seen in papers coming from the same group was also different (see Section 4.7). To overcome this problem it was needed for me to write all the other results in our own notation and that took some time, but in the end, that made the comparison easier, at least up to the leading terms in second order cosmological perturbation theory.
+
+The most challenging and frustrating problem we stumbled upon was the fact that the codes `xAct` and `xPand` can only work with derivatives of perturbed and unperturbed quantities, but do not work with integrated equations. For example, `xPand` can be used to derive Eqs. (4.20) and (4.21), however, it would be impossible to compute Eq. (4.23) solely with functions defined within the code itself, since $\delta^{(1)}\nu$ is obtained by integrating Eq. (4.20) along the line of sight. This problem became much more cumbersome whilst working at second order in cosmological perturbation theory, and was a major obstacle for the calculation of the galaxy number counts since almost every variable needs to be integrated along the line of sight. We were able to find a workaround to this problem by partially integrating some terms using the code and solving some other integrals by hand, and after writing everything back up in the code as like a normal equation, it was a long process, but it worked.
+---PAGE_BREAK---
+
+# A. Matching conditions and anisotropic stress calculations
+
+## A.1. Calculation of the matching conditions for approximating primordial gravitational waves
+
+In this appendix, we calculate the matching conditions needed to obtain the solution in Eq. (3.39) of Section 3.5. We start by matching the values of the functions $h_r$ of Eq. (3.36) and $h_{(2)}$ of 3.37 at the conformal time $\tau = 1/k$. This gives
+
+$$
+\begin{aligned}
+\sin(1) &= \frac{B_s \sin\left(\lambda\left(k, \frac{1}{k}\right)\right) + B_c \cos\left(\lambda\left(k, \frac{1}{k}\right)\right)}{\frac{1}{k}\left(\frac{1}{k} + 4\right)} \\
+&= \frac{k^2}{4k + 1} \left\{ B_s \sin\left(\lambda\left(k, \frac{1}{k}\right)\right) + B_c \cos\left(\lambda\left(k, \frac{1}{k}\right)\right) \right\},
+\end{aligned}
+\quad (A.1) $$
+
+where
+
+$$ \lambda\left(k, \frac{1}{k}\right) = 1 + \frac{1}{4k} \ln(1 + 4k). \quad (A.2) $$
+
+Note that
+
+$$ \left. \frac{\partial (\lambda(k, \tau))}{\partial \tau} \right|_{\tau=\frac{1}{k}} = k - \frac{1}{k\tau^2 + 4k\tau} \bigg|_{\tau=\frac{1}{k}} = k - \frac{k}{4k+1} = \frac{4k^2}{4k+1}, \quad (A.3) $$
+
+and
+
+$$ \left. \frac{\partial \left( \frac{1}{\tau(\tau+4)} \right)}{\partial \tau} \right|_{\tau=\frac{1}{k}} = - \frac{2(\tau+2)}{\tau^2(\tau+4)^2} \bigg|_{\tau=\frac{1}{k}} = - \frac{2k^3(2k+1)}{(4k+1)^2}. \quad (A.4) $$
+
+Using Eqs. A.3 and A.4 to calculate $h'_{(2)}(1/k)$, we match the first derivatives of with
+---PAGE_BREAK---
+
+A. Matching conditions and anisotropic stress calculations
+
+respect to $\tau$ of $h_r$ and $h_{(2)}$ at $\tau = 1/k$ to get
+
+$$
+\begin{equation}
+\begin{split}
+k \cos(1) - k \sin(1) &= \frac{4k^4}{(4k+1)^2} \left\{ B_s \cos \left( \lambda \left( k, \frac{1}{k} \right) \right) - B_c \sin \left( \lambda \left( k, \frac{1}{k} \right) \right) \right\} \\
+&\quad - \frac{2k^3(2k+1)}{(4k+1)^2} \left\{ B_s \sin \left( \lambda \left( k, \frac{1}{k} \right) \right) + B_c \cos \left( \lambda \left( k, \frac{1}{k} \right) \right) \right\}.
+\end{split}
+\tag{A.5}
+\end{equation}
+$$
+
+We can solve Eqs. A.1 and A.5 simultaneously to find
+
+$$
+\begin{align*}
+B_s &= \frac{4k+1}{4k^3} \left\{
+ \begin{aligned}[t]
+ &4k \left[ \cos(1) \cos\left(\lambda\left(k, \frac{1}{k}\right)\right) + \sin(1) \sin\left(\lambda\left(k, \frac{1}{k}\right)\right) \right] \\
+ &+ [\sin(1) + \cos(1)] \cos\left(\lambda\left(k, \frac{1}{k}\right)\right)
+ \end{aligned}
+\right\} \\
+&= \frac{4k+1}{4k^3} \left\{
+ \begin{aligned}[t]
+ &4k \cos\left(1 - \lambda\left(k, \frac{1}{k}\right)\right) + [\sin(1) + \cos(1)] \cos\left(\lambda\left(k, \frac{1}{k}\right)\right) \\
+ &+ [\sin(1) + \cos(1)] \sin\left(\lambda\left(k, \frac{1}{k}\right)\right)
+ \end{aligned}
+\right\} \\
+&= \frac{4k+1}{4k^3} \left\{
+ \begin{aligned}[t]
+ &4k \cos\left(\frac{1}{4k} \ln(1+4k)\right) + [\sin(1) + \cos(1)] \cos\left(1 + \frac{1}{4k} \ln(1+4k)\right) \\
+ &+ [\sin(1) + \cos(1)] \sin\left(1 + \frac{1}{4k} \ln(1+4k)\right)
+ \end{aligned}
+\right\} \tag{A.6}
+\end{align*}
+$$
+
+and
+
+$$
+\begin{align*}
+B_c &= \frac{4k+1}{4k^3} \left\{
+ \begin{aligned}[t]
+ &4k \left[ \sin(1) \cos\left(\lambda\left(k, \frac{1}{k}\right)\right) - \cos(1) \sin\left(\lambda\left(k, \frac{1}{k}\right)\right) \right] \\
+ &- [\sin(1) + \cos(1)] \sin\left(\lambda\left(k, \frac{1}{k}\right)\right)
+ \end{aligned}
+\right\} \\
+&= \frac{4k+1}{4k^3} \left\{
+ \begin{aligned}[t]
+ &4k \sin\left(1 - \lambda\left(k, \frac{1}{k}\right)\right) - [\sin(1) + \cos(1)] \sin\left(\lambda\left(k, \frac{1}{k}\right)\right) \\
+ &- [\sin(1) + \cos(1)] \sin\left(1 + \frac{1}{4k} \ln(1+4k)\right)
+ \end{aligned}
+\right\},
+\tag{A.7}
+\end{align*}
+$$
+
+where we recalled the definition of $\lambda(k, \tau)$ from Eq. (3.38). In going from the first
+to second lines of Eqs. A.6 and A.7, we have used standard trigonometric addition
+formulae.
+---PAGE_BREAK---
+
+A. Matching conditions and anisotropic stress calculations
+
+From Eq. (3.37), this gives us
+
+$$
+\begin{align}
+h_{(2)}(\tau) = \frac{4k+1}{4k^3\tau(4+\tau)} & \left[ 4k \left\{ \cos\left(\frac{1}{4k}\ln(1+4k)\right) \sin(\lambda(k,t)) \right. \right. \nonumber \\
+& \qquad \left. - \sin\left(\frac{1}{4k}\ln(1+4k)\right) \cos(\lambda(k,t)) \right\} \nonumber \\
+& + [\sin(1)+\cos(1)] \left\{ \cos\left(1+\frac{1}{4k}\ln(1+4k)\right) \sin(\lambda(k,t)) \right. \nonumber \\
+& \qquad \left. - \sin\left(1+\frac{1}{4k}\ln(1+4k)\right) \cos(\lambda(k,t)) \right\} \biggr] \tag{A.8a} \\
+& = \frac{4k+1}{4k^3\tau(4+\tau)} \Biggl[ 4k \sin(k\tau + L(k,t)) & + [\sin(1)+\cos(1)] \sin(k\tau + L(k,t)-1) \Biggr], \tag{A.8b}
+\end{align}
+$$
+
+where again we recalled the definition of $\lambda(k, \tau)$ from Eq. (3.38), and we have defined
+
+$$L(k, \tau) = \frac{1}{4k} \ln \left( \frac{1 + 4\tau^{-1}}{1 + 4k} \right). \quad (\text{A.9})$$
+
+We used standard trigonometric addition formulae to go from Eq. (A.8a) to Eq. (A.8b).
+
+From Eq. (3.36) and Eq. (A.8b), the matching approximation is therefore
+
+$$
+h_{rm}(\tau) =
+\begin{cases}
+\dfrac{\sin(k\tau)}{k\tau} & \text{if } \tau \le \dfrac{1}{k} \\
+\dfrac{4k+1}{4k^3\tau(4+\tau)} \left[ 4k \sin(k\tau + L(k,t)) + \mu \sin(k\tau + L(k,\tau)-1) \right] & \text{if } \tau \ge \dfrac{1}{k},
+\end{cases}
+\quad (\text{A.10})
+$$
+
+where $\mu = \sin(1) + \cos(1) = 1.38177...$.
+
+## A.2. Calculation of the anisotropic stress solution
+
+The method described in Ref. [79] works best for equations like
+
+$$Af''(\tau) + Cf'(\tau) + Bf(\tau) = 0. \quad (A.11)$$
+
+so we take Eq. (3.20) and write it as a system of ordinary second order differential
+---PAGE_BREAK---
+
+equations to get¹
+
+$$
+\mathbf{AX}''(\tau) + \mathbf{CX}'(\tau) + \mathbf{BX}(\tau) = \mathbf{0}. \quad (\text{A.12})
+$$
+
+where
+
+$$
+\mathbf{X}(\tau) = \begin{bmatrix} x_1(\tau) \\ x_2(\tau) \end{bmatrix} = \begin{bmatrix} h(\tau) \\ h'(\tau) \end{bmatrix},
+$$
+
+and
+
+$$
+\mathbf{A} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \quad \mathbf{C}(\tau) = \begin{bmatrix} 0 & -1 \\ 0 & f_2(\tau)/f_1(\tau) \end{bmatrix}, \quad \mathbf{B}(\tau) = \begin{bmatrix} 0 & 0 \\ f_4(\tau)/f_1(\tau) & f_3(\tau)/f_1(\tau) \end{bmatrix},
+$$
+
+where we have defined
+
+$$
+f_1(\tau) = -\frac{1}{96f_\nu(0)} \frac{\tau^2(1+\tau)(4+\tau)^2}{(2+\tau)^2}, \qquad (\text{A.13})
+$$
+
+$$
+f_2(\tau) = -\frac{1}{96f_{\nu}(0)} \frac{\tau(4+\tau)\{32+\tau(64+\tau[36+7\tau])\}}{(2+\tau)^3}, \quad (\text{A.14})
+$$
+
+$$
+f_3(\tau) = -\frac{1}{96f_{\nu}(0)} \frac{32 + \tau\{80 + \tau[44 + 8\tau + k^2(1+\tau)(4+\tau)^2]\}}{(2+\tau)^2} - \frac{1}{15}, \quad (\text{A.15})
+$$
+
+$$
+f_4(\tau) = -\frac{1}{96f_{\nu}(0)} \frac{k^2 \tau \{4 + \tau[16 + \tau(16 + 3\tau)]\}}{121569(2 + \tau)^3}. \quad (A.16)
+$$
+
+Following Ref. [79] we need to further decompose $\mathbf{B}(\tau) = \mathbf{B}_0(\tau) + \mathbf{B}_{-2}(\tau)k^2$ and
+those matrices are
+
+$$
+\mathbf{B}_{-2}(\tau) = \begin{bmatrix} 0 & 0 \\ 0 & b_0(\tau) \end{bmatrix}, \quad \text{and} \quad \mathbf{B}_0(\tau) = \begin{bmatrix} 0 & 0 \\ b_{-2}(\tau) & 1 \end{bmatrix}.
+$$
+
+where
+
+$$
+b_0(\tau) = \frac{4\{8f_v(0)(2+\tau)^2 + 5(8+\tau[20+\tau(11+2\tau)])\}}{5\tau^2(1+\tau)(4+\tau)^2}, \quad (\text{A.17})
+$$
+
+$$
+b_{-2}(\tau) = \frac{2}{\tau} + \frac{1}{1+\tau} - \frac{2}{2+\tau} + \frac{2}{4+\tau}. \tag{A.18}
+$$
+
+Finally, we use de *Double Power Series Method* in Ref. [80] to get Eqs. (3.22) and (3.33).
+
+¹Note. We are neglecting the term $\int_0^\tau K'(τ - t)h'(t)dt$ that arises from differentiating Eq. (3.20) because numerically the value is *negligible*.
+---PAGE_BREAK---
+
+# B. Perturbed quantities to second order
+
+## B.1. Connection coefficients
+
+The connection coefficients in a FLRW spacetime, in longitudinal gauge, up to second order are
+
+$$ \Gamma_{00}^0 = \mathcal{H} + \Phi_1' + \frac{1}{2}\Phi_2' - 2\Phi_1\Phi_1', \quad (B.1) $$
+
+$$ \Gamma_{0i}^0 = \Phi_{1,i} + \frac{1}{2}\Phi_{2,i} - 2\Phi_1\Phi_{1,i}, \quad (B.2) $$
+
+$$ \Gamma_{00}^i = \Phi_{1,i}^i + \frac{1}{2}\Phi_{2,i}^i + 2\Psi_1\Phi_{1,i}^i, \quad (B.3) $$
+
+$$ \Gamma_{j0}^i = \left[ \mathcal{H} - \Psi_1' - \frac{1}{2}\Psi_2' - 2\Psi_1\Psi_1' \right] \delta_j^i, \quad (B.4) $$
+
+$$ \Gamma_{ij}^0 = \left[ \mathcal{H} - 2\mathcal{H} \left( \Phi_1 + \Psi_1 + \frac{1}{2}\Phi_2 + \frac{1}{2}\Psi_2 - 2\Phi_1\Psi_1 - 2\Phi_1^2 \right) - \Psi_1' - \frac{1}{2}\Psi_2' + 2\Phi_1\Psi_1' \right] \delta_{ij}, \quad (B.5) $$
+
+$$ \Gamma_{jk}^i = -\delta_k^i \Psi_{1,j} - \delta_j^i \Psi_{1,k} + \delta_{jk} \Psi_{1,i}^i - \frac{1}{2} (\delta_k^i \Psi_{2,j} + \delta_j^i \Psi_{2,k} - \delta_{jk} \Psi_{2,i}^i) - 2\Psi_1 (\delta_k^i \Psi_{1,j} + \delta_j^i \Psi_{1,k} - \delta_{jk} \Psi_{1,i}^i), \quad (B.6) $$
+
+including only scalar perturbations. To translate the FLRW coefficients into Minkowski spacetime we just set $\mathcal{H} = 0$.
+---PAGE_BREAK---
+
+## B.2. Perturbed Ricci Tensor $R_{\mu\nu}$
+
+The perturbed Ricci tensor components in a FLRW spacetime, in longitudinal gauge, up to second order are
+
+$$
+\begin{aligned}
+R_{00} = & -3\mathcal{H}' + 3\Psi_1'' + \nabla^2\Phi_1 + 3\mathcal{H}(\Phi_1' + \Psi_1') + \mathcal{H}\left[\frac{3}{2}(\Phi_2' + \Psi_2') + 6(\Psi_1\Psi_1' - \Phi_1\Phi_1')\right] \\
+& + 2\Psi_1(3\Psi_1'' + \nabla^2\Phi_1) + \frac{1}{2}[6(\Psi_1')^2 - 6\Phi_1'\Psi_1' + 3\Psi_2'' + \nabla^2\Phi_2] - (\Phi_1 + \Psi_1)_{,i}\Phi_1^{,i},
+\end{aligned}
+\quad (B.7) $$
+
+$$ R_{0j} = 2(\Psi_1' + \mathcal{H}\Phi_1)_{,j} + \mathcal{H}(\Phi_{2,j} - 4\Phi_1\Phi_{1,j}) + 2\Psi_1'(2\Psi_1 - \Phi_1)_{,j} + 4\Psi_1\Psi_{1,j}' + \Psi_{2,j}', \quad (B.8) $$
+
+$$
+\begin{aligned}
+R_{ij} ={}& (2\mathcal{H}^2 + \mathcal{H}') \delta_{ij} + [\nabla^2\Psi_1 - \Psi_1'' - 2(2\mathcal{H}^2 + \mathcal{H}')(\Phi_1 + \Psi_1) - \mathcal{H}(\Phi_1' + 5\Psi_1')] \delta_{ij} \\
+& + (\Psi_1 - \Phi_1)_{,ij} + \{\Phi_1'\Psi_1' + (2\mathcal{H}^2 - \mathcal{H}')[4(\Phi_1)^2 + 4\Phi_1\Psi_1 - \Phi_2 - \Psi_2] \\
+& + \mathcal{H}\left[\Phi_1'(4\Phi_1 + 2\Psi_1) + 10\Phi_1\Psi_1' - \frac{1}{2}(\Phi_2' + 5\Psi_2')\right] - \frac{1}{2}(\Psi_2'' - \nabla^2\Psi_2) \\
+& + (\Psi_1')^2 + 2\Phi_1\Psi_1'' + 2\Psi_1\nabla^2\Psi_1 + (\Phi_1 + \Psi_1)_{,i}\Psi_{1,i}\} \delta_{ij} \\
+& + (3\Psi_1 - \Phi_1)_{,i}\Psi_{1,j} \\
+& + (\Phi_1 - \Psi_1)_{,i}\Phi_{1,j} + 2\Phi_1\Phi_{1,ij} + 2\Psi_1\Psi_{1,ij} + \frac{1}{2}(\Psi_2 - \Phi_2)_{,ij},
+\end{aligned}
+\quad (B.9) $$
+
+including only scalar perturbations. To translate the FLRW components into Minkowski spacetime we just set $\mathcal{H} = 0$.
+---PAGE_BREAK---
+
+## B.3. Second order quantities in terms of the
+metric potentials
+
+### B.3.1. Geodesic Equation
+
+Solving Eq. (4.7) at second order gives
+
+$$ \frac{d\delta^{(2)}\nu}{d\lambda} = -2\frac{d\Phi_2}{d\lambda} + (\Phi_2' + \Psi_2') + 4(\Psi_1\Psi_1' - \Phi_1\Phi_1') + 4\Phi_1\left(\frac{d\Phi_1}{d\lambda}\right) \quad (B.10) $$
+
+$$ \begin{aligned} & -4\delta^{(1)}\nu \left( \frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda} \right) - 4\delta^{(1)}n^i \Phi_{1,i} - 4\delta^{(1)}\nu (n^i \Psi_{1,i}) \\ & - 2\delta^{(1)}\nu \left( \frac{d\delta^{(1)}\nu}{d\lambda} \right) - 2\delta^{(1)}n^i (\delta^{(1)}\nu)_{,i} + 2\delta^{(1)}\nu (n^i \delta^{(1)}\nu)_{,i}, \end{aligned} $$
+
+$$ \frac{d\delta^{(2)}n^i}{d\lambda} = 2\frac{d\Psi_2}{d\lambda}n^i - (\Phi_2, i + \Psi_2, i) + 8\Psi_1\left(\frac{d\Psi_1}{d\lambda}\right)n^i + 4\left(\frac{d\Psi_1}{d\lambda}\right)\delta^{(1)}n^i \quad (B.11) $$
+
+$$ \begin{aligned} & -4\Psi_1 (\Phi_1, i + \Psi_1, i) - 4(\Phi_1 + \Psi_1)\Psi_1, i - 4\delta^{(1)}\nu (\Phi_1, i + \Psi_1, i) \\ & + 4 (\delta^{(1)}\nu\Psi_1' + \Psi_{1,k}\delta^{(1)}n^k)n^i - 2\delta^{(1)}\nu \left(\frac{d\delta^{(1)}n^i}{d\lambda}\right) \\ & - 2 (\delta^{(1)}n^k)(\delta^{(1)}n^i)_{,k} + 2[n^k (\delta^{(1)}n^i)_{,k}]. \end{aligned} $$
+
+Using Eq. (4.17), and the integrated version of Eqs. (4.20) and (4.21), we rewrite
+Eqs. (B.10) and (B.11) purely in terms of the metric potentials,
+
+$$ \begin{aligned} \frac{d\delta^{(2)}\nu}{d\lambda} = & -2\frac{d\Phi_2}{d\lambda} + (\Phi_2' + \Psi_2') + 4\Psi_1'(\Phi_1 + \Psi_1) + 4\Phi_1 \left(\frac{d\Phi_1}{d\lambda} - 2\frac{d\Psi_1}{d\lambda}\right) && (B.12) \\ & -8(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i + 8n^i\Phi_{1,i}(\Phi_1 - \Psi_1) \\ & +4(\Phi_1' - \Psi_1') \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') - 2n^i(\Phi_{1,i} + \Psi_{1,i}) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \\ & +2 \left(\frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda}\right) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 4(\Phi_1 - \Psi_1)n^i \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i} \\ & +2 \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i}\right) \\ & -2n^i \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')\right), \end{aligned} $$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+$$
+\begin{align}
+\frac{\mathrm{d}\delta^{(2)}n^i}{\mathrm{d}\lambda} = {}& 2 \frac{\mathrm{d}\Psi_2}{\mathrm{d}\lambda} n^i - (\Phi_{2,;}^i + \Psi_{2,;}^i) + 4 \left(\frac{\mathrm{d}\Psi_1}{\mathrm{d}\lambda}\right) (2\Phi_1 + 3\Psi_1) n^i \tag{B.13} \\
+& + 8 (\Phi_1\Phi_{1,;}^i - \Psi_1\Psi_{1,;}^i) + 4 (\Phi_1\Psi_{1,;}^i - \Psi_1\Phi_{1,;}^i) - 8\Phi_1 (\Psi_1' - n^k\Psi_{1,k}) n^i \nonumber \\
+& + 4 (\Psi_1 - \Phi_1) n^k \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i)_{,k} + 4 (\Psi_1' - n^k\Psi_{1,k}) n^i \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_1' + \Psi_1') \nonumber \\
+& - 4 \left(\frac{\mathrm{d}\Psi_1}{\mathrm{d}\lambda}\right) \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i) - 4n^i \left(\frac{\mathrm{d}\Psi_1}{\mathrm{d}\lambda}\right) \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_1' + \Psi_1') \nonumber \\
+& - 4 (\Phi_{1,;}^i + \Psi_{1,;}^i) \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_1' + \Psi_1') - 4\Phi_1 \int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i) \nonumber \\
+& + 2 \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_1' + \Psi_1')\right) \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i)\right) \nonumber \\
+& - 2 \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^k + \Psi_{1,;}^k)\right) \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i)_{,k}\right) \nonumber \\
+& - 2n^k \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_{1,;}^i + \Psi_{1,;}^i)_{,k}\right) \left(\int_{\lambda_o}^{\lambda_s} \mathrm{d}\lambda (\Phi_1' + \Psi_1')\right), \nonumber
+\end{align}
+$$
+
+where we integrate along the line of sight from $\lambda_o$ to $\lambda_s$.
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+**B.3.2. Energy**
+
+$$
+\begin{equation}
+\delta^{(1)} \mathcal{E} = \left(-2\Phi_1\bigg|_o^s + \int_{\lambda_o}^{\lambda_s} (\Phi_1' + \Psi_1') d\lambda\right) + \Phi_1 - (v_{1i}n^i), \tag{B.14}
+\end{equation}
+$$
+
+$$
+\begin{align}
+\delta^{(2)} \mathcal{E} = & \left(-2\Phi_2\bigg|_o^s + \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_2' + \Psi_2')\right) + \Phi_2 - (v_{2i}n^i) \nonumber \\
+& - 3\Psi_1^2 + (v_{1k}v_1^{k}) \tag{B.15} \\
+& + 2\Phi_1 \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 2v_{1i} \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1, i + \Psi_1, i) \nonumber \\
+& + 4 \int_{\lambda_o}^{\lambda_s} d\lambda [\Psi_1' (\Phi_1 + \Psi_1)] + 4 \int_{\lambda_o}^{\lambda_s} d\lambda \left[\Phi_1 \left(\frac{d\Phi_1}{d\lambda} - 2\frac{d\Psi_1}{d\lambda}\right)\right] \nonumber \\
+& - 8 \int_{\lambda_o}^{\lambda_s} d\lambda [(\Psi_1 \Phi_{1,i} - \Phi_1 \Psi_{1,i}) n^i] + 8 \int_{\lambda_o}^{\lambda_s} d\lambda [n^i \Phi_{1,i} (\Phi_1 - \Psi_1)] \nonumber \\
+& + \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \Biggl\{ & 4 (\Phi_1' - \Psi_1') \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') - 2n^i (\Phi_{1,i} + \Psi_{1,i}) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \nonumber \\
+& + 2 \left(\frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda}\right) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 4(\Phi_1 - \Psi_1)n^i \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')_{,i} \nonumber \\
+& + 2 \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \nonumber \\
+& - 2n^i \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')\right) \Biggr\}. \nonumber
+\end{align}
+$$
+
+**B.3.3. Observed redshift**
+
+$$
+\begin{equation}
+\begin{split}
+\delta^{(2)} z ={}& \delta^{(1)} \nu [ (v_{1i} n^i)_o - \Phi_1|_o ] - (\Phi_1|_s)(\Phi_1|_o) + \Phi_1|_o (v_{1i} n^i) + \Phi_1|_s (v_{1i} n^i)_o \\
+& - (v_{1i} n^i)_o (v_{1i} n^i)_s + (\Phi_1|_o)^2 - 2\Phi_1|_o (v_{1i} n^i)_o + (v_{1i} n^i)_o^2 \\
+& + \frac{1}{2} \Biggl\{
+ \begin{aligned}[t]
+ & \delta^{(2)} \nu + \Phi_2|_o^s - (v_{2i} n^i)_o^s + (\Phi_1|_o^s)^2 + (v_{1k} v_1^{k})_o^s + [4\Psi_1 (v_{1i} n^i)]_o^s \\
+ & \phantom{{}\delta^{(2)} \nu + } + 2\Phi_1|_s \delta^{(1)} \nu - 2v_{1i}\delta^{(1)} n^i
+ \end{aligned}
+ \Biggr\},
+\end{split}
+\tag{B.16}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+and using Eqs. (4.20), (4.21), (B.10) and (B.14), in terms of the metric potentials is
+
+$$
+\begin{equation}
+\begin{aligned}
+\delta^{(2)}z = & -\frac{1}{2}\Phi_2|_o^s - \frac{1}{2}(v_{2i}n^i)_o^s + \frac{1}{2}\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_2' + \Psi_2') \\
+& -\frac{3}{2}(\Phi_1|_o^s)^2 + 6\Phi_1|_s\Phi_1|_o + \Phi_1|_o(v_{1i}n^i)_s - \Phi_1|_s(v_{1i}n^i)_o - (v_{1i}n^i)_o(v_{1i}n^i)_o^s \\
+& -2\Psi_1|_o(v_{1i}n^i)_o + \Phi_1|_o^s \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + (v_{1i}n^i)_o \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \\
+& + \Phi_1 \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 2v_{1i} \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1, i + \Psi_1, i) \\
+& + 2 \int_{\lambda_o}^{\lambda_s} d\lambda [\Psi_1'(\Phi_1 + \Psi_1)] + 2 \int_{\lambda_o}^{\lambda_s} d\lambda \left[\Phi_1 \left(\frac{d\Phi_1}{d\lambda} - 2\frac{d\Psi_1}{d\lambda}\right)\right] \\
+& - 4 \int_{\lambda_o}^{\lambda_s} d\lambda [(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] + 4 \int_{\lambda_o}^{\lambda_s} d\lambda [n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] \\
+& + \int_{\lambda_o}^{\lambda_s} d\tilde{\chi} \left\{
+ \begin{aligned}[t]
+ & 2(\Phi_1' - \Psi_1') \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \\
+ & + \left(\frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda}\right) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i} \\
+ & + \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \\
+ & - n^i \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')\right)
+ \end{aligned}
+\right\}.
+\end{aligned}
+\tag{B.17}
+\end{equation}
+$$
+
+We will need the derivative of the redshift perturbation w.r.t. the affine parameter
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+$v$ for the *volume density*, and that is given by
+
+$$
+\begin{align}
+\frac{\mathrm{d}\delta^{(2)}z}{\mathrm{d}\nu} &= \frac{1}{2} \left[ \Psi_2' - \partial_\chi \Phi_2 - \frac{\mathrm{d}(v_{2i}n^i)}{\mathrm{d}\nu} + \frac{\mathrm{d}(v_{1k}v_1^k)}{\mathrm{d}\nu} \right] - 3\Phi_1 \left( \frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} \right) \tag{B.18} \\
+&\quad + \frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} (v_{1i}n^i) + \Phi_1 \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\nu} - (v_{1i}n^i) \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\nu} - 2\frac{\mathrm{d}\Psi_1}{\mathrm{d}\nu} (v_{1i}n^i) - 2\Psi_1 \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\nu} \nonumber \\
+&\quad + \frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') \nonumber \\
+&\quad + \frac{\mathrm{d}(v_{1i}n^i)}{\mathrm{d}\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + (v_{1i}n^i) (\Phi_1' + \Psi_1') \nonumber \\
+&\quad + \frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') \nonumber \\
+&\quad + 2\frac{\mathrm{d}v_{1i}}{\mathrm{d}\nu} \int_0^{\chi_s} d\chi (\Phi_{1,}^{\phantom{i}} + \Psi_{1,}^{\phantom{i}}) + 2v_{1i} (\Phi_{1,}^{\phantom{i}} + \Psi_{1,}^{\phantom{i}}) \nonumber \\
+&\quad + 2[\Psi_1'(\Phi_1 + \Psi_1)] + 2\left[\Phi_1\left(\frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} - 2\frac{\mathrm{d}\Psi_1}{\mathrm{d}\nu}\right)\right] \nonumber \\
+&\quad - 4[(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] + 4[n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] \nonumber \\
+&\quad + 2(\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \nonumber \\
+&\quad + \left(\frac{\mathrm{d}\Phi_1}{\mathrm{d}\nu} - \frac{\mathrm{d}\Psi_1}{\mathrm{d}\nu}\right) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i} \nonumber \\
+&\quad + \left(\int_0^{\chi_s} d\chi (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \nonumber \\
+&\quad - n^i \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')\right). \nonumber
+\end{align}
+$$
+
+**B.3.4. Angular diameter distance**
+
+Using Eqs. (4.20), (4.21), (B.12), (B.13), (B.15), (4.53), (B.7), (B.8), (B.9) and (4.61) we find that the second order perturbation to the angular diameter distance
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+becomes
+
+$$
+\begin{equation}
+\begin{aligned}
+\frac{\delta^{(2)} d_A(\lambda_s)}{\bar{d}_A(\lambda_s)} &= \Phi_2|_o - \Psi_2|_o - \Psi_2|_s - (v_{2i} n^i)_o + (\Phi_1|_o)^2 + (v_{1k} v_1^k)_o \\
+&\quad + 4\Psi_1|_o (v_{1i} n^i)_o - \frac{1}{\lambda_o - \lambda_s} \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_2 + \Psi_2) \\
+&\quad - \frac{1}{2(\lambda_o - \lambda_s)} \int_{\lambda_o}^{\lambda_s} d\lambda (\lambda_s - \lambda) (\lambda_o - \lambda) \left[ \frac{1}{2}\nabla^2 (\Phi_2 + \Psi_2) \right. \\
+&\quad \left. + \frac{1}{2}(\Phi_1 + \Psi_1)_{,ij} n^i n^j - \frac{2}{\lambda_o - \lambda} \left( \frac{d\delta^{(2)}\nu}{d\lambda} \right) \right] \\
+&\quad - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,ij} \right) \left( \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,ij} \right) \\
+ & - \frac{1}{4} \left[ \int_{\lambda_o}^{\lambda_s} d\lambda \nabla^2 (\Phi_1 + \Psi_1) \right]^2
+ \end{aligned}
+\right\} + \frac{1}{\lambda_o - \lambda_s} \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left[ \frac{1}{2}\Phi_1' (5\Psi_1' - 3\Psi_1) \right. \\
+&\quad + \frac{1}{2} (\Phi_1' - \Psi_1' - \frac{d\Phi_1}{d\lambda} + \frac{d\Psi_1}{d\lambda})^2 + \Psi_1\nabla^2 (\Phi_1 + \Psi_1) + \frac{1}{2}\Psi_{1,k}{}^k (\Phi_{1,k} + \Psi_{1,k}) \\
+&\quad + \Psi_1 (3\Psi_1'' + \Psi_{1,ij} n^i n^j) + \Phi_1 (\Psi_1'' + \Phi_{1,ij} n^i n^j) + 4\Psi_1 (\Psi_1' - \frac{d\Psi_1}{d\lambda}) \\
+&\quad - 2\Psi_1'' (\frac{d\Psi_1}{d\lambda}) + 2 (\frac{d\Psi_1}{d\lambda})^2 + 2\delta^{(1)}\nu\nabla^2 (\Phi_1 + \Psi_1) + 4\delta^{(1)}\nu (\frac{d\Psi_1'}{d\lambda}) \\
+&\quad + 2 (\Phi_1 + \Psi_1) (\nabla^2\Psi_1 - \Psi_1'') + 4\delta^{(1)}n^i\Psi_{1,i} + 2n^i\delta^{(1)}n^j (\Psi_1 - \Phi_1)_{,ij} \\
+&\quad \left. - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & [\frac{d^2\Psi_1}{d\lambda^2} + \nabla^2 (\Phi_1 + \Psi_1) - (\Phi_1 + \Psi_1)_{,ij} n^i n^j] \delta^{(1)} d_A \\
+ & - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & \delta^{(1)}\nu (\delta^{(1)}\nu)' + \delta^{(1)}n^i (\delta^{(1)}\nu)_{,i} + 3[\delta^{(1)}\nu (\frac{d\Phi_1}{d\lambda} - \Psi_1) \\
+ & - (\Phi_1 + \Psi_1)\Psi_1'] + 4\delta^{(1)}\nu (\frac{d^2\delta^{(2)}d_A}{d\lambda^2}) + 4(\frac{d\delta^{(1)}\nu}{d\lambda})(\frac{d\delta^{(1)}d_A}{d\lambda})
+ \end{aligned}
+ \right\}
+ \end{aligned}
+\right\}.
+\end{aligned}
+\tag{B.19}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+And the angular distance in terms of the observed redshift is given by
+
+$$
+\begin{align}
+\delta^{(2)} \hat{d}_A (\hat{z}_s) &= \frac{\chi_s}{2(1+\hat{z}_s)} \left\{
+ \begin{aligned}[t]
+ & \frac{\delta^{(2)} d_A}{\bar{d}_A} + \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \delta^{(2)} z \\
+ & + 2 \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \left(\frac{\delta^{(1)} d_A}{\bar{d}_A} + \frac{1}{\mathcal{H}} \frac{d\delta^{(1)}z}{d\nu}\right) \delta^{(1)} z \\
+ & + 2 \frac{d}{d\nu} \left(\frac{\delta^{(1)} d_A}{\bar{d}_A}\right) \frac{\delta^{(1)} z}{\mathcal{H}} + \frac{\mathcal{H}' - \mathcal{H}^2}{\mathcal{H}^3 \chi_s} (\delta^{(1)} z)^2
+ \end{aligned}
+\right\} \tag{B.20}
+\end{align}
+$$
+
+$$
+\begin{align*}
+&= \frac{\chi_s}{2(1+\hat{z}_s)} \Biggl[ -\Psi_2|_s - \Psi_2|_o - \left(1-\frac{1}{\mathcal{H}\chi_s}\right)\Phi_2|_s + 2\left(1-\frac{1}{\mathcal{H}\chi_s}\right)(v_{2i}n^i)_o \\
+&\quad + \left(1-\frac{1}{\mathcal{H}\chi_s}\right)(v_{2i}n^i)_s + \left(1-\frac{1}{\mathcal{H}\chi_s}\right)\int_0^{\chi_s} d\chi (\Phi_{2'} + \Psi_{2'}) \\
+&\quad - \frac{1}{2\chi_s}\int_0^{\chi_s} d\chi (\chi-\chi_s)\chi \left[\nabla^2(\Phi_2+\Psi_2)-n^in^j(\Phi_2+\Psi_2)_{,ij}-\frac{2}{\chi}\frac{d\delta^{(2)}\nu}{d\nu}\right] \\
+&\quad + \frac{1}{2}\left(1-\frac{1}{\mathcal{H}\chi_s}\right)(v_{1k}v_1^k)_s + \frac{1}{2}\left(1+\frac{1}{\mathcal{H}\chi_s}\right)(v_{1k}v_1^k)_o \\
+&\quad - \frac{1}{2}\left(1+\frac{1}{\mathcal{H}\chi_s}\right)(\Phi_1|_o)^2 + 2\left(1+\frac{2}{\mathcal{H}\chi_s}\right)\Psi_1|_o(v_{1i}n^i)_o \\
+&\quad + \left(1-\frac{1}{\mathcal{H}\chi_s}\right)[\Phi_1|_o(v_{1i}n^i)_s - \Phi_1|_s(v_{1i}n^i)_o + 6\Phi_1|_s\Psi_1|_o - (v_{1i}n^i)_o(v_{1i}n^i)_o^s] \\
+&\quad - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1+\Psi_1)_{,ij}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1+\Psi_1)_{,ij}\right) \\
+ & - \frac{1}{4} \left[\int_{\lambda_o}^{\lambda_s} d\lambda \nabla^2 (\Phi_1+\Psi_1)\right]^2
+ \end{aligned}
+\right\} + \frac{1}{\lambda_o-\lambda_s} \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left[
+ \begin{aligned}[t]
+ & \frac{1}{2}\Phi_1' (5\Psi_1'-3\Psi_1) \\
+ & + \frac{1}{2} (\Phi_1'-\Psi_1'-\frac{d\Phi_1}{d\lambda}+\frac{d\Psi_1}{d\lambda})^2 + \Psi_1\nabla^2 (\Phi_1+\Psi_1) + \frac{1}{2}\Psi_1{}^k (\Phi_{1,k}+\Psi_{1,k}) \\
+ & + \Psi_1 (3\Psi_1''+\Psi_{1,ij}n^in^j) + \Phi_1 (\Psi_1''+\Phi_{1,ij}n^in^j) + 4\Psi_1 (\Psi_1'-\frac{d\Psi_1}{d\lambda}) \\
+ & - 2\Psi_1'' (\frac{d\Psi_1}{d\lambda}) + 2 (\frac{d\Psi_1}{d\lambda})^2 + 2\delta^{(1)}\nu\nabla^2 (\Phi_1+\Psi_1) + 4\delta^{(1)}\nu (\frac{d\Psi_1'}{d\lambda}) \\
+ & + 2 (\Phi_1+\Psi_1) (\nabla^2\Psi_1-\Psi_1'') + 4\delta^{(1)}n^i\Psi_{1,i} + 2n^i\delta^{(1)}n^j (\Psi_1-\Phi_1)_{,ij}
+ \end{aligned}
+\right] \\
+&\quad - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & [\frac{d^2\Psi_1}{d\lambda^2}+\nabla^2(\Phi_1+\Psi_1)-(\Phi_1+\Psi_1)_{,ij}n^in^j] \delta^{(1)} d_A \\
+ & - \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & \delta^{(1)}\nu (\delta^{(1)}\nu)' + \delta^{(1)}n^i (\delta^{(1)}\nu)_{,i} + 3[\delta^{(1)}\nu (\frac{d\Phi_1}{d\lambda}-\Psi_1) \\
+ & - (\Phi_1+\Psi_1)\Psi_1'] + 4\delta^{(1)}\nu (\frac{d^2\delta^{(1)}d_A}{d\lambda^2}) + 4 (\frac{d\delta^{(1)}\nu}{d\lambda}) (\frac{d\delta^{(1)}d_A}{d\lambda})
+ \end{aligned}
+ \right\}
+ \end{aligned}
+\right.
+\end{align*}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+$$
+\begin{align*}
+& + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_o^s \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') \\
+& + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1 \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 2\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) v_{1i} \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_{1,i} + \Psi_{1,i}) \\
+& + 2\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_{\lambda_o}^{\lambda_s} d\lambda [\Psi_1'(\Phi_1 + \Psi_1)] + 2\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_{\lambda_o}^{\lambda_s} d\lambda \left[\Phi_1\left(\frac{d\Phi_1}{d\lambda} - 2\frac{d\Psi_1}{d\lambda}\right)\right] \\
+& - 4\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_{\lambda_o}^{\lambda_s} d\lambda [(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] + 4\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_{\lambda_o}^{\lambda_s} d\lambda [n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] \\
+& + \int_{\lambda_o}^{\lambda_s} d\tilde{\lambda} \left\{
+ \begin{aligned}[t]
+ & 2(\Phi_1' - \Psi_1') \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')
+ \end{aligned}
+ \right.
+ \\
+& + \left(\frac{d\Phi_1}{d\lambda} - \frac{d\Psi_1}{d\lambda}\right) \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i} \\
+& + \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \\
+& - n^i \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1)_{,i}\right) \left(\int_{\lambda_o}^{\lambda_s} d\lambda (\Phi_1' + \Psi_1')\right) \Biggr\} \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \\
+& - 2\left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \left[
+ \begin{aligned}[t]
+ & (v_{1i}n^i)_o^s + \Phi_1|_o^s \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi
+ \end{aligned}
+ \right] \times \\
+& - \Psi_1|_s - \Psi_1|_o - \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_s + \left(2 - \frac{2}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_s \\
+& + \frac{1}{\mathcal{H}}\left(\Psi_1' - \partial_\chi \Phi_1 + \frac{d(v_{1i}n^i)}{d\nu}\right) + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi \\
+& - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[\nabla^2(\Phi_1 + \Psi_1) - n^in^j(\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi}\frac{d\delta^{(1)}\nu}{d\nu}\right] \\
+& - \frac{2}{\mathcal{H}}\left[
+ \begin{aligned}[t]
+ & -\Psi_1|_s - \Psi_1|_o - \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \Phi_1|_s + \left(2 - \frac{2}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_o \\
+ & + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) (v_{1i}n^i)_s + \left(1 - \frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi \\
+ & - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[\nabla^2(\Phi_1 + \Psi_1) - n^in^j(\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi}\frac{d\delta^{(1)}\nu}{d\nu}\right]
+ \end{aligned}
+ \right] \\
+& + (v_{1i}n^i)_o^s + \Phi_1|_o^s + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \\
+& + \frac{\mathcal{H}' - \mathcal{H}^2}{\mathcal{H}^3\chi_s} \left[
+ \begin{aligned}[t]
+ & (v_{1i}n^i)_o^s + \Phi_1|_o^s + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi
+ \end{aligned}
+ \right]^2.
+\end{align*}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+**B.3.5. Physical volume**
+
+The second order perturbation to the physical volume is
+
+$$
+\begin{align}
+d\delta^{(2)}V ={}& \frac{\chi^2}{\mathcal{H}(1+z)} \left\{ \frac{1}{\mathcal{H}} \left[ \frac{1}{2} \left( \Psi_2' - \partial_\chi \Phi_2 - \frac{d(v_{2i}n^i)}{d\nu} + \frac{d(v_{1k}v_1^k)}{d\nu} \right) + \frac{d(v_{1i}v_1^i)}{d\nu} + \frac{d(v_{1i}n^i)}{d\nu} \right] \right. \tag{B.21} \\
+& \left. - 3\Phi_1 \left( \frac{d\Phi_1}{d\nu} \right) + \frac{d\Phi_1}{d\nu} (v_{1i}n^i) + \Phi_1 \frac{d(v_{1i}n^i)}{d\nu} - (v_{1i}n^i) \frac{d(v_{1i}n^i)}{d\nu} - 2\frac{d\Psi_1}{d\nu} (v_{1i}n^i) \right. \nonumber \\
+& \left. - 2\Psi_1 \frac{d(v_{1i}n^i)}{d\nu} + \frac{d\Phi_1}{d\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') \right. \nonumber \\
+& \left. + \frac{d(v_{1i}n^i)}{d\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + (v_{1i}n^i) (\Phi_1' + \Psi_1') \right. \nonumber \\
+& \left. + \frac{d\Phi_1}{d\nu} \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + \Phi_1 (\Phi_1' + \Psi_1') + 2\frac{dv_{1i}}{d\nu} \int_0^{\chi_s} d\chi (\Phi_{1,i}^{} + \Psi_{1,i}^{}) + 2v_{1i} (\Phi_{1,i}^{} + \Psi_{1,i}^{}) \right. \nonumber \\
+& \left. + 2[\Psi_1'(\Phi_1 + \Psi_1)] + 2\left[ \Phi_1 \left( \frac{d\Phi_1}{d\nu} - 2\frac{d\Psi_1}{d\nu} \right) \right] - 4[(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i})n^i] \right. \nonumber \\
+& \left. + 4[n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] + 2(\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i(\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \right. \nonumber \\
+& \left. + (\frac{d\Phi_1}{d\nu} - \frac{d\Psi_1}{d\nu}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_i, \right. \nonumber \\
+& \left. + (\int_0^{\chi_s} d\chi(\Phi_1+\Psi_1),^i) (\int_0^{\chi_s} d\chi(\Phi_1'+\Psi_1'),^i) \right. \nonumber \\
+& \left. - n^i (\int_0^{\chi_s} d\chi(\Phi_1'+\Psi_1'),^i) (\int_0^{\chi_s} d\chi(\Phi_1'+\Psi_1')) \right] \nonumber \\
+& - \frac{1}{2}\frac{\mathcal{H}'}{\mathcal{H}^2} \Biggl[ & -\frac{1}{2}\Phi_2|_{o}^{s} - \frac{1}{2}(v_{2i}n^{i})_{o}^{s} + \frac{1}{2}\int_{0}^{\chi_{s}} d\chi (\Phi_{2}' + \Psi_{2}') + \frac{1}{2}(v_{1k}v_{1}^{k})_{o}^{s} \nonumber \\
+& -\frac{3}{2}(\Phi_{1}|_{o}^{s})^{2} + 6\Phi_{1}|_{s}\Phi_{1}|_{o} + \Phi_{1}|_{o}(v_{1i}n^{i})_{s} - \Phi_{1}|_{s}(v_{1i}n^{i})_{o} - (v_{1i}n^{i})_{o}(v_{1i}n^{i})_{o}^{s} \nonumber \\
+& - 2\Psi_{1}|_{o}(v_{1i}n^{i})_{o} + \Phi_{1}|_{o}\int_{0}^{\chi_{s}} d\chi (\Phi_{1}' + \Psi_{1}') + (v_{1i}n^{i})_{o}\int_{0}^{\chi_{s}} d\chi (\Phi_{1}' + \Psi_{1}') \nonumber \\
+& + \Phi_{1}\int_{0}^{\chi_{s}} d\chi (\Phi_{1}' + \Psi_{1}') + 2v_{1i}\int_{0}^{\chi_{s}} d\chi (\Phi_{1, }^{i} + \Psi_{1, }^{i}) \nonumber \\
+& + 2\int_{0}^{\chi_{s}} d\chi [\Psi_{1}'(\Phi_{1} + \Psi_{1})] + 2\int_{0}^{\lambda s} d\chi \left[ \Phi_{1}\left(\frac{d\Phi_{1}}{d\nu}-2\frac{d\Psi_{1}}{d\nu}\right) \right] & \\
+& - 4\int_{0}^{\chi s} d\chi [(\Psi_{1}\Phi_{1,i}-\Phi_{1}\Psi_{1,i})n^{i}] + 4\int_{0}^{\chi s} d\chi [n^{i}\Phi_{1,i}(\Phi_{1}-\Psi_{1})] & \\
+& + \int_{0}^{\chi s} d\tilde{\chi}\Biggl\{ & 2(\Phi'_{1}-\Psi'_{1})\int_{0}^{\chi s} d\chi (\Phi'_{1}+\Psi'_{1})-n^{i}(\Phi'_{1,i}+\Psi'_{1,i})\int_{0}^{\chi s} d\chi (\Phi'_{1}+\Psi'_{1}) & \\
+& + (\frac{d\Phi_1}{d\nu}-\frac{d\Psi_1}{d\nu})\int_0^{\chi s} d\chi (\Phi'_1+\Psi'_1)+2(\Phi_1-\Psi_1)n^i\int_0^{\chi s} d\chi (\Phi'_1+\Psi'_1)_i & \\
+& + (\int_0^{\chi s} d\chi(\Phi_1+\Psi_1),^i) (\int_0^{\chi s} d\chi(\Phi'_1+\Psi'_1),^i) & &
+\end{align}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+$$
+\begin{aligned}
+& -n^i \left( \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i} \right) \left( \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \right) \Biggr\} + \frac{3}{2\mathcal{H}^2} \left[ \Psi_1' - \partial_\chi \Phi_1 - \frac{d(v_{1i}n^i)}{d\nu} \right]^2 \\
+& + \frac{1}{2} \left(\frac{\mathcal{H}'}{\mathcal{H}^2}\right) \left(1+\frac{\mathcal{H}'}{\mathcal{H}^2}\right) \left[ \left(v_{1i}n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi\right) \right]^2 \\
+& + \frac{1}{2\mathcal{H}^2} \left(2\left[\frac{\mathcal{H}'}{\mathcal{H}}\right]^2 + \frac{\mathcal{H}''}{\mathcal{H}}\right) \left[ \left(v_{1i}n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi\right) \right]^2 \\
+& + \frac{1}{2\mathcal{H}} \left(1+2\frac{\mathcal{H}'}{\mathcal{H}^2}\right) \left(\Psi_1' - \partial_\chi \Phi_1 - \frac{d(v_{1i}n^i)}{d\nu}\right) \left[v_{1i}n^i + \Phi_1 + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi\right] \\
+& + \left[-\Psi_1|_s - \Psi_1|_o - \left(1-\frac{1}{\mathcal{H}\chi_s}\right)\Phi_1|_s + \left(2-\frac{2}{\mathcal{H}\chi_s}\right)(v_{1i}n^i)_o + \left(1-\frac{1}{\mathcal{H}\chi_s}\right)(v_{1i}n^i)_s\right. \\
+& \qquad \left. + \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi\right] \\
+& - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\nu} \right]^2 \\
+& + \left[-\Phi_1|_o^s + \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi + \Phi_1 - (v_{1i}n^i)\right] \left[-\Psi_1|_s - \Psi_1|_o - \left(1-\frac{1}{\mathcal{H}\chi_s}\right)\Phi_1|_s\right] \\
+& + \left(2-\frac{2}{\mathcal{H}\chi_s}\right)(v_{1i}n^i)_o + \left(1-\frac{1}{\mathcal{H}\chi_s}\right)(v_{1i}n^i)_s + \left(1-\frac{1}{\mathcal{H}\chi_s}\right) \int_0^{\chi_s} (\Phi_1' + \Psi_1') d\chi \\
+& - \frac{2}{\chi_s} \int_0^{\chi_s} \Psi_1 d\chi - \frac{1}{2\chi_s} \int_0^{\chi_s} d\chi (\chi - \chi_s) \chi \left[ \nabla^2 (\Phi_1 + \Psi_1) - n^i n^j (\Phi_1 + \Psi_1)_{,ij} - \frac{2}{\chi} \frac{d\delta^{(1)}\nu}{d\nu} \right] \\
+& + \frac{1}{2} \left[ \delta^{(2)}\nu + \Phi_2 - (v_{2i}n^i) + 2\Phi_1\delta^{(1)}\nu - 2v_{1i}\delta^{(1)}n^i + \Phi_1^2 + (v_{1k}v_1^k) + 4\Psi_1 (v_{1i}n^i) \right] \\
+& \qquad + \frac{\delta^{(2)}d_A}{d_A}.
+\end{aligned}
+$$
+---PAGE_BREAK---
+
+B. Perturbed quantities to second order
+
+**B.3.6. Redshift density**
+
+Using Eqs. (4.30), (B.16) and (4.96) in Eq. (4.91) we find that the redshift density perturbation at second order is given by
+
+$$
+\begin{align*}
+\delta_z^{(2)}(n^i, z) &= \frac{1}{2} \frac{\delta^{(2)}\rho(n^i, z)}{\rho(\bar{z})} + \frac{3}{2(1+\bar{z})} \delta^{(2)}z(n^i, z) + \frac{3}{(1+\bar{z})^2} [\delta^{(1)}z(n^i, z)]^2 + \frac{d\delta^{(1)}\rho}{d\bar{z}} \frac{\delta^{(1)}z(n^i, z)}{\bar{\rho}} \\
+&= \frac{1}{2} \frac{\delta^{(2)}\rho(n^i, z)}{\rho(\bar{z})} + \frac{3}{2} \left[ -\frac{1}{2}\Phi_2|_o^s - \frac{1}{2}(v_{2i}n^i)_o^s + \frac{1}{2}\int_0^{\chi_s} d\chi (\Phi_2' + \Psi_2') + \frac{1}{2}(v_{1k}v_1^k)_o^s \right. \\
+&\quad - \frac{3}{2}(\Phi_1|_o^s)^2 + 6\Phi_1|_s\Phi_1|_o + \Phi_1|_o (v_{1i}n^i)_s - \Phi_1|_s (v_{1i}n^i)_o - (v_{1i}n^i)_o (v_{1i}n^i)_o^s \\
+&\quad - 2\Psi_1|_o (v_{1i}n^i)_o + \Phi_1|_o^s \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + (v_{1i}n^i)_o \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \\
+&\quad + \Phi_1 \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2v_{1i} \int_0^{\chi_s} d\chi (\Phi_{1,i} + \Psi_{1,i}) \\
+&\quad + 2 \int_0^{\chi_s} d\chi [\Psi_1' (\Phi_1 + \Psi_1)] + 2 \int_0^{\chi_s} d\chi [\Phi_1 \left(\frac{d\Phi_1}{d\nu} - 2\frac{d\Psi_1}{d\nu}\right)] \\
+&\quad - 4 \int_0^{\chi_s} d\chi [(\Psi_1\Phi_{1,i} - \Phi_1\Psi_{1,i}) n^i] + 4 \int_0^{\chi_s} d\chi [n^i\Phi_{1,i}(\Phi_1 - \Psi_1)] \\
+&\quad + \int_0^{\chi_s} d\tilde{\chi} \left\{
+ \begin{aligned}[t]
+ & 2(\Phi_1' - \Psi_1') \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') - n^i (\Phi_{1,i} + \Psi_{1,i}) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') \\
+ & + \left(\frac{d\Phi_1}{d\nu} - \frac{d\Psi_1}{d\nu}\right) \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1') + 2(\Phi_1 - \Psi_1)n^i \int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i} \\
+ & + \left(\int_0^{\chi_s} d\chi (\Phi_1 + \Psi_1)_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \\
+ & - n^i \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')_{,i}\right) \left(\int_0^{\chi_s} d\chi (\Phi_1' + \Psi_1')\right)
+ \end{aligned}
+\right\} \\
+&\quad + 3 \left[ -(v_{1i}n^i + \Phi_1)|_o^s + \int_0^{\chi_s} [\Phi_1' + \Psi_1'] d\chi \right]^2 \\
+&\quad + \frac{d\delta^{(1)}\rho}{d\bar{z}} \frac{1}{\bar{\rho}} \left[ -(v_{1i}n^i + \Phi_1)|_o^s + \int_0^{\chi_s} [\Phi_1' + \Psi_1'] d\chi \right] \tag{B.22}
+\end{align*}
+$$
+---PAGE_BREAK---
+
+# C. Modified Gauss-Bonnet
+
+## C.1. Introduction
+
+Recent observations show that the universe is expanding at an accelerated rate, at the moment the cause of this is still unknown. In the cosmological standard model, one can assume different mechanisms to describe dark energy (DE) such as the cosmological constant $\Lambda$, or scalar fields: quintessence, $k$-essence, and many other alternatives [6, 105–107]. Current surveys are being planned like DES [108], DESI [109], Euclid [110], and LSST [14] to probe large scales in order to find an answer to this problem.
+
+Dark energy in general relativity (GR) is usually considered as a change in the energy momentum tensor, $T_{\mu\nu}$, however one can change the left hand side of the Einstein field equations and take the accelerated expansion as an effect coming from the geometry of spacetime, this is usually called modified gravity. Research has focused until recently in models with $f(R)$, a function of the Ricci scalar [111–115], but one can also focus on more complex models like $f(R, T)$, where $T$ is the trace of the energy momentum tensor [116]. Among this modified theories of gravity, Gauss-Bonnet (GB) gravity has been widely studied in its $f(G)$ approach [117, 118], where gravity is required to couple with some scalar field $G$ [106, 119, 120]. Recent work [121] has focused on the study of “almost scale-invariant theories” where $f(R, G)$ is a function of the Ricci scalar and the GB term
+
+$$G = R^2 - 4R_{\mu\nu}R^{\mu\nu} + R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}, \quad (C.1)$$
+
+where $R_{\mu\nu}$ is the Ricci tensor and $R_{\mu\nu\rho\sigma}$ is the Riemann tensor. This model was initially proposed as a gravitational alternative for DE and inflation in Ref. [122] and its applications to late-time cosmology have been studied in [122–124].
+
+Modified theories of gravity do have their problems, such as Ostrogradsky instabilities [125, 126] and ghosts [127], but with a particular choice of a Lagrangian one can avoid this typical problems and find cosmological solutions as power-law inflation and local attractors [121]. In Ref. [121] the authors prove that it is possible to
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+get interesting cosmological solutions for a particular choice of Lagrangian, more-
+over in Ref. [128] it is shown that ghosts can be removed from $f(R, G)$ theories of
+gravity. Therefore, motivated by the work presented in Refs. [121, 128], our analysis
+is focused in the special choice of $f(R, G)$ that gives
+
+$$
+\mathcal{L} = \frac{1}{2} m_p^2 \sqrt{-g} \left( \alpha R^2 + \beta G \log G \right), \quad (\text{C.2})
+$$
+
+for the Lagrangian with constants $\alpha, \beta$, where $m_p$ is Planck's mass, $g$ is determinant of the metric tensor $g_{\mu\nu}$, $R$ is the Ricci scalar, and $G$ is the Gauss-Bonnet invariant defined above in Eq. (C.1).
+
+The action is, as usual, defined as
+
+$$
+S = \int \mathcal{L} dx^4 . \tag{C.3}
+$$
+
+The paper is organised as follows: In Section C.2 we give a comparison on how
+the Einstein tensor is written in GR, f(R) and f(R, G) in general, then we present
+the background field equations for the Lagrangian (C.2). In Section C.3 we present
+the linear order perturbed Einstein-like tensor that describes the geometry of the
+universe, in longitudinal gauge for scalar perturbations. In Section C.5.1 we conclude
+and give an outlook on future work. The expression for the Einstein-like tensor,
+derived from a general Lagrangian as a function f(R, G) is given in Appendix C.4.
+
+For simplicity we work with a flat background spatial metric which is compatible
+with current observations.
+
+**C.2. Governing equations**
+
+In standard GR, the Einstein-Hilbert action is given by integrating the Lagrangian,
+
+$$
+\mathcal{L}_{GR} = \frac{1}{2} m_p^2 \sqrt{-g} R, \qquad (\text{C.4})
+$$
+
+and the field equations are obtained by varying the action with respect to the metric
+tensor $g_{\mu\nu}$, in GR one has only the Einstein tensor, given in Eq. (2.9), and one can
+then relate the geometry with the matter content of the universe by making it
+equal to the energy momentum tensor and obtaining Eq. (2.15), the usual equations
+of motion (EOM). Similarly, in the case of the most popular versions of modified
+gravity, one can replace the Ricci tensor, $R$, in the Einstein-Hilbert action (C.4)
+---PAGE_BREAK---
+
+with a function $f(R)$ and get a modified Einstein tensor,
+
+$$ \begin{aligned} \hat{G}_{\mu\nu} = R_{\mu\nu}\partial_R f + g_{\mu\nu} \Biggl[ & (\nabla^2 R) \partial_R^2 f + (\nabla_\alpha R)(\nabla^\alpha R) \partial_R^3 f - \frac{1}{2} f \\ & - (\nabla_\mu \nabla_\nu R) \partial_R^2 f - (\nabla_\mu R)(\nabla_\nu R) \partial_R^3 f, \end{aligned} \quad (C.5) $$
+
+where we dropped the dependency on $R$ on $f(R)$ to keep the equation more compact. We can see that (C.5) reduces to the usual Einstein tensor if we set $f(R) = R$.
+
+In principle one can use a function $f(R)$ as complex as one likes, however, in this paper we concentrate on the modified gravity function that includes the Gauss-Bonnet term $G$ defined in the previous section in Eq. (C.1), and therefore we work with $f(R,G)$. The full expression for the general Einstein-like tensor is rather lengthy and is given in Appendix C.4. Once more, if one drops the dependency on $G$ and makes $f(R,G) = R$ only, one recovers the usual Einstein tensor from GR. In this paper we use a particular function $f(R,G)$ studied in Ref. [121] given by
+
+$$ f(R, G) = \alpha R^2 + \beta G \log G, \quad (C.6) $$
+
+where $\alpha$ and $\beta$ are arbitrary constants. This function leads to a particular Einstein-like tensor
+
+$$ \begin{aligned} \mathcal{G}_{\mu\nu} = 2\alpha (R_{\mu\nu}R + g_{\mu\nu}\nabla^2 R - \nabla_{\mu}\nabla_{\nu}R) - \frac{1}{2}(\alpha R^2 + \beta G \log G)g_{\mu\nu} & \quad (C.7) \\ & + \frac{\beta}{2}(1+\log G)[C_{\mu\nu}^1] + \frac{\beta}{2G}[C_{\mu\nu}^2] - \frac{\beta}{2G^2}[C_{\mu\nu}^3], & \end{aligned} $$
+
+where the $C_{\mu\nu}^i$'s are the coefficients corresponding to the derivatives $\partial_G^i f$ from Eq. (C.18)¹, we will be working with this description of the universe geometry.
+
+By modifying the Lagrangian and adding the Gauss-Bonnet term, the governing equations are also modified,
+
+$$ \mathcal{G}_{\mu\nu} = \kappa^2 T_{\mu\nu}, \quad (C.8) $$
+
+analogous to Eq. (2.15) where the right hand side stays the same, since we are only modifying the way we describe the geometry of the universe.
+
+¹Note that $\partial_R \partial_G f(R,G) = \partial_G \partial_R f(R,G) = 0$ with the choice for $f(R,G)$ made in Eq. (C.6).
+---PAGE_BREAK---
+
+### C.2.1. Background
+
+In standard Einstein gravity, Eq. (2.15), the governing equations in component form can also be rewritten as the Friedmann equations,
+
+$$ \mathcal{H}^2 = \frac{\kappa^2}{3} a^2 \rho_0, \quad (C.9) $$
+
+$$ \mathcal{H}' = -\frac{\kappa^2}{6} a^2 (\rho_0 + 3P_0), \quad (C.10) $$
+
+where $\mathcal{H} = a'/a$ is the Hubble parameter.
+
+Using the definition of the modified governing equations, Eq. (C.8) we can also find Friedmann-like equations for $f(R, G)$ gravity. In the background these equations of motion are given, for our choice of theory and hence $\mathcal{G}_{\mu\nu}$, by
+
+$$
+\begin{aligned}
+& \frac{18}{a^2} \Biggl[ \alpha (\mathcal{H}\mathcal{H}'' - \mathcal{H}'^2 - \mathcal{H}^4) + \frac{2}{3}\beta (66\mathcal{H}\mathcal{H}'' - 20\mathcal{H}'^2 - 44\mathcal{H}^4 - 31\mathcal{H}^2\mathcal{H}') \\
+& \qquad + \frac{1}{\mathcal{H}'} [35\mathcal{H}^3\mathcal{H}'' - 52\mathcal{H}^6 - 6\mathcal{H}'^2] - \frac{1}{\mathcal{H}^2} [4\mathcal{H}'^3 + 18\mathcal{H}''^2] + \frac{32}{\mathcal{H}}\mathcal{H}'\mathcal{H}'' \\
+& \qquad + \frac{16}{\mathcal{H}^3}\mathcal{H}'^2\mathcal{H}'' - \frac{13}{\mathcal{H}^4}\mathcal{H}'\mathcal{H}''^2 \Biggr] = \kappa^2 T_{00},
+\end{aligned}
+\quad (C.11) $$
+
+$$
+\begin{aligned}
+& \frac{6}{a^2} \delta_{ij} \Biggl[ \alpha (\mathcal{H}\mathcal{H}'' - \mathcal{H}''' - \mathcal{H}'^2 + 6\mathcal{H}^2\mathcal{H}' - \mathcal{H}^4) + \frac{2}{3}\beta (9\mathcal{H}^2\mathcal{H}' - 2\mathcal{H}\mathcal{H}'' + \frac{10}{3}\mathcal{H}'^2 \\
+& \qquad - \frac{2}{\mathcal{H}}\mathcal{H}'\mathcal{H}'' + \frac{1}{\mathcal{H}'} [\mathcal{H}^3\mathcal{H}'' - \mathcal{H}^2\mathcal{H}''' - \frac{4}{3}\mathcal{H}^6] + \frac{1}{\mathcal{H}'^2}\mathcal{H}^2\mathcal{H}''^2) \Biggr] = \kappa^2 T_{ij}.
+\end{aligned}
+\quad (C.12) $$
+
+The off-diagonal components of the field equations vanish in the background. Also note that the logarithmic dependence $\log G$ cancels out. Already at the background level in this theory the field equations, (C.11) and (C.12), are more complicated than the ones in the standard GR case, Eqs. (C.9) and (C.10). In particular the equations now contain time derivatives up to fourth-order, instead of up to second-order in the standard case. The above equations have been previously derived in Ref. [128], for a Ghost-free $f(G)$ theory and in general for any $F(R,G)$ in their Section V. Ghost-free $F(R,G)$ gravity, and our results agree with the ones found in the latter after taking $\Phi(R,G) \approx \alpha R$ and $\Theta(R,G) \approx \beta \log G$ and neglecting the potential $V(\Phi, \Theta)$ used in their analysis.
+---PAGE_BREAK---
+
+### C.3. Perturbed governing equations
+
+Due to the complexity of the governing equations in fourth-order gravity, we derived the components of the Einstein-like tensor in longitudinal gauge, instead of leaving the gauge unspecified. We can easily reconstruct the tensor components for an arbitrary gauge, by substituting in the definitions of the variables in longitudinal gauge defined in Chapter 2.
+---PAGE_BREAK---
+
+### C.3.1. Scalar perturbations
+
+The scalar perturbations give the biggest contribution to the components of the Einstein-like tensor, and this is given by
+
+$$
+\begin{align}
+\delta G_{00} = -\frac{2}{a^2} \Biggl[ & \alpha \{ 18 (\mathcal{H}^4 + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'') \phi - 9\mathcal{H}\mathcal{H}'\phi' - 9\mathcal{H}^2\phi'' + 9(4\mathcal{H}^3 - \mathcal{H}\mathcal{H}' - \mathcal{H}'')\psi' \nonumber \\
+& + 9(2\mathcal{H}' - \mathcal{H}^2)\psi'' - 9\mathcal{H}\psi''' + 12(\mathcal{H}^2 + \mathcal{H}')\nabla^2\phi + 15\mathcal{H}\nabla^2\psi' + 3\nabla^2\psi'' + \nabla^2\nabla^2(\phi - 2\psi) \} \nonumber \\
+& + \beta \{ (24\mathcal{H}^2 [26\mathcal{H}^8 + 19\mathcal{H}^6\mathcal{H}' + 20\mathcal{H}^4\mathcal{H}'^2 + 7\mathcal{H}^2\mathcal{H}'^3 + 2\mathcal{H}'^4] - 6\mathcal{H}[73\mathcal{H}^6 + 126\mathcal{H}^4\mathcal{H}' \nonumber \\
+& + 64\mathcal{H}^2\mathcal{H}'^2 + 32\mathcal{H}'^3] \mathcal{H}'' + 12[6\mathcal{H}^4 + 18\mathcal{H}^2\mathcal{H}' + 13\mathcal{H}'^2] \mathcal{H}''^2 \} \frac{\phi}{\mathcal{H}^4\mathcal{H}'} \nonumber \\
+& + (6\mathcal{H}[13\mathcal{H}'^2 - 6\mathcal{H}^4]\mathcal{H}''^2 - 3\mathcal{H}[104\mathcal{H}^{10} + 4\mathcal{H}^8\mathcal{H}' + 139\mathcal{H}^6\mathcal{H}'^2 + 322\mathcal{H}^4\mathcal{H}'^3 + 168\mathcal{H}^2\mathcal{H}'^4 \nonumber \\
+& + 96\mathcal{H}'^5] + 6[35\mathcal{H}^8 + \mathcal{H}^6\mathcal{H}' + 4\mathcal{H}^4\mathcal{H}'^2 + 76\mathcal{H}^2\mathcal{H}'^3 + 78\mathcal{H}'^4]\mathcal{H}'' ) \frac{\phi'}{\mathcal{H}^4\mathcal{H}'^2} \nonumber \\
+& - (71\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 64\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 72\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}^2\mathcal{H}''') \frac{3\phi''}{\mathcal{H}^3\mathcal{H}'} \nonumber \\
+& - (104\mathcal{H}^{12} - 620\mathcal{H}^{10}\mathcal{H}' - 189\mathcal{H}^8\mathcal{H}'^2 + 174\mathcal{H}^6\mathcal{H}'^3 + 176\mathcal{H}^4\mathcal{H}'^4 + 112\mathcal{H}^2\mathcal{H}'^5 - 70\mathcal{H}^9\mathcal{H}'' \nonumber \\
+& + 213\mathcal{H}^7\mathcal{H}'\mathcal{H}'' + 118\mathcal{H}^5\mathcal{H}'^2\mathcal{H}'' - 216\mathcal{H}^3\mathcal{H}'^3\mathcal{H}'' - 252\mathcal{H}\mathcal{H}'^4\mathcal{H}'' + 12\mathcal{H}^6\mathcal{H}''^2 + 46\mathcal{H}^2\mathcal{H}'^2\mathcal{H}''^2 \nonumber \\
+& + 104\mathcal{H}'^3\mathcal{H}''^2) \frac{3\psi'}{\mathcal{H}^5\mathcal{H}'^2} \nonumber \\
+& - (104\mathcal{H}^{10} + 75\mathcal{H}^8\mathcal{H}' + 56\mathcal{H}^6\mathcal{H}'^2 - 4\mathcal{H}^4\mathcal{H}'^3 + 8\mathcal{H}^2\mathcal{H}'^4 - 70\mathcal{H}^7\mathcal{H}'' - 26\mathcal{H}^5\mathcal{H}'\mathcal{H}'' - 8\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \nonumber \\
+& + 12\mathcal{H}\mathcal{H}'^3\mathcal{H}'' + 12\mathcal{H}^4\mathcal{H}''^2 - 26\mathcal{H}'^2\mathcal{H}''^2) \frac{3\psi''}{\mathcal{H}\mathcal{H}'^2} \nonumber \\
+& - (71\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 64\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 72\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}^2\mathcal{H}''') \frac{3\psi'''}{\mathcal{H}^4\mathcal{H}'} \nonumber \\
+& + (4\mathcal{H}^2[18\mathcal{H}'^4 + 44\mathcal{H}^2\mathcal{H}'^3 + 77\mathcal{H}^4\mathcal{H}'^2 + 51\mathcal{H}^6\mathcal{H}' - 26^8] + 2[13\mathcal{H}'^2 - 6\mathcal{H}^4]\mathcal{H}''^2 \nonumber \\
+& + 2\mathcal{H}[35\mathcal{H}^6 - 34\mathcal{H}^4\mathcal{H}' - 109\mathcal{H}^2\mathcal{H}'^2 - 68\mathcal{H}'^3]\mathcal{H}'' ) \frac{\nabla^2 \phi}{\mathcal{H}^4 \mathcal{H}'^2} \nonumber \\
+& - (70\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 66\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 73\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}'^2\mathcal{H}''') \frac{\nabla^2 \phi'}{\mathcal{H}^4 \mathcal{H}'} \nonumber \\
+& - (104 \mathcal{H}^{10} + 42 \mathcal{H}^{8}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}) \frac{\nabla^{4}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}}{\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}} \nonumber \\
+& + 32 \boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}) \frac{\nabla^{6}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}}{\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}} \nonumber \\
+& + (209 \boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}) \nabla^{8}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}\boldsymbol{\Gamma}_{+}\boldsymbol{\Gamma}_{-}) \nabla^{10}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}\nonumber \\
+& + (\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{9}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}(+\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{8}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{7}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{6}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{5}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{4}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{3}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{2}\boldsymbol{\Psi}_{+}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla_{+}\boldsymbol{\Psi}_{+}\nabla_{-}\boldsymbol{\Psi}_{+}\nonumber \\
+& + (\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{7}\boldsymbol{\Psi}_{+}\nabla^{6}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{6}\boldsymbol{\Psi}_{+}\nabla^{5}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{5}\boldsymbol{\Psi}_{+}\nabla^{4}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{4}\boldsymbol{\Psi}_{+}\nabla^{3}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{3}\boldsymbol{\Psi}_{+}\nabla^{2}\boldsymbol{\Psi}_{-}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla^{2}\boldsymbol{\Psi}_{+}\nabla_{+}\boldsymbol{\Psi}_{+}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla_{+}\boldsymbol{\Psi}_{+}\nabla_{-}\boldsymbol{\Psi}_{+}-(\frac{\boldsymbol{\Psi}_{+}}{\boldsymbol{\Psi}_{-}})\nabla_{-}\boldsymbol{\Psi}_{+}\nabla_{-}\boldsymbol{\Psi}_{+}
+$$
+
+$$
+(C.13)
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{equation}
+\begin{aligned}
+\delta G_{0i} = \delta G_{i0} = \frac{2}{a^2} \Biggl[ & \alpha \{ 3(3H'' + 2HH' - 4H^3) \phi - 3(H^2 - 3H') \phi' + 3H\phi'' + 3(7H' - 5H^2)\psi' \\
+& + 3\psi''' - 3H\nabla^2(\phi - 2\psi) + \nabla^2(\phi' - 2\psi') \} + \beta \{ (60H'^3H'' + 171H^4H'H'' + 172H^4H'H'' \\
+& + 44H^6H'' - 72HH'^4 - 134H^3H'^3 - 220H^5H'^2 - 282H^7H' - 192H^9) \frac{\nabla^2\phi}{6H^4H'^2} \\
+& + (96H^9 + 156H^7H' + 84H^5H'^2 + 83H^3H'^3 + 24HH'^4 - 24H^6H'' - 82H^4H'H'' \\
+& - 90H^2H'^2H'' - 24H'^3H'' \) \frac{2\nabla^2\psi}{3H^4H'^2} \\
+& - (1880H^9H' + 2156H^7H'^2 + 1710H^5H'^3 + 992H^3H'^4 + 432HH'^5 + 576H^8H'' + 178HH'H'' \\
+& - 1231H^4H'^2H'' - 984H^2H'^3H'' - 360H'^4H'' - 144H^5H''^2 - 444H^3H'H''^2 \\
+& - 288HH'^2H''^2 \) \frac{\phi}{6H^4H'^2} \\
+& - (288H^9 + 419H^7H' + 323H^5H'^2 + 176H^3H'^3 + 108HH'^4 - 66H^6H'' - 258H^4H'H'' \\
+& - 246H^2H'^2H'' - 90H'^3H'' \) \frac{\phi'}{3H^3H'^2} \\
+& - (576H^{10} + 1566HH' + 1126H^6H'^2 + 734H^4H'^3 + 504H^2H'^4 + 444H^7H'' - 56H^5H'H'' \\
+& - 691H^3H'^2H'' - 180HH'^3H'' - 144H^4H''^2 - 444H^2H'H''^2 - 288H'^2H''^2) \frac{\psi'}{6H^4H'^2} \\
+& - (144H^9 + 208H^7H' + 166H^5H'^2 + 88H^3H'^3 + 54HH'^4 - 33H^6H'' - 129H^4H'H'' \\
+& - 123H^2H'^2H'' - 45H'^3H'' \) \frac{2\psi''}{3H^4H'^2} + \left( \frac{H^2}{3H'} \right) \nabla^2\phi' - \left( \frac{2}{3} \right) \nabla^2\psi' \\
+& + \left( \frac{H^3}{H'} \right) \phi'' + \left( \frac{H^2}{H'} \right) \psi''' \Biggr]_i,
+\end{aligned}
+\tag{C.14}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{align*}
+\delta G_{ij} = \frac{2}{a^2} \Biggl[ & \alpha \left\{ \delta_{ij} \left[ 12 (\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \phi - 3(6\mathcal{H}^3 + \mathcal{H}\mathcal{H}' - 6\mathcal{H}'' ) \phi' \right. \right. \\
+& \qquad \left. - 3(\mathcal{H}^2 - 4\mathcal{H}') \phi'' + 3\mathcal{H}\phi''' + 6(\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \psi \right. \\
+& \qquad \left. - 3(2\mathcal{H}^3 + 13\mathcal{H}\mathcal{H}' - 5\mathcal{H}'') \psi' + 3\psi'''' - 3(7\mathcal{H}^2 - 6\mathcal{H}') \psi'' - 2(\mathcal{H}^2 + 2\mathcal{H}') \nabla^2 \phi \right. \\
+& \qquad \left. - 3\nabla^2 (2\phi' + \psi') + \nabla^2 (\phi'' - 5\psi'') - 2(\mathcal{H}^2 - \mathcal{H}') \nabla^2 \psi - \nabla^2 \nabla^2 (\phi - 2\psi) \right] \\
+& + \left[ 3\mathcal{H} (\phi' + 3\psi') + 6(\mathcal{H}^2 + \mathcal{H}') \psi \right]_{,ij} + \left[ 3\psi'' + \nabla^2 \nabla^2 (\phi - 2\psi) \right]_{,ij} \\
+& + \beta \left\{
+ \begin{aligned}[t]
+ & \delta_{ij} \left[ (8\mathcal{H}^3\mathcal{H}'\mathcal{H}'' - 16\mathcal{H}^4\mathcal{H}'^2 - 4\mathcal{H}'^4 - 4\mathcal{H}\mathcal{H}'^2\mathcal{H}'' + \mathcal{H}^2 [13\mathcal{H}'^3 - \mathcal{H}''^2]) \frac{8\phi}{\mathcal{H}'^2} \right. \\
+ & \qquad \left. - (8\mathcal{H}^8\mathcal{H}' + 48\mathcal{H}^6\mathcal{H}'^2 + 64\mathcal{H}^2\mathcal{H}'^4 - 18\mathcal{H}'^5 - 6\mathcal{H}^5\mathcal{H}'\mathcal{H}'' + 36\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \right. \\
+ & \qquad \left. - 3\mathcal{H}^4 [47\mathcal{H}'^3 + 4\mathcal{H}''^2 - 2\mathcal{H}'\mathcal{H}''' ] \right) \frac{\phi'}{3\mathcal{H}\mathcal{H}'^3} + (7\mathcal{H}^4\mathcal{H}' + 2\mathcal{H}^2\mathcal{H}'^2 + 2\mathcal{H}'^3 - 4\mathcal{H}^3\mathcal{H}'' ) \frac{\phi''}{\mathcal{H}'^2} \\
+ & + (4\mathcal{H}^7\mathcal{H}' - 48\mathcal{H}^5\mathcal{H}'^2 - 22\mathcal{H}\mathcal{H}'^4 + 21\mathcal{H}^4\mathcal{H}'\mathcal{H}'' - 6\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' + 6\mathcal{H}'^3\mathcal{H}'' \\
+ & \qquad \left. + 3\mathcal{H}^3 [4\mathcal{H}'^3 - 2\mathcal{H}''^2 + \mathcal{H}'\mathcal{H}'' ] \right) \frac{2\psi}{3\mathcal{H}\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^9\mathcal{H}' + 32\mathcal{H}^7\mathcal{H}'^2 - 14\mathcal{H}\mathcal{H}'^5 - 6\mathcal{H}^6\mathcal{H}'\mathcal{H}'' - 81\mathcal{H}^4\mathcal{H}'^2\mathcal{H}'' + 42\mathcal{H}^2\mathcal{H}'^3\mathcal{H}'' + 18\mathcal{H}'^4\mathcal{H}'' \\
+ & - \mathcal{H}^3 [92\mathcal{H}'^4 - 12\mathcal{H}'\mathcal{H}''^2 ] + 3\mathcal{H}^5 [49\mathcal{H}'^3 - 4\mathcal{H}''^2 + 2\mathcal{H}'\mathcal{H}'' ] ) \frac{\psi'}{3\mathcal{H}^2\mathcal{H}'^3} \\
+ & - \frac{\psi''}{3\mathcal{H}'^3} (8\mathcal{H}^6\mathcal{H}' + 27\mathcal{H}^4\mathcal{H}'^2 + 40\mathcal{H}'^4 + 6\mathcal{H}^3\mathcal{H}'\mathcal{H}'' + 18\mathcal{H}\mathcal{H}'^2\mathcal{H}'' \\
+ & - 6\mathcal{H}^2 [14\mathcal{H}'^3 + 2\mathcal{H}''^2 - \mathcal{H}'\mathcal{H}''' ] ) + (4\mathcal{H}^4\mathcal{H}' - \mathcal{H}^2\mathcal{H}'^2 + \mathcal{H}'^3 - 2\mathcal{H}^3\mathcal{H}'' ) \frac{2\psi'''}{\mathcal{H}\mathcal{H}'^2} \\
+ & - (16\mathcal{H}^7\mathcal{H}' + 30\mathcal{H}^5\mathcal{H}'^2 + 131\mathcal{H}\mathcal{H}'^4 - 12\mathcal{H}^4\mathcal{H}'\mathcal{H}'' + 6\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' - 6\mathcal{H}'^3\mathcal{H}'' \\
+ & - 3\mathcal{H}^3 [7\mathcal{H}'^3 + \mathcal{H}''^2 - 4\mathcal{H}'\mathcal{H}''' ] ) \frac{\nabla^2 \phi}{18\mathcal{H}\mathcal{H}'^3} + (7\mathcal{H}^4\mathcal{H}' - 7\mathcal{H}^2\mathcal{H}'^2 + \mathcal{H}'^3 - 4\mathcal{H}^3\mathcal{H}'' ) \frac{\nabla^2 \phi'}{\overline{\overline{\textcolor[HTML]{000000}{3}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{3}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{3}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{3}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{000000}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\overline{\overline{\textcolor[HTML]{E5E5E5}{1}}}\ overbar) \\
+ & + (2\mathcal{H}^7\mathcal{H}' + 453\mathcal{H}^5\mathcal{H}'^2 - 68\mathcal{H}\mathcal{H}'^4 - 234\mathcal{H}^4\mathcal{H}'\mathcal{H}'' + 78\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' + 48\mathcal{H}'^3\mathcal{H}'' \\
+ & - 3\mathcal{H}^3 [69\mathcal{H}'^3 - 12\mathcal{H}''^2 + 2\mathcal{H}'\mathcal{H}''' ] ) \frac{\nabla^2 \psi}{18\overset{{}_{6}}{}\overset{{}_{7}}{{}_{8}}{{}_{9}}{{}_{-}}{{}_{+}}} + (4\overset{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{+}}
+ & + (\frac{{}_{{}_+}}{{}_{{}_-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}{{}_{+}}{{}_{-}}}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{}_{{}_+ {{}_- }}{{_{}^{*}}}{{}_{{}_+ {{}_- }}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{}^{*}}}{{_{{}_+ }_{{}_+ }}}
+ & + (\frac{{{}_+-}}{{_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-__\\
+ & + [\begin {array}{@{}l@{}}
+ (11 \, {\rm H'} {\rm H'}' - 10 {\rm H'} {\rm ^5 H'} + 23 {\rm H'} {\rm H'}'^2 - 2 {\rm H'} {\rm ^2 H'}'' - 6 {\rm H'} {\rm H'}''') {\phi \over {2 {\rm H'} {\rm H'}}}\\
+ + {\psi \over {6 {\rm H'} {\rm ^6 H'}' - {\rm H'} {\rm ^6 H'}'^2 - 36 {\rm H'}'^4 + 42 {\rm H'} {\rm ^3 H'} {\rm H'}'' - 6 {\rm H'} {\rm ^2 H'}''}\\
+ + {\rm H'} {\rm ^2 [ } { }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }
+ \end {array}]\\
+ & {} +
+ {\psi' \over {6 {\rm H'} {\rm ^6 H'}'^2 ( {\rm H'} {\rm ^6 H'}' - 79 {\rm H'} {\rm ^4 H'}'^2 - 36 {\rm H'}'^4 + 42 {\rm H'} {\rm ^3 H'} {\rm H'}'' - 6 {\rm H'} {\rm ^2 H'}''}\\
+ & {} +
+ {\rm H'} {\rm ^2 [ } { }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }_{ }
+ ) -
+ (4 {\rm H'} ^ { 5}
+ +
+ {\rm H'} {\rm ^3 H'}' -
+ { }
+ )
+ -
+ { }
+ ) {\psi' \over {3 {\rm H'} {\rm ^2}
+ (
+ {
+ _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ { _ \\qquad
+$$
+$$
++
+( H ) φ' +
+ψ"
+$$
+(C.15)
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+We now have the Einstein-like tensor, and following the prescription given in Ref. [50], the usual way of dealing with long equations for perturbations is to de-compose them into trace-free and trace. The idea is to reduce everything into only scalar quantities so we have to compute the trace of the Einstein-like tensor and substract that from Eq. (C.16).
+
+The trace of the spatial part of the Einstein-like tensor is given by
+
+$$
+\begin{align*}
+& \delta G^k_k = \frac{2}{a^2} \Biggl[ \alpha \biggl\{
+ \begin{aligned}[t]
+ & 36 (\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \phi - 9 (6\mathcal{H}^3 + \mathcal{H}\mathcal{H}' - 6\mathcal{H}'' ) \phi' \\
+ & - 9 (\mathcal{H}^2 - 4\mathcal{H}') \phi'' + 9\mathcal{H}\phi''' + 18 (\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \psi \\
+ & - 9 (2\mathcal{H}^3 + 13\mathcal{H}\mathcal{H}' - 5\mathcal{H}'') \psi' - 9 (7\mathcal{H}^2 - 6\mathcal{H}') \psi'' + 9\psi'''' - 6 (\mathcal{H}^2 + 2\mathcal{H}') \nabla^2 \phi \\
+ & - 15\mathcal{H}\nabla^2 \phi' + 3\nabla^2 \phi'' + 12\mathcal{H}'\nabla^2 \psi - 12\nabla^2 \psi'' - 2\nabla^2\nabla^2 \phi + 4\nabla^2\nabla^2 \psi
+ \end{aligned}
+\biggr) \\
+& \qquad + \beta \biggl\{
+ \begin{aligned}[t]
+ & (8\mathcal{H}^3\mathcal{H}'\mathcal{H}'' - 16\mathcal{H}^4\mathcal{H}'^2 - 4\mathcal{H}'^4 - 4\mathcal{H}\mathcal{H}'^2\mathcal{H}'' + \mathcal{H}^2 [13\mathcal{H}'^3 - \mathcal{H}''^2]) \frac{24\phi}{\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^8\mathcal{H}' + 48\mathcal{H}^6\mathcal{H}'^2 + 64\mathcal{H}^2\mathcal{H}'^4 - 18\mathcal{H}'^5 - 6\mathcal{H}^5\mathcal{H}'\mathcal{H}'' + 36\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \\
+ & - 3\mathcal{H}^4 [47\mathcal{H}'^3 + 4\mathcal{H}''^2 - 2\mathcal{H}'\mathcal{H}''']) \frac{\phi'}{\mathcal{H}\mathcal{H}'^3} \\
+ & + (7\mathcal{H}\mathcal{H}' + 2\mathcal{H}^2\mathcal{H}'^2 + 2\mathcal{H}'^3 - 4\mathcal{H}^3\mathcal{H}''') \frac{3\phi''}{\mathcal{H}'^2} \\
+ & + (4\mathcal{H}^7\mathcal{H}' + 48\mathcal{H}^5\mathcal{H}'^2 - 22\mathcal{H}\mathcal{H}'^4 + 21\mathcal{H}^4\mathcal{H}'\mathcal{H}'' - 6\mathcal{H}^2\mathcal{H}'^2 + 6\mathcal{H}'^3\mathcal{H}'' \\
+ & + 3\mathcal{H}^3 [4\mathcal{H}'^3 - 2\mathcal{H}''^2 + \mathcal{H}'\mathcal{H}''']) \frac{2\psi}{\mathcal{H}\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^6\mathcal{H}' + 27\mathcal{H}^4\mathcal{H}'^2 + 40\mathcal{H}'^4 + 6\mathcal{H}^3\mathcal{H}'\mathcal{H}'' + 18\mathcal{H}\mathcal{H}'^2\mathcal{H}'' \\
+ & - 6\mathcal{H}^2 [14\mathcal{H}'^3 + 2\mathcal{H}''^2 - \mathcal{H}'\mathcal{H}''']) \frac{\psi''}{\mathcal{H}'^3} + (4\mathcal{H}^4\mathcal{H}' - \mathcal{H}^2\mathcal{H}'^2 + \mathcal{H}'^3 - 2\mathcal{H}^3\mathcal{H}''') \frac{6\psi'''}{\mathcal{H}\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^7\mathcal{H}' + 30\mathcal{H}^5\mathcal{H}'^2 - 27\mathcal{H}^3\mathcal{H}'^3 + 31\mathcal{H}\mathcal{H}'^4 + 6\mathcal{H}' [\mathcal{H}'^2 + \mathcal{H}^2\mathcal{H}' - \mathcal{H}^4] \\
+ & - 12\mathcal{H}^3\mathcal{H}''^2 + 6\mathcal{H}^3\mathcal{H}'\mathcal{H}'''') \frac{\nabla^2 \phi}{3\mathcal{H}\mathcal{H}'^3} + (\mathcal{H}' [7\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + 2\mathcal{H}'^2] - 4\mathcal{H}^3\mathcal{H}'' ) \nabla^2 \phi' \\
+ & + (2\mathcal{H}^7\mathcal{H}' + 187\mathcal{H}^5\mathcal{H}'^2 - 52\mathcal{H}\mathcal{H}'^4 - 96\mathcal{H}^4\mathcal{H}'\mathcal{H}'' + 36\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' + 24\mathcal{H}'^3\mathcal{H}'' \\
+ & + \mathcal{H}^3 [12\mathcal{H}''^2 - 77\mathcal{H}'^3]) \frac{\nabla^2 \psi}{3\mathcal{H}^3\mathcal{H}'^2} \\
+ & + (2\mathcal{H} [2\mathcal{H}^4 - 16\mathcal{H}^2\mathcal{H}' + 11\mathcal{H}'^2] + [6\mathcal{H}^2 - 3\mathcal{H}'] \mathcal{H}'' ) \frac{\partial\nabla^2 \psi'}{\partial(\partial'\partial')} \\
+ & + (\frac{\partial}{\partial H'}) \phi''' + (\frac{\partial}{\partial H'}) \psi'''' + (\frac{\partial}{\partial H'}) \nabla^2 \phi'' - 4\nabla^2 \psi'' - (\frac{\partial}{3}) \nabla^2\nabla^2 \phi + (\frac{\partial}{3 H'}) \nabla^2\nabla^2 \psi
+ \end{aligned}
+\biggr) \Biggr].
+\notag \\
+& \hspace*{-3em}
+(C.16)
+\end{align*}
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+To construct the traceless Einstein-like tensor we need to subtract the trace from
+the spatial part given by Eq. (C.16). In order to do this, we apply two spatial
+derivatives to $\delta G_{ij}$ (see e.g. Ref. [16]). We then use the linearity of the equation
+to simplify it even more, and we are left with single Laplacian operators instead of
+double Laplacians, simplifying the calculations,
+
+$$
+\begin{equation}
+\begin{aligned}
+\iint (\partial^i \partial^j [\delta G_{ij}]) ={}& \frac{2}{a^2} \left[ \alpha \left\{
+ \begin{aligned}[t]
+ & (H^4 - 6H^2H'H^2 - HH'' + H''' ) \phi - 3(6H^3 + HH' - 6H'') \phi' \\
+ & - 3(H^2 - 4H') \phi'' + 3H\phi''' + 6(H^4 - 6H^2H' + H^2 - HH'') \psi - 3(2H^3 + 13HH' - 5H'') \psi' \\
+ & - 3(7H^2 - 6H') \psi'' + 3\psi''' - 2(H^2 + 2H') \nabla^2 (\phi - 2\psi) - 3H\nabla^2 (\phi' - 2\psi') + \nabla^2 (\phi'' - 2\psi'')
+ \end{aligned}
+ \right\} \right. \\
+& \left. + \beta \left\{
+ \begin{aligned}[t]
+ & (8H^3H'H'' - 16H^4H'^2 - 4H'^4 - 4HH'^2H'' + H^2[13H'^3 - H''^2]) \frac{8\phi}{H'^2} \\
+ & - (8H^8H' + 48H^6H'^2 + 64H^2H'^4 - 18H'^5 - 6H^5H'H'' + 36H^3H'^2H'' \\
+ & - 3H^4[47H'^3 + 4H''^2 - 2H'H''']) \frac{\phi'}{3HH'^3} + (7H^4H' + 2H^2H'^2 + 2H'^3 - 4H^3H''') \frac{\phi''}{H'^2} \\
+ & + (4H^7H' - 48H^5H'^2 - 22HH'^4 + 21H^4H'H'' - 6H'^3H'' \\
+ & + 3H^3[4H'^3 - 2H''^2 + H'H''']) \frac{2\psi}{3HH'^2} \\
+ & - (8H^9H' + 32H^7H'^2 - 14HH'^5 - 14HH'^5 - 6H^6H'H'' - 81H^4H'^2H'' + 42H^2H'^2H'' \\
+ & + H^3[12H'H''^2 - 92H'^4] + 3H^5[49H'^3 - 4H''^2 + 2H'H''']) \frac{\psi'}{3H^2H'^3} \\
+ & - (8H^6H' + 27H^4H'^2 + 40H'^4 + 6H^3H'H'' + 18HH'^2H'' \\
+ & - 6H^2[14H'^3 + 2H''^2 - H'H''']) \frac{\psi''}{3H'^3} + (4H^4H' - H^2H'^2 + H'^3 - 2H^3H'') \frac{2\psi'''}{HH'^2} \\
+ & - (4H^7H' + 30H^5H'^2 - 19HH'^4 - 3H^4H'H'' + 6H^2H'^2H'' + 12H'^3H'' \\
+ & + H^3[3H'H''' - 6H''^2 - 30H'^3]) \frac{2\nabla^2\phi}{9HH'^3} + (7H^4H' - 4H^2H'^2 + 2H'^3 - 4H^3H'') \frac{\nabla^2\phi'}{3HH'^2} \\
+ & + (2^7 + 54^5H' - 44HH'^3 - 27H^4H'' + 15H^2H'H'' + 12H'^2H'' \\
+ & + 3H^3[H''' - 4H'^2]) \frac{\nabla^2\psi}{81H^6H'^4} - (11H^3H' - 16HH'^2 - 2H^2H'' + 3H'H'') \frac{\nabla^2\psi'}{27H^5H'^4} \\
+ & + \left(\frac{H^3}{H'}\right)\phi''' + \left(\frac{H^2}{H'^2}\right)\psi'''' + \left(\frac{H^2}{3H'}\right)\nabla^2\phi'' - \frac{\nabla^2\psi''}{27H^3H'^3}
+ \end{aligned}
+ \right\} .
+\end{aligned}
+\tag{C.17}
+\end{equation}
+$$
+
+Subtracting (C.17) and (C.16) from Eq. (C.15) one gets the trace free Einstein-
+like tensor. Using Eqs. (C.8), (C.13), (C.14) and (C.15) we can get the evolution
+equations, these are in C.5.
+---PAGE_BREAK---
+
+### C.4. Einstein-like tensor
+
+The choice of a function of the Ricci scalar is arbitrary, so we keep the function only as $f(R, G)$ without any assumption, we do take into account the fact that the Gauss-Bonnet term $G$, given in Eq. (C.1), also has a dependency on the metric, so it has to be varied with respect of the metric itself, from where the equation becomes rather lengthy, this general equation, reduces to the known cases of GR and $f(R)$ when we choose $f(R) = R$ and we drop the dependence of $G$ respectively.
+
+In general, the Einstein-like tensor, without choosing any particular $f(R, G)$, is given by
+
+$$
+\begin{aligned}
+\tilde{G}_{\mu\nu} ={}& g_{\mu\nu} \left\{
+ \begin{aligned}[t]
+ & \partial_R f[0] + \partial_R^2 f[\nabla^2 R] + \partial_R^3 f[(\nabla_\alpha R)(\nabla^\alpha R)] + \partial_G f[2\nabla^2 R - 4\nabla_\alpha \nabla_\beta R^{\alpha\beta}] - \frac{1}{2} f \\
+ & + \partial_G^2 f[4R^2 (\nabla^2 R) - 32R^{\beta\sigma} (\nabla_\alpha R_{\beta\sigma}) (\nabla^\alpha R) + 12R(\nabla_\alpha R)(\nabla^\alpha R) + 8R^{\beta\sigma\lambda\rho} (\nabla_\alpha R_{\beta\sigma\lambda\rho}) (\nabla^\alpha R) \\
+ & \quad - 16R(\nabla^\alpha R)(\nabla_\beta R_\alpha{}^\beta) + 32R^{\alpha\beta}(\nabla_\alpha R^{\sigma\lambda})(\nabla_\beta R_{\sigma\lambda}) - 16R^{\sigma\lambda\rho\tau}(\nabla_\alpha R^{\alpha\beta})(\nabla_\beta R_{\sigma\lambda\rho\tau}) \\
+ & \quad - 8R^{\alpha\beta}(\nabla_\alpha R^{\sigma\lambda\rho\tau})(\nabla_\beta R_{\sigma\lambda\rho\tau}) - 8R^{\alpha\beta}R(\nabla_\alpha \nabla_\beta R) - 8R^{\alpha\beta}(R^{\sigma\lambda\rho\tau})(\nabla_\alpha \nabla_\beta R_{\sigma\lambda\rho\tau}) \\
+ & \quad - 8R_{\alpha\beta}(\nabla^\alpha R)(\nabla^\beta R) - 16R^{\alpha\beta}R(\nabla^2 R_{\alpha\beta}) - 16R(\nabla_\sigma R_{\alpha\beta})(\nabla^\sigma R^{\alpha\beta}) \\
+ & + 64R^{\alpha\beta}(\nabla^\sigma R_{\alpha\beta})(\nabla_\lambda R_\sigma{}^\lambda) + 32R^{\alpha\beta}R^{\sigma\lambda}(\nabla_\lambda \nabla_\sigma R_{\alpha\beta}) + 4R^{\alpha\beta\sigma\lambda}R(\nabla^2 R_{\alpha\beta\sigma\lambda}) \\
+ & + 4R(\nabla_\rho R_{\alpha\beta\sigma\lambda})(\nabla^\rho R^{\alpha\beta\sigma\lambda})
+ \end{aligned}
+ \right\}
+ + \partial_G^3 f
+ \left[
+ \begin{aligned}[t]
+ & 8R^3 (\nabla_\alpha R)(\nabla^\alpha R) - 64R^{\sigma\beta}R^2 (\nabla_\alpha R_{\beta\sigma})(\nabla^\alpha R) + 16R^2 R^{\beta\sigma\lambda\rho} (\nabla_\alpha R_{\beta\sigma\lambda\rho})(\nabla^\alpha R) \\
+ & + 128R_\alpha{}^\beta R^{\sigma\lambda}R(\nabla^\alpha R)(\nabla_\beta R_{\sigma\lambda}) - 32R_\alpha{}^\beta R^{\sigma\lambda\rho\tau}R(\nabla^\alpha R)(\nabla_\beta R_{\sigma\lambda\rho\tau}) \\
+ & \quad - 16R^{\alpha\beta}R^{\sigma\lambda\rho\tau}R^{\xi\chi\omega\kappa}(\nabla_\alpha R_{\sigma\lambda\rho\tau})(\nabla_\beta R_{\xi\chi\omega\kappa}) - 16R_{\alpha\beta}R^2(\nabla^\alpha R)(\nabla^\beta R) \\
+ & \quad - 64R^{\alpha\beta}R^{\lambda\rho\xi\chi}R(\nabla_\sigma R_{\lambda\rho\xi\chi})(\nabla^\sigma R_{\alpha\beta}) - 256R^{\alpha\beta}R^{\sigma\lambda}R^{\rho\tau}(\nabla_\sigma R_{\alpha\beta})(\nabla_\lambda R_{\rho\tau}) \\
+ & + 128R^{\alpha\beta}R^{\sigma\lambda}R^{\rho\tau\xi\chi}(\nabla_\sigma R_{\alpha\beta})(\nabla_\lambda R_{\rho\tau\xi\chi}) + 128R^{\alpha\beta}R^{\sigma\lambda}R(\nabla_\rho R_{\sigma\lambda})(\nabla^\rho R_{\alpha\beta}) \\
+ & + 8R^{\alpha\beta\sigma\lambda}R^{\rho\tau\xi\chi}R(\nabla_\kappa R_{\rho\tau\xi\chi})(\nabla^\kappa R_{\alpha\beta\sigma\lambda})
+ \end{aligned}
+ \right]
+ + \partial_R \partial_G f
+ \left[
+ \begin{aligned}[t]
+ & 4R(\nabla^2 R) + 6(\nabla_\alpha R)(\nabla^\alpha R) - 8(\nabla^\alpha R)(\nabla_\beta R_\alpha{}^\beta) - 4R^{\alpha\beta}(\nabla_\alpha \nabla_\beta R) - 8R^{\alpha\beta}(\nabla^2 R_{\alpha\beta}) \\
+ & - 8(\nabla_\sigma R_{\alpha\beta})(\nabla^\sigma R^{\alpha\beta}) + 2R^{\alpha\beta\lambda\rho}(\nabla^2 R_{\alpha\beta\lambda\rho}) + 2(\nabla_\sigma R_{\alpha\beta\lambda\rho})(\nabla^\sigma R^{\alpha\beta\lambda\rho}) \\
+ & + \partial_R^2 \partial_G f
+ \left[
+ \begin{aligned}[t]
+ & 6R(\nabla_\alpha R)(\nabla^\alpha R) - 16R^{\beta\sigma}(\nabla_\alpha R_{\beta\sigma})(\nabla^\alpha R) + 4R^{\beta\sigma\lambda\rho}(\nabla_\alpha R_{\beta\sigma\lambda\rho})(\nabla^\alpha R) \\
+ & - 4R_{\alpha\beta}(\nabla^\alpha R)(\nabla^\beta R)
+ \end{aligned}
+ \right]
+ \end{aligned}
+ \right]
+ + \partial_R \partial_G f
+ \left[
+ \begin{aligned}[t]
+ & 4R^2 (\nabla^2 R) - 32R^{\beta\sigma} (\nabla_\alpha R_{\beta\sigma}) (\nabla^\alpha R) + 12R (\nabla_\alpha R) (\nabla^\alpha R) + 8R^{\beta\sigma}\lambda\rho (\nabla_\alpha R_{\beta}\lambda\rho) (\nabla^\alpha R) \\
+ & - 16R (\nabla^\alpha R) (\nabla_\beta R_\alpha{}^\beta) + 32R^{\alpha\beta} (\nabla_\alpha R^{\sigma}\lambda)( \nabla_\beta R_{ \sigma}\lambda ) - 16R^{ \sigma}\lambda\rho \tau (\nabla_\alpha R^{ \alpha}\beta)( \nabla_\beta R_{ \sigma}\lambda ) \\
+ & - 8R^{ \alpha}\beta (\nabla_\alpha R^{ \sigma}\lambda\rho ) (\nabla_\beta R_{ \sigma}\lambda ) - 8R^{ \alpha}\beta ( \nabla_\alpha \nabla_\beta R ) - 8R^{ \alpha}\beta ( \nabla^{ \sigma}\lambda\rho ) (\nabla_\alpha \nabla_\beta R_{ \sigma}\lambda ) \\
+ & - 8R^{ \alpha}\beta (\nabla^{ \sigma}\lambda\rho ) (\nabla_\beta R^{ \sigma}\lambda ) - 8R^{ \sigma}\lambda\rho (\nabla^{ \sigma}\lambda\rho ) (\nabla_\alpha \nabla_\beta R_{ \sigma}\lambda ) \\
+ & + 64R^{ \alpha}\beta (\nabla^{ \sigma}\lambda)( \nabla^{ \nu}\lambda ) + 32R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \nabla^{ \nu}\lambda ) \\
+ & + 4R^{ \nu}\lambda ( \\
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ -
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{align*}
+& + \partial_R \partial_G^2 f [12R^2 (\nabla_\alpha R) (\nabla^\alpha R) - 64R^{\beta\sigma} R (\nabla_\alpha R_{\beta\sigma}) (\nabla^\alpha R) + 16R^{\beta\sigma\lambda\rho} R (\nabla_\alpha R_{\beta\sigma\lambda\rho}) (\nabla^\alpha R) \\
+& \qquad + 64R_\alpha^\beta R^{\sigma\lambda} (\nabla^\alpha R) (\nabla_\beta R_{\sigma\lambda}) - 16R_\alpha^\beta R^{\sigma\lambda\rho\tau} (\nabla^\alpha R) (\nabla_\beta R_{\sigma\lambda\rho\tau}) - 16R_{\alpha\beta}R (\nabla^\alpha R) (\nabla^\beta R) \\
+& \qquad - 32R^{\alpha\beta} R^{\lambda\rho\tau\xi} (\nabla_\sigma R_{\lambda\rho\tau\xi}) (\nabla^\sigma R_{\alpha\beta}) + 64R^{\alpha\beta} R^{\sigma\lambda} (\nabla_\rho R_{\sigma\lambda}) (\nabla^\rho R_{\alpha\beta}) \\
+& \qquad + 4R^{\alpha\beta\sigma\lambda} R^{\rho\tau\xi\kappa} (\nabla_\chi R_{\rho\tau\xi\kappa}) (\nabla^\chi R_{\alpha\beta\sigma\lambda}) ] \\
+& + \partial_R f [R_{\mu\nu}] - \partial_R^2 f [(\nabla_\mu \nabla_\nu R)] - \partial_R^3 f [(\nabla_\mu R)(\nabla_\nu R)] \\
+& + \partial_G f [2R_{\mu\nu}R - 8R_\mu^\alpha R_{\nu\alpha} + 2R_\mu^{\alpha\beta} R_{\nu\alpha\beta\sigma} - 4(\nabla^2 R_{\mu\nu}) + 2(\nabla_\alpha \nabla_\beta R_\mu^\alpha)_\nu + 4(\nabla_\alpha \nabla_\mu R_\nu^\alpha) \\
+& \qquad + 4(\nabla_\alpha \nabla_\nu R_\mu^\alpha) + 2(\nabla_\beta \nabla_\alpha R_\mu^\alpha)_\nu - 2(\nabla_\nu \nabla_\mu R)] \\
+& + \partial_R \partial_G f [4(\nabla^\alpha R)(\nabla_\beta R_{\mu\alpha\nu}) - 4R_{\mu\nu}(\nabla^2 R) - 8(\nabla_\alpha R_{\mu\nu})(\nabla^\alpha R) + 4(\nabla^\alpha R)(\nabla_\beta R_{\mu\nu})_\\
+& \qquad + 4R_{\mu\alpha\nu\beta}(\nabla^\beta \nabla^\alpha R) + 4(\nabla^\alpha R)(\nabla_\mu R_{\nu\alpha}) + 4(\nabla_\alpha R_\nu^\alpha)(\nabla_\mu R) \\
+& \qquad - R^{\alpha\beta\sigma\lambda} (\nabla_\mu \nabla_\nu R_{\alpha\beta\sigma\lambda}) + 8(\nabla_\mu R^{\alpha\beta})(\nabla_\nu R_{\alpha\beta}) + 4(\nabla^\alpha R)(\nabla_\nu R_{\mu\alpha}) + 4(\nabla_\alpha R_\mu^\alpha)(\nabla_\nu R) \\
+& \qquad - 6(\nabla_\mu R)(\nabla_\nu R) - 2(\nabla_\mu R^{\alpha\beta\sigma\lambda})(\nabla_\nu R_{\alpha\beta\sigma\lambda}) + 4R_\mu^\alpha(\nabla_\nu \nabla_\alpha R) + 4R^{\alpha\beta}(\nabla_\mu \nabla_\nu R_{\alpha\beta}) \\
+& \qquad - 4R(\nabla_\mu \nabla_\mu R) - R^{\alpha\beta\sigma\lambda}(\nabla_\mu \nabla_\nu R_{\alpha\beta\sigma\lambda}) + 4R_\nu^\alpha(\nabla_\mu \nabla_\alpha R) + 4R^{\alpha\beta}(\nabla_\mu \nabla_\nu R_{\alpha\beta})] \\
+& + \partial_R^2 \partial_G f [4R_{\mu\alpha\nu\beta}(\nabla^\alpha R)(\nabla^\beta R) - 4R_{\mu\nu}(\nabla_\alpha R)(\nabla^\alpha R) + 4R_{\nu\alpha}(\nabla^\alpha R)(\nabla_\mu R) \\
+& \qquad + 8R^{\alpha\beta}(\nabla_\mu R)(\nabla_\nu R_{\alpha\beta}) + 4R_{\mu\alpha}(\nabla^\alpha R)(\nabla_\nu R) + 8R^{\alpha\beta}(\nabla_\mu R_{\alpha\beta})(\nabla_\nu R) - 6R(\nabla_\mu R)(\nabla_\nu R) \\
+& \qquad - 2R^{\alpha\beta\sigma\lambda}(\nabla_\mu R_{\alpha\beta\sigma\lambda})(\nabla_\nu R) - 2R^{\alpha\beta\sigma\lambda}(\nabla_\mu R)(\nabla_\nu R_{\alpha\beta\sigma\lambda})] \\
+& + \partial_G^2 f [4R^{\sigma\lambda\rho} R_{[\mu\nu}^\alpha (\nabla_\alpha \nabla_\beta R_{\sigma\lambda\rho}) - 8R_{\mu\nu}R (\nabla^2 R) - 32R^{\beta\sigma} R_\nu^\alpha (\nabla_\alpha \nabla_\mu R_{\beta\sigma}) \\
+& \qquad + 8R_\nu^\alpha R^{\beta\sigma\lambda\rho} (\nabla_\alpha \nabla_\mu R_{\beta\sigma\lambda\rho}) - 32R^{\beta\sigma} R_\mu^\alpha (\nabla_\alpha \nabla_\nu R_{\beta\sigma}) + 8R_\mu^\alpha R^{\beta\sigma\lambda\rho} (\nabla_\alpha \nabla_\nu R_{\beta\sigma\lambda\rho}) \\
+& \qquad - 16R^{\beta\sigma\lambda\rho} (\nabla_\alpha R_{\beta\sigma\lambda\rho}) (\nabla^\alpha R_{\mu\nu}) - 16R (\nabla_\alpha R_{\mu\nu}) (\nabla^\alpha R) - 8R_{\mu\nu} (\nabla_\alpha R) (\nabla^\alpha R) \\
+& \qquad + 8R_{[\mu\nu}^\alpha (\nabla_\alpha R^{\sigma\lambda\rho}) (\nabla_\beta R_{\sigma\lambda\rho}) + 8R (\nabla^\alpha R) (\nabla_\beta R_{[\mu\nu}^\beta) + 8R (\nabla^\alpha R) (\nabla_\beta R_{[\mu\nu}^\gamma) \\
+& \qquad + 4R^{\sigma\lambda\rho} R_{[\mu\nu}^\gamma (\nabla_\beta \nabla_\alpha R_{\sigma\lambda\rho}) + 8R_{[\mu\nu}\alpha (\nabla^\sigma R)(\nabla^\beta R) + 8R_{[\mu\nu}\alpha (\nabla^\beta R)\gamma \\
+& \qquad + 32R^{\alpha\beta} R_{[\mu\nu}} (\nabla^2 R_{\alpha\beta}) + 32R_{[\mu\nu}} (\nabla_\sigma R_{\alpha\beta}) (\nabla^\sigma R^{\alpha\beta}) + 64R^{\alpha\beta} (\nabla_\sigma R_{\alpha\beta}) (\nabla^\sigma R_{[\mu\nu}} \\
+& \qquad - 32R^{\alpha\beta} (\nabla^\sigma R_{\alpha\beta}) (\nabla_\lambda R_{[\mu\nu}}^\lambda) - 32R^{\alpha\beta} (\nabla^\sigma R_{\alpha\beta}) (\nabla_\lambda R_{[\mu\nu}}^\gamma) \\
+& \qquad - 32R_{[\mu\nu}\sigma (\nabla^\sigma R^{\alpha\beta}) (\nabla^\lambda R_{\alpha\beta}) - 16R^{\alpha\beta} R_{[\mu\nu}\sigma (\nabla^\lambda \nabla^\sigma R_{\alpha\beta}) - 16R^{\alpha\beta} R_{[\mu\nu}\lambda (\nabla^\sigma \nabla^\lambda R_{a\\b}) \\
+& \qquad - 32R^{\alpha\beta} (\nabla_\sigma R_{[\nu}}^\sigma) (\nabla_\mu R_{a\\b}) - 32R_{[\nu}}^\alpha (\nabla_a R_{b\\sigma}) (\nabla_\mu R^{b\\sigma}) + 8R (\nabla^\alpha R) (\nabla_a R_{b\\nu}) \\
+& \qquad + 8R^{\beta\rho}(\nabla_a R_{b\\sigma}\lambda\rho) (\nabla_a R_{b\\nu}\lambda\rho) - 32R^{\beta\rho}(\nabla_a R_{b\\nu}\lambda\rho) (\nabla_a R^{b\\sigma}\lambda\rho) + 8R (\nabla_a R^{b\\rho}\lambda\rho) (\nabla_a R^{b\\nu}\lambda\rho) \\
+& \qquad + 8R_{b\\nu}(\nabla^\alpha R)(-\nu a) (a\nu) + 8R^{\beta\rho}(\nu a)(a\nu) (a\nu) + 8R^{\rho a}(a\nu)(a\nu) (a\nu) \\
+& \qquad + 8R_{b\\nu}(\nu a)(a\nu)(a\nu) (a\nu) + 8R^{\rho a}(a\nu)(a\nu)(a\nu) (a\nu) \\
+& \qquad + 8R_{b\\nu}(\nu a)(a\nu)(a\nu)(a\nu) (a\nu) + 8R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu) (a\nu) \\
+& \qquad + 8R_a(\nu a)(a\nu)(a\nu)(a\nu)(a\nu) (a\nu) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)) \\
+& \qquad - 32R^{\rho a}(a\nu)(a\nu)(a\nu)(a\nu)(a\nu)(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& \qquad - 16R^{\rho a}(a\\
+& + { }^{2}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }^{5}{ }
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{align*}
+& -4R^{\alpha\beta\sigma\lambda}(\nabla_{\mu}R)(\nabla_{\nu}R_{\alpha\beta\sigma\lambda}) - 4R(\nabla_{\mu}R^{\alpha\beta\sigma\lambda})(\nabla_{\nu}R_{\alpha\beta\sigma\lambda}) - 8R_{\mu\nu}(\nabla_{\rho}R_{\alpha\beta\sigma\lambda})(\nabla^{\rho}R^{\alpha\beta\sigma\lambda}) \\
+& +8R^{\beta\sigma\lambda\rho}(\nabla_{\alpha}R_{\mu}^{\alpha})(\nabla_{\nu}R_{\beta\sigma\lambda\rho}) + 8R_{\mu}^{\alpha}(\nabla_{\alpha}R_{\beta\sigma\lambda\rho})(\nabla_{\nu}R^{\beta\sigma\lambda\rho}) + 8R_{\mu}^{\alpha}R(\nabla_{\nu}\nabla_{\alpha}R) \\
+& +8R^{\alpha\beta}R(\nabla_{\nu}\nabla_{\mu}R_{\alpha\beta}) - 4R^2(\nabla_{\nu}\nabla_{\mu}R) - 2R^{\alpha\beta\sigma\lambda}R(\nabla_{\mu}\nabla_{\nu}R_{\alpha\beta\sigma\lambda}) - 8R_{\mu\nu}R^{\alpha\beta\sigma\lambda}(\nabla^2 R_{\alpha\beta\sigma\lambda}) \\
+& +8R^{\alpha\beta\sigma\lambda}(\nabla_{\rho}R_{\mu}{}^{\rho}{}_{\nu}{}^{\tau})(\nabla_{\tau}R_{\alpha\beta\sigma\lambda}) + 8R^{\alpha\beta\sigma\lambda}(\nabla_{\rho}R_{\alpha\beta\sigma\lambda})(\nabla^{\rho}R_{\mu}{}^{\rho}{}_{\nu}{}^{\tau})] \\
+& + \partial_G^3 f [128 R^{\beta\sigma} R_{\mu\nu} R (\nabla_\alpha R_{\beta\sigma}) (\nabla^\alpha R) - 16 R_{\mu\nu} R^2 (\nabla_\alpha R) (\nabla^\alpha R) \\
+& \qquad - 32 R_{\mu\nu} R^{\beta\sigma\lambda\rho} R (\nabla_\alpha R_{\beta\sigma\lambda\rho}) (\nabla^\alpha R) + 16 R^{\sigma\lambda\rho} R_{\mu\alpha\nu}{}^\beta R (\nabla^\alpha R) (\nabla_\beta R_{\sigma\lambda\rho\tau}) \\
+& \qquad + 16 R^{\sigma\lambda\rho} R_{\mu}{}^\alpha{}_\nu R^{\xi\chi\kappa} (\nabla_\alpha R_{\sigma\lambda\rho\mu}) (\nabla_\beta R_{\xi\chi\kappa}) + 16 R^2 R_{\mu\alpha\nu\beta} (\nabla^\alpha R) (\nabla^\beta R) \\
+& \qquad + 128 R^{\alpha\beta} R_{\mu\nu} R^{\lambda\rho\textrm{'}\xi} (\nabla_\sigma R_{\lambda\rho\textrm{'}\xi}) (\nabla^\sigma R_{\alpha\beta}) + 16 R^{\sigma\lambda\rho} R_{\mu}{}^\beta{}_{\nu\alpha} R (\nabla^\alpha R) (\nabla_\beta R_{\sigma\lambda\rho\tau}) \\
+& \qquad - 64 R^{\alpha\beta} R_{\mu\nu}{}^\lambda R^{\rho\textrm{'}\tau\xi} (\nabla^\sigma R_{\alpha\beta}) (\nabla_\lambda R_{\rho\textrm{'}\tau\xi}) - 64 R^{\alpha\beta} R_{\mu}{}^\lambda{}_{\nu\sigma} R^{\rho\textrm{'}\tau\xi} (\nabla^\sigma R_{\alpha\beta}) (\nabla_\lambda R_{\rho\textrm{'}\tau\xi}) \\
+& \qquad - 64 R^{\beta\sigma} R_{\mu\nu\alpha} R (\nabla^\alpha R) (\nabla^\lambda R_{\beta\sigma}) - 64 R^{\beta\sigma} R_{\mu\nu}{}^\alpha R (\nabla^\alpha R) (\nabla^\lambda R_{\beta\sigma}) \\
+& \qquad + 256 R^{\beta\rho} R^{\lambda\rho} R_\nu{}^\alpha (\nabla_\alpha R_{\lambda\rho}) (\nabla_\mu R_{\beta\sigma}) - 64 R^{\beta\rho} R_\nu{}^\alpha R^{\lambda\rho\textrm{'}\xi} (\nabla_\alpha R_{\lambda\rho\textrm{'}\tau\xi}) (\nabla_\mu R_{\beta\sigma}) \\
+& \qquad - 64 R^{\beta\rho} R_\nu{}^\alpha R (\nabla^\alpha R) (\nabla_\mu R_{\beta\sigma}) - 64 R^{\beta\rho} R_\nu{}^\alpha R (\nabla_\alpha R_{\beta\sigma}) (\nabla_\mu R) \\
+& \qquad + 16 R_\nu{}^\alpha R^{\beta\rho\xi} R (\nabla_\alpha R_{\beta\rho\xi}) (\nabla_\mu R) + 16 R_{\nu\alpha} R^2 (\nabla^\alpha R) (\nabla_\mu R) \\
+& \qquad + 16 R_\nu{}^\alpha R^{\beta\rho\xi} R^{\tau\xi}{}^{K} (\nabla_\alpha R_{K\xi\xi}) (\nabla_\mu R_{B\xi\xi}) + 16 R_{\nu\alpha} R^{\beta\rho\xi}{}^{K} R (\nabla^\alpha R) (\nabla_\mu R_{B\xi\xi}) \\
+& \qquad - 64 R^{\beta\rho} R_\nu{}^\alpha R^{\lambda\rho\textrm{'}\xi} (\nabla_\alpha R_{B\xi\xi}) (\nabla_\mu R_{B\xi\xi}) + 32 R^{\alpha\beta} R^2 (\nabla_\mu R) (\nabla_\nu R_{A\xi}) \\
+& \qquad + 32 R^{\alpha\beta} R^{\sigma\rho\textrm{'}}{}^{K} R (\nabla_\mu R_{B\xi\xi}) (\nabla_\nu R_{A\xi}) + 256 R^{\beta\rho} R^{\lambda\rho}{}^{K}_M (\nabla_\alpha R_{B\xi\xi}) (\nabla_\nu R_{A\xi}) \\
+& \qquad - 64 R^{\beta\rho} R_M{}^\alpha{}^{K}\!R(\nabla_\alpha R_B{}^{K\textrm{'}_X}) (\nabla_\nu R_B{}^{K\textrm{'}_X}) - 64R^{\beta\rho}R_M{}^{K\textrm{'}_X}\!R(\nabla_\alpha R_B{}^{K\textrm{'}_X}) (\nabla_\nu R_B{}^{K\textrm{'}_X}) \\
+& \qquad - 128R^{\alpha\beta}R^{\sigma\textrm{'}K}\!R(\nabla_\mu R_A{}^{K\textrm{'}_X}) (\nabla_\nu R_A{}^{K\textrm{'}_X}) - 64R^{\beta\rho}R_M{}^\alpha{}^{K}\!R(\nabla_\alpha R_B{}^{K\textrm{'}_X}) (\nabla_\nu R_A{}^{K\textrm{'}_X}) \\
+& \qquad + 16R_M{}^\alpha{}^{K}\!R^{\beta\rho\xi}\!R(\nabla_\alpha R_B{}^{K\textrm{'}_X}) (\nabla_\nu R_A{}^{K\textrm{'}_X}) + 16R_M{}^{K}_M{}^2(\nabla^\alpha R) (\nabla_\nu R_A{}^{K\textrm{'}_X}) + 32R^{\alpha K}\!R^2(\nabla_\mu R_A{}^{K\textrm{'}_X}) (\nabla_\nu R_A{}^{K\textrm{'}_X}) \\
+& \qquad - 8R^3(\nabla_\mu R)(\nabla_\nu R) - 8R^2R^{\alpha K}\!R(\nabla_\mu R_A{}^{K\textrm{'}_X})(\nabla_\nu R) - 8R^2R^{\alpha K}\!R(\nabla_\mu R)(\nabla_\nu R_A{}^{K\textrm{'}_X}) \\
+& \qquad + 16R_M{}^\alpha{}^{K}\!R^{\beta\rho\xi}\!R^{\tau\xi}{}^{K}(\nabla_\alpha R_K{}^{K\textrm{'}_X})(\nabla_\nu R_B{}^{K\textrm{'}_X}) + 16R_M{}^{K}_M{}^2(R^{\sigma K}\!R(\nabla^\alpha \!R))(\nabla_\nu \!R_B{}^{K\textrm{'}_X})
+$$
+
+$$
++ 32R^{\alpha K}\!R^{\sigma K}\!R(\nabla_\mu \!R_A{}^{K\textrm{'}_X})(\nabla_\nu \!R_A{}^{K\textrm{'}_X}) + 256R^{\beta K}\!R^{\lambda K}\!R_M{}^\alpha(\nabla_\alpha \!R_B{}^{K\textrm{'}_X})(\nabla_\nu \!R_B{}^{K\textrm{'}_X})
+$$
+
+$$
+-8R^{\alpha K}\!R_M{}^\alpha(R^{\rho K}\!R(\nabla_\mu \!R_A{}^{K\textrm{'}_X})(\nabla_\nu \!R_B{}^{K\textrm{'}_X})) - 256R^{\beta K}\!R_M{}^\rho(R(\nabla_\mu \!R_A{}^{K\textrm{'}_X})(\nabla_\nu \!R_B{}^{K\textrm{'}_X})) - 32R^{\rho K}\!R_M{}^\pi(R(\nabla_\mu \!R_A{}^{K\textrm{'}_X})(\nabla_\nu \!R_B{}^{K\textrm{'}_X}))
+$$
+
+$$
++ 256R^{\alpha K}\!R_M{}^\sigma(R(\nabla_R \!R_A{}^{K\textrm{'}_X})(\nabla_T \!R_A{}^{K\textrm{'}_X})) - 16R_{M\nu}(R^{\rho K}\!R(\nabla_R \!R_A{}^{K\textrm{'}_X})(\nabla_T \!R_A{}^{K\textrm{'}_X})) - 32R^{\rho K}\!R_M(R(\nabla_R \!R_A{}^{K\textrm{'}_X})(\nabla_T \!R_A{}^{K\textrm{'}_X}))
+$$
+
+$$
++ \partial_R \partial_G^2 f [64R^{\beta \sigma } \mathbf{R}_{ \mu \nu } ( \mathbf{ \nabla } _ { \mu } \mathbf{ { } _ { A } } { } _ { B } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) - 16 { } _ { M } { } _ { N } ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) - 16 { } _ { M } { } _ { N } { } _ { P } { } _ { Q } ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ] \\
++ 8 { } _ { M } { } _ { N } { } _ { P } { } _ { Q } ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) + 8 { } _ { M } { } _ { N } { } _ { P } { } _ { Q } ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) + 16 { } _ { M } { } _ { N } { } _ { P } { } _ { Q } ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } ) ( \mathbf{ \ n a m e } ^ { a } )
+$$
+
+$$
+-32R^{\beta \sigma } R_{ \mu \alpha \nu } ( \nabla ^ { \alpha } { } _ { A } ) ( \nabla ^ { \lambda } { } _ { B } ) - 32R^ {\beta \sigma } { } _ { M } { } _ { N } ( \nabla ^ { \alpha } { } _ { A } ) ( \nabla ^ { \lambda } { } _ { B } ) - 32R ^ { \beta \sigma } { } _ { N } { } _ { P } ( \nabla ^ { \alpha } { } _ { A } ) ( \nabla ^ { \lambda } { } _ { B } )
+$$
+
+$$
+-32R^{\beta \sigma}_{v}{}
++8R^{\beta \sigma}_{v}{}
++8R^{\beta \sigma}_{v}{}
++8R^{\beta \sigma}_{v}{}
+$$
+
+$$
++8{N}_{v}{A}{N}_{B}{A}{N}_{P}{A}{N}_{Q}{A}{N}_{T}{A}{N}_{S}{A}{N}_{U}{A}{N}_{V}{A}{N}_{W}{A}{N}_{Y}{A}{N}_{Z}
+$$
+
+$$
+-32R^{\beta\Sigma} {} _ { M } {} _ { N } ( {} _ { V } {} _ { B }\Sigma {} _ { U }\Sigma {} _ { D }\Sigma {} _ { E }\Sigma {} _ { F }\Sigma {} _ { G }\Sigma {} _ { H }\Sigma {} _ { I }\Sigma {} _ { J }\Sigma {} _ { K }\Sigma {} _ { L }\Sigma {} _ { M }\Sigma {} _ { N }\Sigma {} _ { O }\Sigma {} _ { P }\Sigma {} _ { Q }\Sigma {} _ { S }\Sigma {} _ { T }\Sigma {} _ { U }\Sigma {} _ { V }\Sigma {} _ { W }\Sigma {} _ { X }\Sigma {} _ { Y }\Sigma {} _ { Z }
+$$
+
+$$
+-32R^{\beta\Sigma} {} _ { M_N}\Sigma {} _ { N_P}\Sigma {} _ { N_Q}\Sigma {} _ { N_S}\Sigma {} _ { N_T}\Sigma {} _ { N_U}\Sigma {} _ { N_V}\Sigma {} _ { N_W}\Sigma {} _ { N_X}\Sigma {} _ { N_Y}\Sigma {} _ { N_Z}\Sigma {} _ { N_T}\Sigma {} _ { N_U}\Sigma {} _ { N_V}\Sigma {} _ { N_W}\Sigma {} _ { N_X}\Sigma {} _ { N_Y}\Sigma {} _ { N_Z}
+$$
+
+$$
+-64R^{\alpha B}\mathbf{r}_{M_A}\mathbf{r}_{B_C}-64R^{\alpha B}\mathbf{r}_{M_A}\mathbf{r}_{B_C}-32R^{\beta B}\mathbf{r}_{M_A}\mathbf{r}_{B_C}
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{align}
+& + 8R_{\mu}^{\alpha} R^{\beta\sigma\lambda\rho} (\nabla_{\alpha} R_{\beta\sigma\lambda\rho}) (\nabla_{\nu} R) + 16R_{\mu\alpha} R (\nabla^{\alpha} R) (\nabla_{\nu} R) + 32R^{\alpha\beta} R (\nabla_{\mu} R_{\alpha\beta}) (\nabla_{\nu} R) \nonumber \\
+& - 12R^{2} (\nabla_{\mu} R) (\nabla_{\nu} R) - 8R^{\alpha\beta\sigma\lambda} R (\nabla_{\mu} R_{\alpha\beta\sigma\lambda}) (\nabla_{\nu} R) - 8R^{\alpha\beta\sigma\lambda} R (\nabla_{\mu} R_{\alpha\beta}) (\nabla_{\nu} R) \nonumber \\
+& - 8R^{\alpha\beta\sigma\lambda} R (\nabla_{\mu} R) (\nabla_{\nu} R_{\alpha\beta\sigma\lambda}) + 8R_{\mu\alpha} R^{\beta\sigma\lambda\rho} (\nabla^{\alpha} R) (\nabla_{\nu} R_{\beta\sigma\lambda\rho}) \nonumber \\
+& + 16R^{\alpha\beta} R^{\sigma\lambda\rho\tau} (\nabla_{\mu} R_{\alpha\beta}) (\nabla_{\nu} R_{\sigma\lambda\rho\tau}) - 4R^{\alpha\beta\sigma\lambda} R^{\rho\tau\xi\chi} (\nabla_{\mu} R_{\alpha\beta\sigma\lambda}) (\nabla_{\nu} R_{\rho\tau\xi\chi}) \biggr] \tag{C.18}
+\end{align}
+$$
+
+where $\partial_R$ and $\partial_G$ are the derivatives with respect to the Ricci scalar and the Gauss-Bonnet term, respectively, i.e. $\partial_R = \partial/\partial R$ and $\partial_G = \partial/\partial G$. From here also one can identify the $C_{\mu\nu}^i$ present in Eq. (C.7).
+
+**C.5. Evolution equations**
+
+Using Eqs. (C.8), (C.13), (C.14) and (C.15) we can get the evolution equations:
+---PAGE_BREAK---
+
+$$
+\begin{aligned}
+& - \frac{2}{a^2} \left[ \alpha \left\{
+ \begin{aligned}[t]
+ & 18 (\mathcal{H}^4 + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'') \phi - 9\mathcal{H}\mathcal{H}'\phi' - 9\mathcal{H}^2\phi'' + 9(4\mathcal{H}^3 - \mathcal{H}\mathcal{H}' - \mathcal{H}'') \psi' \\
+ & + 9(2\mathcal{H}' - \mathcal{H}^2)\psi'' - 9\mathcal{H}\psi''' + 12(\mathcal{H}^2 + \mathcal{H}') \nabla^2\phi + 15\mathcal{H}\nabla^2\psi' + 3\nabla^2\psi'' + \nabla^2\nabla^2(\phi - 2\psi)
+ \end{aligned}
+\right\} \right] \\
+& + \beta \left\{
+ \begin{aligned}[t]
+ & (24\mathcal{H}^2 [26\mathcal{H}^8 + 19\mathcal{H}^6\mathcal{H}' + 20\mathcal{H}^4\mathcal{H}'^2 + 7\mathcal{H}^2\mathcal{H}'^3 + 2\mathcal{H}'^4] - 6\mathcal{H}[73\mathcal{H}^6 + 126\mathcal{H}^4\mathcal{H}' \\
+ & + 64\mathcal{H}^2\mathcal{H}'^2 + 32\mathcal{H}'^3]\mathcal{H}'' + 12[6\mathcal{H}^4 + 18\mathcal{H}^2\mathcal{H}' + 13\mathcal{H}'^2]\mathcal{H}''^2) \frac{\phi}{\mathcal{H}^4\mathcal{H}'} \\
+ & + (6\mathcal{H}[13\mathcal{H}'^2 - 6\mathcal{H}^4]\mathcal{H}''^2 - 3\mathcal{H}[104\mathcal{H}^{10} + 4\mathcal{H}^8\mathcal{H}' + 139\mathcal{H}^6\mathcal{H}'^2 + 322\mathcal{H}^4\mathcal{H}'^3 + 168\mathcal{H}^2\mathcal{H}'^4 \\
+ & + 96\mathcal{H}'^5] + 6[35\mathcal{H}^8 + \mathcal{H}^6\mathcal{H}' + 4\mathcal{H}^4\mathcal{H}'^2 + 76\mathcal{H}^2\mathcal{H}'^3 + 78\mathcal{H}'^4]\mathcal{H}'') \frac{\phi'}{\mathcal{H}^4\mathcal{H}'^2} \\
+ & - (71\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 64\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 72\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}^2\mathcal{H}''') \frac{3\phi''}{\mathcal{H}^3\mathcal{H}'} \\
+ & - (104\mathcal{H}^{12} - 620\mathcal{H}^{10}\mathcal{H}' - 189\mathcal{H}^8\mathcal{H}'^2 + 174\mathcal{H}^6\mathcal{H}'^3 + 176\mathcal{H}^4\mathcal{H}'^4 + 112\mathcal{H}^2\mathcal{H}'^5 - 70\mathcal{H}^9\mathcal{H}'' \\
+ & + 213\mathcal{H}^7\mathcal{H}'\mathcal{H}'' + 118\mathcal{H}^5\mathcal{H}'^2\mathcal{H}'' - 216\mathcal{H}^3\mathcal{H}'^3\mathcal{H}'' - 252\mathcal{H}\mathcal{H}'^4\mathcal{H}'' + 12\mathcal{H}^6\mathcal{H}''^2 + 46\mathcal{H}^2\mathcal{H}'^2\mathcal{H}''^2 \\
+ & + 104\mathcal{H}'^3\mathcal{H}''^2) \frac{3\psi'}{\mathcal{H}^5\mathcal{H}'^2} \\
+ & - (104\mathcal{H}^{10} + 75\mathcal{H}^8\mathcal{H}' + 56\mathcal{H}^6\mathcal{H}'^2 - 4\mathcal{H}^4\mathcal{H}'^3 + 8\mathcal{H}^2\mathcal{H}'^4 - 70\mathcal{H}^7\mathcal{H}'' - 26\mathcal{H}^5\mathcal{H}'\mathcal{H}'' - 8\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \\
+ & + 12\mathcal{H}\mathcal{H}'^3\mathcal{H}'' + 12\mathcal{H}^4\mathcal{H}''^2 - 26\mathcal{H}'^2\mathcal{H}''^2) \frac{3\psi''}{\mathcal{H}\mathcal{H}'^2} \\
+ & - (71\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 64\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 72\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}^2\mathcal{H}''') \frac{3\psi'''}{\mathcal{H}^4\mathcal{H}'} \\
+ & + (4\mathcal{H}^2[18\mathcal{H}'^4 + 44\mathcal{H}^2\mathcal{H}'^3 + 77\mathcal{H}^4\mathcal{H}'^2 + 51\mathcal{H}^6\mathcal{H}' - 26^8] + 2[13\mathcal{H}'^2 - 6\mathcal{H}^4]\mathcal{H}'' \\
+ & + 2\mathcal{H}[35\mathcal{H}^6 - 34\mathcal{H}^4\mathcal{H}' - 109\mathcal{H}^2\mathcal{H}'^2 - 68\mathcal{H}'^3]\mathcal{H}'') \frac{\nabla^2\phi}{\mathcal{H}^4\mathcal{H}'^2} \\
+ & - (70\mathcal{H}^7 + 130\mathcal{H}^5\mathcal{H}' + 66\mathcal{H}^3\mathcal{H}'^2 + 32\mathcal{H}\mathcal{H}'^3 - 24\mathcal{H}^4\mathcal{H}'' - 73\mathcal{H}^2\mathcal{H}'\mathcal{H}'' - 52\mathcal{H}'^2\mathcal{H}''') \frac{\nabla^2\phi'}{\mathcal{H}^4\mathcal{H}'} \\
+ & - (104\mathcal{H}^{10} + 42\mathcal{H}^8\mathcal{H}' + 2\mathcal{H}^6\mathcal{H}'^2 - 20\mathcal{H}^4\mathcal{H}'^3 - 8\mathcal{H}^2\mathcal{H}'^4 - 36\mathcal{H}^7\mathcal{H}'' + \mathcal{H}^5\mathcal{H}'\mathcal{H}'' + 32\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \\
+ & + 32\mathcal{H}\mathcal{H}'^3\mathcal{H}'' - 18\mathcal{H}^2\mathcal{H}'\mathcal{H}''^2 - 26\mathcal{H}'^2\mathcal{H}''^2) \frac{\nabla^2\notag\\
+ & \qquad+ (209\notag\\
+ & \qquad+ (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad+ (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad+ (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad- (\frac{\notag\\
+ & \qquad-\end {aligned}
+$$
+
+$$ = a^{(C.19)} $$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{equation}
+\begin{aligned}
+& \frac{2}{a^2} \left[ \alpha \left\{
+ \begin{aligned}[t]
+ & 3(3H'' + 2HH' - 4H^3)\phi - 3(H^2 - 3H')\phi' + 3H\phi'' + 3(7H' - 5H^2)\psi' + 3\psi''' \\
+ & \quad - 3H\nabla^2(\phi - 2\psi) + \nabla^2(\phi' - 2\psi')
+ \end{aligned}
+ \right\} + \beta \left\{
+ \begin{aligned}[t]
+ & (60H'^3H'' + 171H^4H'H'' + 172H^4H'H'' \\
+ & \quad + 44H^6H'' - 72HH'^4 - 134H^3H'^3 - 220H^5H'^2 - 282H^7H' - 192H^9) \frac{\nabla^2\phi}{6H^4H'^2} \\
+ & + (96H^9 + 156H^7H' + 84H^5H'^2 + 83H^3H'^3 + 24HH'^4 - 24H^6H'' - 82H^4H'H''
+ \end{aligned}
+ \right\} \\
+& \qquad - (1880H^9H' + 2156H^7H'^2 + 1710H^5H'^3 + 992H^3H'^4 + 432HH'^5 + 576H^8H'' + 178HH'H'' \\
+& \qquad - 1231H^4H'^2H'' - 984H^2H'^3H'' - 360H'^4H'' - 144H^5H''^2 - 444H^3H'H''^2 \\
+& \qquad - 288HH'^2H''^2) \frac{2\nabla^2\psi}{3H^4H'^2} \\
+& \qquad - (288H^9 + 419H^7H' + 323H^5H'^2 + 176H^3H'^3 + 108HH'^4 - 66H^6H'' - 258H^4H'H'' \\
+& \qquad - 246H^2H'^2H'' - 90H'^3H''') \frac{\phi}{3H^3H'^2} \\
+& \qquad - (576H^{10} + 1566HH' + 1126H^6H'^2 + 734H^4H'^3 + 504H^2H'^4 + 444H^7H'' - 56H^5H'H'' \\
+& \qquad - 691H^3H'^2H'' - 180HH'^3H'' - 144H^4H''^2 - 444H^2H'H''^2 - 288H'^2H''^2) \frac{\psi'}{6H^4H'^2} \\
+& \qquad - (144H^9 + 208H^7H' + 166H^5H'^2 + 88H^3H'^3 + 54HH'^4 - 33H^6H'' - 129H^4H'H'' \\
+& \qquad - 123H^2H'^2H'' - 45H'^3H''') \frac{2\psi''}{3H^4H'^2} \\
+& \qquad + \left( \frac{H^2}{3H'} \right) \nabla^2\phi' - \left(\frac{2}{3}\right) \nabla^2\psi' + \left(\frac{H^3}{H'}\right) \phi'' + \left(\frac{H^2}{H'}\right) \psi''' \right]_{,i} = -a^2 [P_0 v_i + \rho (v_i + B_i)] ,
+\end{aligned}
+\tag{C.20}
+\end{equation}
+$$
+---PAGE_BREAK---
+
+C. Modified Gauss-Bonnet
+
+$$
+\begin{align*}
+& \frac{2}{a^2} \left[ \alpha \left\{
+ \begin{aligned}[t]
+ & 12 (\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \phi - 3 (6\mathcal{H}^3 + \mathcal{H}\mathcal{H}' - 6\mathcal{H}'') \phi' - 3 (\mathcal{H}^2 - 4\mathcal{H}') \\
+ & + 3\mathcal{H}\phi''' + 6 (\mathcal{H}^4 - 6\mathcal{H}^2\mathcal{H}' + \mathcal{H}'^2 - \mathcal{H}\mathcal{H}'' + \mathcal{H}''' ) \psi - 3 (2\mathcal{H}^3 + 13\mathcal{H}\mathcal{H}' - 5\mathcal{H}'') \psi' + 3\psi'''' \\
+ & - 3 (7\mathcal{H}^2 - 6\mathcal{H}') \psi'' - 2 (\mathcal{H}^2 + 2\mathcal{H}') \nabla^2 \phi - 3\mathcal{H}\nabla^2 (2\phi' + \psi') + \nabla^2 (\phi'' - 5\psi'')
+ \end{aligned}
+ \right\} \\
+& + \beta \left\{
+ \begin{aligned}[t]
+ & (8\mathcal{H}^3\mathcal{H}'\mathcal{H}'' - 16\mathcal{H}^4\mathcal{H}'^2 - 4\mathcal{H}'^4 - 4\mathcal{H}\mathcal{H}'^2\mathcal{H}'' + \mathcal{H}^2 [13\mathcal{H}'^3 - \mathcal{H}''^2]) \frac{8\phi}{\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^8\mathcal{H}' + 48\mathcal{H}^6\mathcal{H}'^2 + 64\mathcal{H}^2\mathcal{H}'^4 - 18\mathcal{H}^5 - 6\mathcal{H}^5\mathcal{H}'\mathcal{H}'' + 36\mathcal{H}^3\mathcal{H}'^2\mathcal{H}'' \\
+ & - 3\mathcal{H}^4 [47\mathcal{H}'^3 + 4\mathcal{H}''^2 - 2\mathcal{H}'\mathcal{H}''']) \frac{\phi'}{3\mathcal{H}\mathcal{H}'^3} + (7\mathcal{H}^4\mathcal{H}' + 2\mathcal{H}^2\mathcal{H}'^2 + 2\mathcal{H}'^3 - 4\mathcal{H}^3\mathcal{H}''') \frac{\phi''}{\mathcal{H}'^2} \\
+ & + (4\mathcal{H}^7\mathcal{H}' - 48\mathcal{H}^5\mathcal{H}'^2 - 22\mathcal{H}\mathcal{H}'^4 + 21\mathcal{H}^4\mathcal{H}'\mathcal{H}'' - 6\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' + 6\mathcal{H}'^3\mathcal{H}'' \\
+ & + 3\mathcal{H}^3 [4\mathcal{H}'^3 - 2\mathcal{H}''^2 + \mathcal{H}'\mathcal{H}'']) \frac{2\psi}{3\mathcal{H}\mathcal{H}'^2} \\
+ & - (8\mathcal{H}^9\mathcal{H}' + 32\mathcal{H}^7\mathcal{H}'^2 - 14\mathcal{H}\mathcal{H}'^5 - 6\mathcal{H}^6\mathcal{H}'\mathcal{H}'' - 81\mathcal{H}^4\mathcal{H}'^2\mathcal{H}'' + 42\mathcal{H}^2\mathcal{H}'^3\mathcal{H}'' + 18\mathcal{H}'^4\mathcal{H}'' \\
+ & - \mathcal{H}^3 [92\mathcal{H}'^4 - 12\mathcal{H}'\mathcal{H}''^2] + 3\mathcal{H}^5 [49\mathcal{H}'^3 - 4\mathcal{H}''^2 + 2\mathcal{H}'\mathcal{H}'']) \frac{\psi'}{3\mathcal{H}^2\mathcal{H}'^3} \\
+ & - (8\mathcal{H}^6\mathcal{H}' + 27\mathcal{H}^4\mathcal{H}'^2 + 40\mathcal{H}'^4 + 6\mathcal{H}^3\mathcal{H}'\mathcal{H}'' + 18\mathcal{H}\mathcal{H}'^2\mathcal{H}'' - 6\mathcal{H}^2 [14\mathcal{H}'^3 + 2\mathcal{H}''^2 - \mathcal{H}'\mathcal{H}''']) \frac{\psi'}{3\mathcal{H}} \\
+ & + (4\mathcal{H}^4\mathcal{H}' - \mathcal{H}^2\mathcal{H}'^2 + \mathcal{H}'^3 - 2\mathcal{H}^3\mathcal{H}'') \frac{\psi'''}{\mathcal{H}\mathcal{H}'^2} \\
+ & - (16\mathcal{H}^7\mathcal{H}' + 30\mathcal{H}^5\mathcal{H}'^2 + 131\mathcal{H}\mathcal{H}'^4 - 12\mathcal{H}^4\mathcal{H}'\mathcal{H}'' + 6\mathcal{H}^2\mathcal{H}'^2\mathcal{H}'' - 6\mathcal{H}'^3\mathcal{H}'' \\
+ & - 3\mathcal{H}^3 [7\mathcal{H}'^3 + \mathcal{H}''^2 - 4\mathcal{H}'\mathcal{H}''']) \frac{\nabla^2 \phi}{18 \mathcal{H}\mathcal{H}'^3} + (7 \mathcal{H}^4 \mathcal{H}' - 7 \mathcal{H}^2 \mathcal{H}'^2 + \mathcal{H}'^3 - 4 \mathcal{H}^3 \mathcal{H}'') \frac{\nabla^2 \phi'}{3 \mathcal{H}\mathcal{H}'^2} \\
+ & + (2 \mathcal{H}^7 \mathcal{H}' + 453 \mathcal{H}^5 \mathcal{H}'^2 - 68 \mathcal{H}\mathcal{H}'^4 - 234 \mathcal{H}^4 \mathcal{H}' \mathcal{H}'' + 78 \mathcal{H}^2 \mathcal{H}'^2 \mathcal{H}'' + 48 \mathcal{H}'^3 \mathcal{H}'' \\
+ & - 3 \mathcal{H}^3 [69 \mathcal{H}'^3 - 12 \mathcal{H}''^2 + 2 \mathcal{H}' \mathcal{H}''']) \frac{\nabla^2 \psi}{18 \, \mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} } + (4 \, \mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} - 21 \, \mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} + 6 \, \mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} + 4 \, \mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} ) \frac{\nabla^2 \psi'}{\mathrm{\ensurefootnotemark[0]\ensurefootnotemark[1]} } \\
+ & + (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \psi''' + (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \phi''' + (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \nabla^2 \phi'' - (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \nabla^2 \psi'' - (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \nabla^2 \nabla^2 \phi + (\frac{\mathrm{\ensurefootnotemark[0]}}{\mathrm{\ensurefootnotemark[0]}}) \nabla^2 \nabla^2 \psi ] \\
+ & + [ (11 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} - 10 \, \mathrm{\ensurefootnotemark[0]} - 23 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} - 2 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} - 6 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} ) \frac{\phi}{2 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]}} \\
+ & + (2 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} - 79 \, \mathrm{\ensurefootnotemark[0]} \, \mathrm{\ensurefootnotemark[0]} - 36 \, \mathrm{\ensurefootnotemark[0]} - 42 \, \mathrm{\ensurefootnotemark[0]} - 68 \, \mathrm{\ensurefootnotemark[0]}) \\
+ & + (\mathrm{\ensurefootnotemark[0]}) (\phi' - (4 \, \mathrm{\ensurefootnotemark[0]} + \mathrm{\ensurefootnotemark[0]} - 26) (\mathrm{\ensurefootnotemark[0]} + 6)) (\frac{\psi'}{\mathrm{\ensurefootnotemark[0]}}) + (\frac{\psi''}{3}) (\nabla^{(1)}(\phi' - (\frac{(2)}{(1)}) (\nabla^{(1)}(\psi')))]_{,ij}
+ \end{aligned}
+ \right\rangle \\
+& = a^2 [\delta_{ij}(dP - 2P_0ψ) + 2P_0h_{ij}] .
+\normalsize
+(C.21)
+$$
+---PAGE_BREAK---
+
+### C.5.1. Discussion and Future Work
+
+In this appendix, we have provided a derivation of the governing equations for a fourth order $f(R, G)$ theory. Throughout we assumed a flat FRLW universe. We rederived the governing equations in the background, and, using cosmological perturbation theory to linear order, derived the governing equations for the scalar perturbations. Since the equations are rather complex, we only present them in longitudinal gauge. However, we also provide the definitions of the gauge-invariant variables in this gauge, both for the metric and the matter perturbations in Chapter 2. One can therefore easily rewrite the governing equations for any other gauge.
+
+Here we only studied scalar perturbations, leaving the discussion of vector and tensor perturbations for future work [104]. The detection of gravitational waves and present and future gravitational wave observatories like LIGO [129], Virgo [130], KAGRA [131], and LISA [132] makes calculating the tensor perturbation evolution equations an exciting future project.
+
+We also need to find solutions to the governing equations, since only then can we calculate observational signatures that can be compared to the observational data. The equations presented in this appendix are rather complex and hence difficult to solve. In order to make solving the equations less time consuming, we have also provided the Mathematica sheets in Github [133].
+---PAGE_BREAK---
+
+# Bibliography
+
+[1] B. P. Abbott, R. Abbott, T. D. Abbott, M. R. Abernathy, F. Acernese, K. Ackley et al., *Observation of Gravitational Waves from a Binary Black Hole Merger*, *Physical Review Letters* **116** (2016) 061102 [1602.03837].
+
+[2] S. Weinberg, *Gravitation and Cosmology: Principles and Applications of the General Theory of Relativity*. Wiley, New York, NY, 1972.
+
+[3] T. Clifton, P. G. Ferreira, A. Padilla and C. Skordis, *Modified Gravity and Cosmology*, Phys. Rept. **513** (2012) 1 [1106.2476].
+
+[4] C. Pittordis and W. Sutherland, *Testing Modified Gravity Theories via Wide Binaries and GAIA*, Mon. Not. Roy. Astron. Soc. **480** (2018) 1778 [1711.10867].
+
+[5] C. Pittordis and W. Sutherland, *Testing Modified Gravity with Wide Binaries in GAIA DR2*, Mon. Not. Roy. Astron. Soc. **488** (2019) 4740 [1905.09619].
+
+[6] S. Nojiri, S. D. Odintsov and V. K. Oikonomou, *Modified Gravity Theories on a Nutshell: Inflation, Bounce and Late-time Evolution*, Phys. Rept. **692** (2017) 1 [1705.11098].
+
+[7] G. W. Horndeski, *Second-order scalar-tensor field equations in a four-dimensional space*, Int. J. Theor. Phys., v. 10, no. 6, pp. 363-384.
+
+[8] C. Deffayet, G. Esposito-Farèse and A. Vikman, *Covariant galileon*, Phys. Rev. D **79** (2009) 084003.
+
+[9] P. G. Fernandes, *Charged Black Holes in AdS Spaces in 4D Einstein Gauss-Bonnet Gravity*, 2003.05491.
+
+[10] P. G. Fernandes, P. Carrilho, T. Clifton and D. J. Mulryne, *Derivation of Regularized Field Equations for the Einstein-Gauss-Bonnet Theory in Four Dimensions*, 2004.08362.
+
+[11] P. J. E. Peebles and B. Ratra, *The cosmological constant and dark energy*, Rev. Mod. Phys. **75** (2003) 559.
+
+[12] S. M. Carroll, *The cosmological constant*, Living Reviews in Relativity **4** (2001).
+
+[13] EUCLID collaboration, R. Scaramella et al., *Euclid space mission: a cosmological challenge for the next 15 years*, IAU Symp. **306** (2015) 375 [1501.04908].
+---PAGE_BREAK---
+
+Bibliography
+
+[14] R. L. Jones, C. T. Slater, J. Moeyens, L. Allen, T. Axelrod, K. Cook et al., *The large synoptic survey telescope as a near-earth object discovery machine*, *Icarus* **303** (2018) 181.
+
+[15] A. Weltman et al., *Fundamental Physics with the Square Kilometre Array*, *Publ. Astron. Soc. Austral.* **37** (2020) e002 [1810.02680].
+
+[16] K. A. Malik and D. Wands, *Cosmological perturbations*, *Physics Reports* **475** (2009) 1.
+
+[17] N. Kaiser, *Elements of Astrophysics*. CreateSpace Independent Publishing Platform, 2014.
+
+[18] S. Chen and D. J. Schwarz, *Fluctuations of differential number counts of radio continuum sources*, *Phys. Rev. D91* (2015) 043507 [1407.4682].
+
+[19] A. J. S. Hamilton, *Linear Redshift Distortions: A Review*, pp. 185-275. Springer Netherlands, Dordrecht, 1998. 10.1007/978-94-011-4960-0-17.
+
+[20] N. Kaiser, *Clustering in real space and in redshift space*, *Monthly Notices of the Royal Astronomical Society* **227** (1987) 1.
+
+[21] S. Saito, *Lecture notes in Galaxy Clustering in Redshift Space given in Max-Planck-Institut für Physik*, June, 2016.
+
+[22] N. Grimm and J. Yoo, *Jacobi Mapping Approach for a Precise Cosmological Weak Lensing Formalism*, **1806.00017**.
+
+[23] C. Clarkson, *Roulettes: A weak lensing formalism for strong lensing - II. Derivation and analysis*, *Class. Quant. Grav.* **33** (2016) 245003 [1603.04652].
+
+[24] D. Walsh, R. F. Carswell and R. J. Weymann, *0957+561 A, B: twin quasistellar objects or gravitational lens?, Nature* **279** (1979) 381.
+
+[25] R. K. Sachs and A. M. Wolfe, *Perturbations of a Cosmological Model and Angular Variations of the Microwave Background*, *The Astrophysical Journal* **147** (1967) 73.
+
+[26] J. Kristian and R. K. Sachs, *Observations in Cosmology*, *The Astrophysical Journal* **143** (1966) 379.
+
+[27] R. K. Sachs, *Gravitational waves in general relativity. 6. The outgoing radiation condition*, *Proc. Roy. Soc. Lond.* **A264** (1961) 309.
+
+[28] A. Challinor and A. Lewis, *Linear power spectrum of observed source number counts*, *Phys. Rev. D* **84** (2011) 043516.
+
+[29] D. Jeong, F. Schmidt and C. M. Hirata, *Large-scale clustering of galaxies in general relativity*, *Phys. Rev. D* **85** (2012) 023504.
+---PAGE_BREAK---
+
+Bibliography
+
+[30] C. Bonvin and R. Durrer, *What galaxy surveys really measure*, Phys. Rev. D 84 (2011) 063505.
+
+[31] D. Bertacca, R. Maartens and C. Clarkson, *Observed galaxy number counts on the lightcone up to second order: I. Main result*, Journal of Cosmology and Astroparticle Physics **2014** (2014) 037.
+
+[32] D. Bertacca, R. Maartens and C. Clarkson, *Observed galaxy number counts on the lightcone up to second order: II. Derivation*, Journal of Cosmology and Astroparticle Physics **2014** (2014) 013.
+
+[33] E. Di Dio, R. Durrer, G. Marozzi and F. Montanari, *Galaxy number counts to second order and their bispectrum*, JCAP **1412** (2014) 017 [1407.0376].
+
+[34] J. Yoo, *General relativistic description of the observed galaxy power spectrum: Do we understand what we measure?*, Phys. Rev. D **82** (2010) 083508.
+
+[35] J. Yoo and M. Zaldarriaga, *Beyond the Linear-Order Relativistic Effect in Galaxy Clustering: Second-Order Gauge-Invariant Formalism*, Phys. Rev. D90 (2014) 023513 [1406.4140].
+
+[36] F. Schmidt and D. Jeong, *Cosmic rulers*, Phys. Rev. D **86** (2012) 083527.
+
+[37] G. Fanizza, J. Yoo and S. G. Biern, *Non-linear general relativistic effects in the observed redshift*, 1805.05959.
+
+[38] E. Di Dio and F. Beutler, *The relativistic galaxy number counts in the weak field approximation*, 2004.07916.
+
+[39] J. T. Nielsen and R. Durrer, *Higher order relativistic galaxy number counts: dominating terms*, JCAP **1703** (2017) 010 [1606.02113].
+
+[40] C. W. Misner, K. S. Thorne and J. A. Wheeler, *Gravitation*. 1973.
+
+[41] G. Ellis, R. Maartens and M. MacCallum, *Relativistic Cosmology*, Relativistic Cosmology. Cambridge University Press, 2012.
+
+[42] J. M. Martín-García, xAct: Efficient tensor computer algebra for the Wolfram Language, 2016.
+
+[43] D. Brizuela, J. M. Martin-Garcia and G. A. Mena Marugan, xPert: Computer algebra for metric perturbation theory, Gen. Rel. Grav. **41** (2009) 2415 [0807.0824].
+
+[44] E. Poisson, *A Relativist's Toolkit: The Mathematics of Black-Hole Mechanics*. Cambridge University Press, 2004.
+
+[45] E. Lifshitz, *Replication of: On the gravitational stability of the expanding universe*, General Relativity and Gravitation **49** (2017) 18.
+---PAGE_BREAK---
+
+Bibliography
+
+[46] E. Lifshitz and I. Khalatnikov, *Investigations in relativistic cosmology*, *Advances in Physics* **12** (1963) 185
+[https://doi.org/10.1080/00018736300101283].
+
+[47] K. Tomita, *Non-Linear Theory of Gravitational Instability in the Expanding Universe*. II, *Progress of Theoretical Physics* **45** (1971) 1747
+[https://academic.oup.com/ptp/article-pdf/45/6/1747/5306647/45-6-1747.pdf].
+
+[48] J. M. Bardeen, *Gauge-invariant cosmological perturbations*, *Phys. Rev. D* **22** (1980) 1882.
+
+[49] H. Kodama and M. Sasaki, *Cosmological Perturbation Theory*, *Progress of Theoretical Physics Supplement* **78** (1984) 1.
+
+[50] V. Mukhanov, H. Feldman and R. Brandenberger, *Theory of cosmological perturbations*, *Physics Reports* **215** (1992) 203.
+
+[51] K. A. Malik and D. R. Matravers, *A Concise Introduction to Perturbation Theory in Cosmology*, *Class. Quant. Grav.* **25** (2008) 193001 [0804.3276].
+
+[52] C. Pitrou, X. Roy and O. Umeh, *xPand: An algorithm for perturbing homogeneous cosmologies*, *Class. Quant. Grav.* **30** (2013) 165002
+[1302.6174].
+
+[53] R. M. Wald, *General relativity*. Chicago Univ. Press, Chicago, IL, 1984.
+
+[54] M. Nakahara, *Geometry, topology and physics*, Graduate student series in physics. Hilger, Bristol, 1990.
+
+[55] R. Durrer, *The Cosmic Microwave Background*. Cambridge University Press, 2008.
+
+[56] S. M. Carroll, *Spacetime and Geometry*. Cambridge University Press, 2019.
+
+[57] J. B. Hartle, *Gravity: An Introduction to Einstein's General Relativity*. Benjamin Cummings, illustrate ed., Jan., 2003.
+
+[58] D. Tong, *Lectures on cosmology*, 2019.
+
+[59] J. M. Stewart, M. Walker and R. Penrose, *Perturbations of space-times in general relativity*, *Proceedings of the Royal Society of London. A. Mathematical and Physical Sciences* **341** (1974) 49
+[https://royalsocietypublishing.org/doi/pdf/10.1098/rspa.1974.0172].
+
+[60] K. A. Malik and D. R. Matravers, *A concise introduction to perturbation theory in cosmology*, *Classical and Quantum Gravity* **25** (2008) 193001.
+
+[61] K. A. Malik and D. R. Matravers, *Comments on gauge-invariance in cosmology*, *General Relativity and Gravitation* **45** (2013) 1989.
+---PAGE_BREAK---
+
+Bibliography
+
+[62] O. Umeh, C. Clarkson and R. Maartens, *Nonlinear relativistic corrections to cosmological distances, redshift and gravitational lensing magnification: I.* *Key results, Classical and Quantum Gravity* **31** (2014) 202001.
+
+[63] P. Carrilho, *Non-linear effects in early Universe cosmology*, Ph.D. thesis,
+Queen Mary University of London, 2018.
+
+[64] O. Umeh, C. Clarkson and R. Maartens, *Nonlinear relativistic corrections to cosmological distances, redshift and gravitational lensing magnification: II.* *Derivation, Classical and Quantum Gravity* **31** (2014) 205001.
+
+[65] C. Clarkson, G. F. R. Ellis, A. Faltenbacher, R. Maartens, O. Umeh and J.-P. Uzan, (*Mis-)Interpreting supernovae observations in a lumpy universe*, *Mon. Not. Roy. Astron. Soc.* **426** (2012) 1121 [1109.2484].
+
+[66] (BICEP2/KECK AND PLANCK COLLABORATIONS) collaboration, P. A. R. Ade, N. Aghanim, Z. Ahmed, R. W. Aikin, K. D. Alexander, M. Arnaud et al., *Joint analysis of bicep2/Keck Array and Planck data*, *Phys. Rev. Lett.* **114** (2015) 101301 [1502.00612].
+
+[67] Planck Collaboration, P. A. R. Ade, N. Aghanim, M. Arnaud, M. Ashdown, J. Aumont et al., *Planck 2015 results. XIII. Cosmological parameters*, *ArXiv e-prints* (2015) [1502.01589].
+
+[68] M. S. Turner, M. White and J. E. Lidsey, *Tensor perturbations in inflationary models as a probe of cosmology*, *Phys. Rev. D* **48** (1993) 4613 [astro-ph/9306029].
+
+[69] B. Allen and S. Koranda, *CBR anisotropy from primordial gravitational waves in inflationary cosmologies*, *Phys. Rev. D* **50** (1994) 3713 [astro-ph/9404068].
+
+[70] K.-W. Ng and A. D. Speliotopoulos, *Cosmological evolution of scale-invariant gravity waves*, *Phys. Rev. D* **52** (1995) 2112 [astro-ph/9405043].
+
+[71] Y. Wang, *Simple analytical methods for computing the gravity-wave contribution to the cosmic background radiation anisotropy*, *Phys. Rev. D* **53** (1996) 639 [astro-ph/9501116].
+
+[72] S. Weinberg, *Damping of tensor modes in cosmology*, *Phys. Rev. D* **69** (2004) 023503 [astro-ph/0306304].
+
+[73] J. R. Pritchard and M. Kamionkowski, *Cosmic microwave background fluctuations from gravitational waves: An analytic approach*, *Annals of Physics* **318** (2005) 2 [astro-ph/0412581].
+
+[74] S. Bashinsky, *Coupled Evolution of Primordial Gravity Waves and Relic Neutrinos*, *ArXiv Astrophysics e-prints* (2005) [astro-ph/0505502].
+
+[75] S. Weinberg, *Cosmology*. Oxford University Press, 2008.
+---PAGE_BREAK---
+
+Bibliography
+
+[76] B. A. Stefanek and W. W. Repko, Analytic description of the damping of gravitational waves by free streaming neutrinos, Phys. Rev. D 88 (2013) 083536 [1207.7285].
+
+[77] A. K. Rebhan and D. J. Schwarz, Kinetic versus thermal-field-theory approach to cosmological perturbations, Phys. Rev. D 50 (1994) 2541.
+
+[78] S. F. Feshchenko, N. I. Shkil and L. D. Nikolenko, Asymptotic methods in the theory of linear differential equations, S.F. Feshchenko, N.I. Shkil, and L.D. Nikolenko. *Translated by Scripta Technica*. American Elsevier Pub. Co New York, 1966.
+
+[79] A. J. Wren and K. A. Malik, Double power series method for approximating cosmological perturbations, Phys. Rev. D 95 (2017) 083526.
+
+[80] A. J. Wren, K. A. Malik and J. L. Fuentes, *Mathematica notebooks for Gravitational waves in a flat radiation-matter universe including anisotropic stress*, Dec., 2017.
+
+[81] T. Padmanabhan, *Advanced Topics in Cosmology: A Pedagogical Introduction*, in *Graduate School in Astronomy: X* (S. Daflon, J. Alcaniz, E. Telles and R. de la Reza, eds.), vol. 843 of *American Institute of Physics Conference Series*, pp. 111–166, June, 2006, astro-ph/0602117, DOI.
+
+[82] E. L. Wright, *A Cosmology Calculator for the World Wide Web*, PASP 118 (2006) 1711 [astro-ph/0609593].
+
+[83] B. Ryden, *Intoduction to cosmology*. Addison Wesley, 2003.
+
+[84] D. H. Lyth and A. R. Liddle, *The Primordial Density Perturbation*. June, 2009.
+
+[85] P. Carrilho and K. A. Malik, *Vector and tensor contributions to the curvature perturbation at second order*, JCAP 2 (2016) 021 [1507.06922].
+
+[86] The BOSS Collaboration, *The Baryon Oscillation Spectroscopic Survey of SDSS-III*, The Astronomical Journal 145 (2013) 10 [1208.0022].
+
+[87] G.-B. Zhao et al., *The extended Baryon Oscillation Spectroscopic Survey: a cosmological forecast*, Mon. Not. Roy. Astron. Soc. 457 (2016) 2377 [1510.08216].
+
+[88] J. Green et al., *Wide-Field InfraRed Survey Telescope (WFIRST) Final Report*, ArXiv e-prints (2012) [1208.4012].
+
+[89] J. Yoo, A. L. Fitzpatrick and M. Zaldarriaga, *New perspective on galaxy clustering as a cosmological probe: General relativistic effects*, Phys. Rev. D 80 (2009) 083514 [0907.0707].
+---PAGE_BREAK---
+
+Bibliography
+
+[90] J. Yoo and F. Scaccabarozzi, *Unified Treatment of the Luminosity Distance in Cosmology*, JCAP 1609 (2016) 046 [1606.08453].
+
+[91] I. Ben-Dayan, G. Marozzi, F. Nugier and G. Veneziano, *The second-order luminosity-redshift relation in a generic inhomogeneous cosmology*, JCAP 1211 (2012) 045 [1209.4326].
+
+[92] G. Fanizza, M. Gasperini, G. Marozzi and G. Veneziano, *An exact Jacobi map in the geodesic light-cone gauge*, JCAP 1311 (2013) 019 [1308.4935].
+
+[93] G. Marozzi, *The luminosity distance-redshift relation up to second order in the Poisson gauge with anisotropic stress*, Class. Quant. Grav. 32 (2015) 045004 [1406.1135].
+
+[94] J. Yoo, *Relativistic Effect in Galaxy Clustering*, Class. Quant. Grav. 31 (2014) 234001 [1409.3223].
+
+[95] C. Clarkson, G. F. R. Ellis, A. Faltenbacher, R. Maartens, O. Umeh and J.-P. Uzan, *(Mis-)Interpreting supernovae observations in a lumpy universe*, Mon. Not. Roy. Astron. Soc. 426 (2012) 1121 [1109.2484].
+
+[96] M. Ibison, *On the conformal forms of the Robertson-Walker metric*, J. Math. Phys. 48 (2007) 122501 [0704.2788].
+
+[97] S. Aretakis, *Lecture notes on general relativity*. Columbia University., 2013.
+
+[98] A. Campos, *Galaxy number counts*, Proc. Int. Sch. Phys. Fermi 132 (1996) 123 [astro-ph/9510051].
+
+[99] E. Di Dio, R. Durrer, G. Marozzi and F. Montanari, *The bispectrum of relativistic galaxy number counts*, JCAP 01 (2016) 016 [1510.04202].
+
+[100] A. J. Wren, J. L. Fuentes and K. A. Malik, *Gravitational waves in a flat radiation-matter universe including anisotropic stress*, 1712.10012.
+
+[101] P. Carrilho and K. A. Malik, *Vector and tensor contributions to the curvature perturbation at second order*, Journal of Cosmology and Astroparticle Physics 2016 (2016) 021.
+
+[102] J. L. Fuentes, J. C. Hidalgo and K. A. Malik, *Galaxy number counts at second order: an independent approach*, 1908.08400.
+
+[103] J. L. Fuentes, J. C. Hidalgo and K. A. Malik, *Galaxy number counts at second order II: a leading order comparison (in preparation)*, .
+
+[104] J. L. Fuentes, U. A. Gillani and K. A. Malik, *Vector and tensor perturbations in fourth order gravity (in preparation)*, .
+
+[105] S. Nojiri and S. D. Odintsov, *Introduction to modified gravity and gravitational alternative for dark energy*, eConf C0602061 (2006) 06 [hep-th/0601213].
+---PAGE_BREAK---
+
+Bibliography
+
+[106] S. Nojiri and S. D. Odintsov, *Unified cosmic history in modified gravity: from $F(R)$ theory to Lorentz non-invariant models*, Phys. Rept. 505 (2011) 59 [1011.0544].
+
+[107] L. Amendola, D. Polarski and S. Tsujikawa, *Are $f(R)$ dark energy models cosmologically viable?*, Phys. Rev. Lett. 98 (2007) 131302 [astro-ph/0603703].
+
+[108] DES collaboration, B. Flaugher, *The Dark Energy Survey*, Int. J. Mod. Phys. A20 (2005) 3121.
+
+[109] DESI collaboration, A. Aghamousa et al., *The DESI Experiment Part I: Science, Targeting, and Survey Design*, 1611.00036.
+
+[110] EUCLID collaboration, I. Tereno et al., *Euclid Space Mission: building the sky survey*, IAU Symp. 306 (2014) 379 [1502.00903].
+
+[111] S. Nojiri and S. D. Odintsov, *Modified gravity and its reconstruction from the universe expansion history*, Journal of Physics: Conference Series 66 (2007) 012005.
+
+[112] M. Chaichian, S. Nojiri, S. D. Odintsov, M. Oksanen and A. Tureanu, *Modified $f(r)$ hořava–lifshitz gravity: a way to accelerating frw cosmology*, Classical and Quantum Gravity 27 (2010) 185021.
+
+[113] P. Zhang, *Behavior of $f(r)$ gravity in the solar system, galaxies, and clusters*, Phys. Rev. D 76 (2007) 024007.
+
+[114] C. G. Böhmer, L. Hollenstein and F. S. N. Lobo, *Stability of the einstein static universe in $f(r)$ gravity*, Phys. Rev. D 76 (2007) 084005.
+
+[115] S. Nojiri and S. D. Odintsov, *Modified gravity with negative and positive powers of curvature: Unification of inflation and cosmic acceleration*, Physical Review D 68 (2003).
+
+[116] T. Harko, F. S. N. Lobo, S. Nojiri and S. D. Odintsov, $f(r,t)$ gravity, Phys. Rev. D 84 (2011) 024020.
+
+[117] S. Nojiri, S. D. Odintsov and D. Saez-Gomez, *Cosmological reconstruction of realistic modified $F(R)$ gravities*, Phys. Lett. B681 (2009) 74 [0908.1269].
+
+[118] E. Elizalde, R. Myrzakulov, V. V. Obukhov and D. Sáez-Gómez, *ΛCDM epoch reconstruction from $F(R,G)$ and modified Gauss-Bonnet gravities*, Classical and Quantum Gravity 27 (2010) 095007.
+
+[119] B. M. Leith and I. P. Neupane, *Gauss-bonnet cosmologies: crossing the phantom divide and the transition from matter dominance to dark energy*, Journal of Cosmology and Astroparticle Physics 2007 (2007) 019.
+---PAGE_BREAK---
+
+Bibliography
+
+[120] S. Nojiri, S. D. Odintsov and S. Ogushi, Friedmann-Robertson-Walker brane cosmological equations from the five-dimensional bulk (A)dS black hole, Int. J. Mod. Phys. A17 (2002) 4809 [hep-th/0205187].
+
+[121] H.-J. Schmidt and D. Singleton, *Isotropic universe with almost scale-invariant fourth-order gravity*, J. Math. Phys. **54** (2013) 062502 [1212.1769].
+
+[122] S. Nojiri and S. D. Odintsov, *Modified gauss-bonnet theory as gravitational alternative for dark energy*, Physics Letters B **631** (2005) 1.
+
+[123] G. Cognola, E. Elizalde, S. Nojiri, S. D. Odintsov and S. Zerbini, *Dark energy in modified gauss-bonnet gravity: Late-time acceleration and the hierarchy problem*, Physical Review D **73** (2006).
+
+[124] S. Nojiri, S. D. Odintsov and M. Sasaki, Gauss-bonnet dark energy, Physical Review D **71** (2005).
+
+[125] D. Becker, C. Ripken and F. Saueressig, *On avoiding ostrogradski instabilities within asymptotic safety*, Journal of High Energy Physics **2017** (2017).
+
+[126] H. Motohashi and T. Suyama, *Third order equations of motion and the Ostrogradsky instability*, Phys. Rev. **D91** (2015) 085009 [1411.3721].
+
+[127] B. Himmetoglu, C. R. Contaldi and M. Peloso, *Ghost instabilities of cosmological models with vector fields nonminimally coupled to the curvature*, Phys. Rev. **D80** (2009) 123530 [0909.3524].
+
+[128] S. Nojiri, S. D. Odintsov and V. K. Oikonomou, *Ghost-free Gauss-Bonnet Theories of Gravity*, Phys. Rev. **D99** (2019) 044050 [1811.07790].
+
+[129] B. P. Abbott, R. Abbott, R. Adhikari, P. Ajith, B. Allen, G. Allen et al., *LIGO: the laser interferometer gravitational-wave observatory*, Reports on Progress in Physics **72** (2009) 076901.
+
+[130] B. P. Abbott, R. Abbott, F. Acernese, R. Adhikari, P. Ajith, B. Allen et al., *Search for gravitational-wave burst associated with gamma-ray bursts using data from LIGO science run 5 and VIRGO science run 1*, The Astrophysical Journal **715** (2010) 1438.
+
+[131] T. A. and, *Large-scale cryogenic gravitational-wave telescope in japan: KAGRA*, Journal of Physics: Conference Series **610** (2015) 012016.
+
+[132] P. Amaro-Seoane, S. Aoudia, S. Babak, P. Binétruy, E. Berti, A. Bohé et al., *Low-frequency gravitational-wave science with eLISA/NGO*, Classical and Quantum Gravity **29** (2012) 124016.
+
+[133] J. L. Fuentes, *Linear Gauss-Bonnet*, [https://github.com/jorchfv/Linear-Gauss-Bonnet], 2018.
+---PAGE_BREAK---
+
+List of Figures
+
+3.1. Components of the analytical solution for linear tensor perturbations in a flat radiation-only universe, as set out in (3.16) for a perfect fluid. The $k\tau$ axis is logarithmic. . . . . . . . . . . . . . . . . . . . 45
+
+3.2. *Upper panel:* Real components of the analytical and approximate solution for linear tensor perturbations in a flat radiation-only universe without (solid black line, red dashed line) and with the effect of free streaming neutrinos anisotropic stress with $f_\nu(0) = 0.5$ (red dashed line), as set out in Eqs. (3.16) and (3.22). *Lower panel:* Imaginary components of Eqs. (3.16) and (3.22). The $k\tau$ axis is logarithmic. . . 49
+
+3.3. The real and imaginary parts of the approximate third order solution for a perfect fluid given by Eq. (3.28) (solid blue line) and the numerical solution (dashed orange line) for Eq. (3.14) with $k = 10H_{\text{eq}}/\sqrt{2}$. The horizontal axes show $\tau$ in units of $\tau_r$, the conformal time of recombination, calculated using Ref. [67]. The curves are plotted for values of $\tau$ after horizon-crossing. The solid vertical line corresponds to radiation-matter equality, as defined by Eq. (3.4). . . . . . . . . . 51
+
+3.4. The solid lines show the absolute errors in the approximation of Figure 3.3 as $|f_{(3)}(\tau) - f(\tau)|$, where $f_{(3)}$ is the real or imaginary part, as appropriate, of $h_{(3)}$ from Eq. (3.28) and $f$ is the real or imaginary relevant part of the numerical solution for a perfect fluid. For comparison, the dashed line shows $|1\% \times f(\tau)|$. Downward spikes in the lines represent points where the value becomes zero. The blue solid line being below or level with the green dashed line indicates an error of less than or equal to 1%. See the text for further explanation. . . 52
+
+3.5. The real and imaginary parts of the approximate third order solution with free neutrino anisotropic stress given by Eq. (3.33) (solid blue line) and the numerical solution (dashed orange line) for Eq. (3.20) with $k = 100H_{\text{eq}}/\sqrt{2}$ and $f_\nu(0) = 0.40523$. The curves are plotted for values of $\tau$ after horizon-crossing. The solid vertical line corresponds to radiation-matter equality, as defined by Eq. (3.4). . . . . . . . . . 53
+---PAGE_BREAK---
+
+List of Figures
+
+3.6. *Upper panel:* The approximate solution, $h_{rm}$, of Eq. (3.39) (solid blue line) and the numerical solution for a perfect fluid (dashed orange line) for Eq. (3.14) with $k = 10H_{eq}/\sqrt{2}$. *Lower panel:* The error in the matched solution (solid blue line) plotted against 1% of the numerical solution (dashed green line). *In both panels:* The vertical dashed line is horizon-crossing, $\tau_{k=10} \approx 0.102$, which is very close to the matching point, $\tau = 0.1$. The solid vertical line is radiation-matter equality. . 55
+
+3.7. As for the lower panel of Figure 3.6, but using the leading order approximation, $h_{(1),s}$ of Eq. (3.41), instead of $h_{rm}$. . . . . . . . . . . . 57
+
+4.1. Affine parameter convention of a light-ray in a radio observation. $S$ denotes the source, $O$ is the observer and $\lambda$ is the affine parameter. . 63
+
+4.2. The light-ray bundle going from the source, $S$, to the observer, $O$, the cross sectional area created by the infinitesimal separation of the light-rays and the screen space, $\mathcal{A}$, which is orthogonal to the 4-velocity, $u^\mu$, and the direction of observation, $n^\mu$. For simplicity, it is shown $n^i$ pointing from the source to the observer, i.e. the opposite from the one using in all our calculations. We present a general 4-vector $x^\nu$ and its projection onto screen space $\mathcal{P}_{\mu\nu}x^\nu$. . . . . . . . . . . . . . . 65
+
+4.3. When a light-ray bundle traveling from a source, $S$, to an observer, $O$, passes close to matter, the cross section that the different null geodesics generate, $\mathcal{A}$, gets distorted in different ways, and those are explained by an expansion $\theta$, a vorticity $\omega$, and shear $\Sigma$, defined in Eqs. (4.38) and (4.39). The circles represent the area of the bundle's cross section and the arrows show how it is distorted. . . . . . . . . . . 66
+
+4.4. Volume corresponding to an infinitesimal change in the affine parameter from $\lambda$ to $\lambda + d\lambda$. . . . . . . . . . . . . . . . . . . . . . . . . 67
\ No newline at end of file