Prompt: Set up and solve problems related to relativity (Einstein's equations).
CTIS:
I. Theoretical Framework
1. The FLRW Metric
The cornerstone of modern cosmology is the FLRW metric, which describes a homogeneous andisotropic universe. In its most general form, the FLRW metric can be expressed as:
ds^2 = -c^2 dt^2 + a^2(t) [dr^2 / (1 - kr^2) + r^2 (dθ^2 + sin^2θ dφ^2)]Here:- c is the speed of light in vacuum (299,792,458 m/s)
- t denotes the proper time as measured by a comoving observer- a(t) is the scale factor, a dimensionless quantity describing the relative expansion of the universe- k is the spatial curvature parameter, which can take values of -1 (open universe), 0 (flat universe),
or +1 (closed universe)- (r, θ, φ) are the comoving spatial coordinates in spherical form
The scale factor a(t) is normalized to unity at the present epoch, i.e., a(t_0) = 1, where t_0 is thecurrent age of the universe.
2. Einstein Field Equations
The evolution of the universe is governed by Einstein's field equations, which in their most general
tensorial form are:G_µν + Λg_µν = (8πG/c^4) T_µν
Where:- G_µν is the Einstein tensor, defined as R_µν - (1/2)Rg_µν, where R_µν is the Ricci tensor and R is
the Ricci scalar- Λ is the cosmological constant- g_µν is the metric tensor- G is the gravitational constant (6.67430 × 10^-11 m^3 kg^-1 s^-2)- T_µν is the stress-energy tensor
3. Stress-Energy Tensor for a Perfect Fluid
At cosmological scales, the matter content of the universe can be approximated as a perfect fluid.
The stress-energy tensor for a perfect fluid takes the form:
T_µν = (ρ + P/c^2) u_µ u_ν + P g_µν
Where:- ρ is the energy density
New York General Group1

- P is the pressure- u_µ is the four-velocity of the fluid
4. Friedmann Equations
Applying the Einstein field equations to the FLRW metric and assuming a perfect fluid, we arrive at
the Friedmann equations:(ȧ/a)^2 + kc^2/a^2 = (8πG/3)ρ + Λc^2/32(ä/a) + (ȧ/a)^2 + kc^2/a^2 = -8πGP/c^2 + Λc^2
Where ȧ and ä represent the first and second time derivatives of the scale factor, respectively.
5. Equation of StateTo close the system of equations, we need to specify an equation of state that relates pressure toenergy density. In cosmology, this is often parameterized as:
P = wρc^2
Where w is the equation of state parameter. Different components of the universe have different
values of w:- Non-relativistic matter (including baryonic matter and cold dark matter): w ≈ 0- Radiation (including photons and relativistic neutrinos): w = 1/3- Dark energy in the form of a cosmological constant: w = -1
II. Multi-Component Universe Model
Let's consider a more realistic model that includes multiple components: matter (m), radiation (r),and dark energy (de). The total energy density and pressure can be written as:ρ = ρ_m + ρ_r + ρ_de
P = P_m + P_r + P_de = 0 + (1/3)ρ_r c^2 - ρ_de c^2
The energy densities evolve with the scale factor as:
ρ_m = ρ_m,0 a^-3
ρ_r = ρ_r,0 a^-4
ρ_de = ρ_de,0 (constant for a cosmological constant)
Where the subscript 0 denotes the present-day values.
III. Cosmological Parameters
Several important cosmological parameters can be defined:
1. Hubble Parameter: H(t) = ȧ/a2. Critical Density: ρ_crit(t) = 3H^2(t) / (8πG)
New York General Group2

3. Density Parameters: Ω_i(t) = ρ_i(t) / ρ_crit(t), where i represents different components (m, r, de,k)4. Deceleration Parameter: q(t) = -ä(t)a(t) / ȧ^2(t)IV. Numerical Solution
To solve this system numerically, we can use the fourth-order Runge-Kutta method. Here's a moresophisticated Python implementation that includes multiple components and calculates various
cosmological parameters:```python
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
from scipy.interpolate import interp1d# Physical constantsc = 299792458 # Speed of light in m/s
G = 6.67430e-11 # Gravitational constant in m^3 kg^-1 s^-2
H0 = 70 * 1000 / (3.086e22) # Hubble constant in s^-1
# Present-day density parameters
Omega_m0 = 0.3
Omega_r0 = 9.24e-5 # Includes photons and neutrinos
Omega_de0 = 1 - Omega_m0 - Omega_r0
Omega_k0 = 0 # Flat universe# Critical density
rho_crit0 = 3 * H0**2 / (8 * np.pi * G)
# Present-day energy densities
rho_m0 = Omega_m0 * rho_crit0
rho_r0 = Omega_r0 * rho_crit0
rho_de0 = Omega_de0 * rho_crit0
def deriv(y, t, Omega_m0, Omega_r0, Omega_de0):a, da_dt = y
H = da_dt / arho_m = rho_m0 * (a**-3)
rho_r = rho_r0 * (a**-4)
rho_de = rho_de0
rho = rho_m + rho_r + rho_de
P = rho_r / 3 - rho_ded2a_dt2 = -4*np.pi*G*(rho + 3*P/c**2)*a / 3
return [da_dt, d2a_dt2]# Time array (in seconds)
t = np.logspace(-20, 18, 10000)
New York General Group3

# Initial conditions
a0 = 1e-15 # Start at a = 10^-15
da_dt0 = H0 * a0 * np.sqrt(Omega_m0*a0**-3 + Omega_r0*a0**-4 + Omega_de0)y0 = [a0, da_dt0]# Solve ODE
sol = odeint(deriv, y0, t, args=(Omega_m0, Omega_r0, Omega_de0))# Extract results
a = sol[:, 0]
da_dt = sol[:, 1]# Calculate Hubble parameter
H = da_dt / a# Calculate age of the universe
age = np.trapz(1/H, t)# Calculate deceleration parameterq = -a * (da_dt**-2) * (H**-2) * np.array([deriv([a_i, da_dt_i], t_i, Omega_m0, Omega_r0,Omega_de0)[1] for a_i, da_dt_i, t_i in zip(a, da_dt, t)])# Calculate density parameters
Omega_m = Omega_m0 * (a**-3) * (H0/H)**2
Omega_r = Omega_r0 * (a**-4) * (H0/H)**2
Omega_de = Omega_de0 * (H0/H)**2# Calculate lookback time
lookback_time = age - np.cumsum(1/H[::-1])[::-1] * (t[1] - t[0])# Calculate comoving distancecomoving_distance = np.cumsum(c/H[::-1])[::-1] * (t[1] - t[0])# Calculate luminosity distanceluminosity_distance = a[-1] * comoving_distance / a# Calculate angular diameter distanceangular_diameter_distance = comoving_distance / (1 + (1/a - 1))# Plot results
fig, axs = plt.subplots(3, 2, figsize=(20, 30))axs[0, 0].loglog(t, a, label='Scale factor')axs[0, 0].set_xlabel('Time (s)')
axs[0, 0].set_ylabel('Scale factor')axs[0, 0].legend()
axs[0, 0].grid(True)
New York General Group4

axs[0, 1].semilogx(t, H/H0, label='Hubble parameter / H0')axs[0, 1].set_xlabel('Time (s)')
axs[0, 1].set_ylabel('H/H0')
axs[0, 1].legend()
axs[0, 1].grid(True)axs[1, 0].semilogx(t, q, label='Deceleration parameter')axs[1, 0].set_xlabel('Time (s)')
axs[1, 0].set_ylabel('q')
axs[1, 0].legend()
axs[1, 0].grid(True)axs[1, 1].semilogx(t, Omega_m, label='Ω_m')axs[1, 1].semilogx(t, Omega_r, label='Ω_r')
axs[1, 1].semilogx(t, Omega_de, label='Ω_de')axs[1, 1].set_xlabel('Time (s)')
axs[1, 1].set_ylabel('Density parameters')
axs[1, 1].legend()
axs[1, 1].grid(True)axs[2, 0].loglog(1/a - 1, lookback_time/3.154e16, label='Lookback time')
axs[2, 0].set_xlabel('Redshift')axs[2, 0].set_ylabel('Lookback time (Gyr)')axs[2, 0].legend()
axs[2, 0].grid(True)axs[2, 1].loglog(1/a - 1, luminosity_distance/3.086e22, label='Luminosity distance')axs[2, 1].loglog(1/a - 1, angular_diameter_distance/3.086e22, label='Angular diameter distance')axs[2, 1].set_xlabel('Redshift')axs[2, 1].set_ylabel('Distance (Mpc)')
axs[2, 1].legend()
axs[2, 1].grid(True)
plt.tight_layout()
plt.show()print(f'Age of the Universe: {age/3.154e16:.2f} Gyr')
print(f'Current Hubble parameter: {H[-1]:.2e} s^-1')
print(f'Current deceleration parameter: {q[-1]:.2f}')```This enhanced implementation provides a more comprehensive analysis of the universe's evolution:
1. It solves the Friedmann equations for a flat universe containing matter, radiation, and dark energy
from very early times (a = 10^-15) to the present day.
2. It calculates and plots the evolution of key cosmological parameters:
New York General Group5

- Scale factor- Hubble parameter- Deceleration parameter- Density parameters for matter, radiation, and dark energy
3. It computes important cosmological distances:- Lookback time
- Comoving distance- Luminosity distance- Angular diameter distance
4. It presents the results both as a function of cosmic time and redshift, allowing for easycomparison with observational data.
V. Physical Interpretation
The results of this simulation provide a comprehensive view of the universe's evolution:
1. Early Universe (Radiation Dominated Era): At early times, the energy density is dominated byradiation (Ω_r ≈ 1). The scale factor grows as a(t) ∝ t^(1/2), and the expansion decelerates rapidly(q ≈ 1).
2. Matter-Radiation Equality: This occurs when Ω_m = Ω_r, marking the transition from theradiation-dominated to the matter-dominated era.
3. Matter Dominated Era: For a significant portion of the universe's history, matter dominates (Ω_m≈ 1). The scale factor grows as a(t) ∝ t^(2/3), and the expansion decelerates more slowly (q ≈ 0.5).
4. Late Universe (Dark Energy Dominated Era): In recent cosmic history, dark energy begins todominate (Ω_de ≈ 1). The scale factor growth accelerates, approaching an exponential form, and thedeceleration parameter becomes negative, indicating accelerated expansion.
5. Transition to Accelerated Expansion: This occurs when the deceleration parameter q crosses zero,marking the time when the expansion of the universe transitions from decelerating to accelerating.
6. Hubble Parameter: The Hubble parameter decreases monotonically with time, reflecting theoverall expansion of the universe.
7. Cosmological Distances: The various distance measures (lookback time, comoving distance,luminosity distance, and angular diameter distance) provide crucial tools for interpreting
astronomical observations and testing cosmological models.
VI. Limitations and Further Considerations
While this model provides a robust framework for understanding cosmic evolution, several
important considerations should be noted:

New York General Group6

1. Inhomogeneities and Anisotropies: The FLRW metric assumes perfect homogeneity and isotropy.
In reality, the universe exhibits structure at various scales. A more complete treatment would
involve perturbation theory to account for these deviations.
2. Neutrino Physics: The treatment of neutrinos as purely relativistic particles is an approximation.
A more accurate model would account for neutrino mass and the transition from relativistic to nonrelativistic behavior.
3. Reionization: The model does not account for the complex physics of reionization, which affects
the propagation of light through the intergalactic medium.
4. Dark Energy Nature: The assumption of a cosmological constant (w = -1) for dark energy is thesimplest model consistent with current observations. However, dynamical dark energy models withtime-varying w(z) are also possible and actively researched.
5. Modified Gravity: The model assumes the validity of General Relativity at all scales. Various
modified gravity theories propose alterations to Einstein's equations, which could affect cosmicevolution.
6. Inflation: The very early universe likely underwent a period of rapid exponential expansion
called inflation. A complete cosmological model would need to incorporate this inflationary phase.
7. Quantum Gravity: At the earliest times (t < 10^-43 s, the Planck time), quantum gravitationaleffects become important, and the classical description breaks down.
In conclusion, this enhanced model provides a rigorous and detailed description of cosmic evolution
within the framework of ΛCDM cosmology. It serves as a powerful tool for understanding theuniverse's history and interpreting cosmological observations. However, it also highlights the needfor continued research into the fundamental nature of dark matter, dark energy, and the physics ofthe very early universe.

New York General Group7