Relations between Newtonian and relativistic cosmology

We start with the cosmic Friedmann equations, where we adopt a novel perspective rooted in a Lagrangian formulation grounded in Newtonian mechanics and the first law of thermodynamics. Our investigation operates under the assumption that the universe is populated by either a perfect fluid or a scalar field. By elucidating the intricate interplay between the Lagrangian formulation and the cosmic Friedmann equations, we uncover the fundamental principles governing the universe's dynamics within the framework of these elemental constituents. In our concluding endeavor, we embark on the task of harmonizing the classical equations - namely, the conservation, Euler, and Poisson equations - with the principles of General Relativity. This undertaking seeks to extend these foundational equations to encompass the gravitational effects delineated by General Relativity, thus providing a comprehensive framework for understanding the behavior of matter and spacetime in the cosmic context.


INTRODUCTION
In the first segment of our study, we engage with the Friedmann equations, initially conceived by Alexander Friedmann in the 1920s through the lens of General Relativity's field equations.These equations furnish a comprehensive framework for comprehending the universe's evolutionary trajectory on cosmic scales, assuming homogeneity and isotropy while considering curvature and energy distribution.
It is noteworthy that Friedmann's groundbreaking contributions [1], depicting solutions encompassing both expanding and contracting universes, remained relatively obscure for a substantial duration [2].Einstein himself initially met Friedmann's cosmological findings with skepticism, contending that they deviated from the tenets of General Relativity.However, Einstein later retracted his critique, albeit without immediately embracing the notion of an expanding cosmos.The eventual recognition of the significance of Friedmann's work ensued with the discovery of the Hubble-Lemaître law, which bridged cosmology with fundamental physics.Through the amalgamation of General Relativity and thermodynamics, a comprehensive understanding of the universe's evolution materialized.
Proceeding along this trajectory, we explore an alternative avenue to deducing the Friedmann equations (also refer to the early work by McCrea and Milne [3]) and the one by Callan, Dicke and Peebles [4], leveraging Newtonian mechanics and the first law of thermodynamics.While these equations can be derived from Newton's formulations when conceiving the universe as a homogeneous dust fluid, employing the classical Lagrangian formalism furnishes a more exhaustive portrayal of dynamic systems in terms of kinetic and potential energy.Moreover, this formalism enables the contemplation of general perfect fluids and scalar fields, from which the Friedmann equations also emerge within the realm of Newtonian mechanics, thereby enriching our comprehension of the universe's evolutionary dynamics.
Concluding our investigation, we turn our attention to the generalization of the classical trio of equations -the continuity, Euler, and Poisson equations.The aim is to ensure their congruence with the principles of General Relativity, particularly under first-order perturbations.This endeavor necessitates extending these foundational equations to encompass the gravitational effects delineated by General Relativity, thus furnishing a holistic framework for apprehending the interplay between matter and spacetime in the presence of perturbations.

FRIEDMANN EQUATIONS FROM GENERAL RELATIVITY
In this section, we will explore the Friedmann-Lemaître-Robertson-Walker (FLRW) metric (refer to [5] for an interpretation of this metric): where N (t) denotes the lapse function, k represents the spatial curvature, and a(t) signifies the scale factor.For this metric, the Ricci scalar is expressed as: where in this section, the "dot" signifies the derivative with respect to cosmic time, and H = ȧ a represents the Hubble rate.
Dealing with a homogeneous and isotropic universe filled with a perfect fluid (where pressure depends solely on energy density), the Einstein-Hilbert Lagrangian can be expressed as a function of the Ricci scalar, the space-time measure, and the matter content: where ǫ represents the energy density, and √ −g = N a 3 serves as the measure for the FLRW metric.It is noteworthy that this Lagrangian can be reformulated as: Therefore, given that the first term is a total derivative, this Lagrangian is equivalent to: Note that, the variation with respect the lapse leads to the so-called Hamiltonian constraint: where, after choosing N (t) = 1, one arrives to the first Friedmann equation: To derive the dynamical equation, we perform a variation with respect to the scale factor.After setting N = 1, the Euler-Lagrange equation where, due to the energy density's dependency solely on the scale factor, we replace ∂ ∂a with d da .Next, assuming adiabatic evolution where the total entropy remains conserved, and utilizing the first law of thermodynamics where p represents pressure, we obtain: From the first Friedmann equation (7), we arrive at the acceleration, or second Friedmann equation: A final observation is warranted: In the FLRW space-time, the energy density and pressure of a perfect fluid solely depend on the scale factor, i.e., ǫ = ǫ(a) and p = p(a).Thus, we have: where ρ represents mass density, assumed conserved, i.e., d(a 3 ρ) = 0 =⇒ ρ = M a 3 , with M being the mass contained within volume a 3 .Indeed, from the first law of Thermodynamics, dǫ da = − 3(ǫ+p) a , the solution of which is given by (13).
Consequently, the Einstein-Hilbert Lagrangian, as a function of the scale factor and lapse function, reads: with ǫ(a) given by (13).
Finally, note that the energy density can be expressed as a function of mass density as follows [6,7]: and thus, as a function of ρ and N , the Einstein-Hilbert Lagrangian becomes: 2.1.Friedmann equations for an scalar field Scalar fields have proven to be highly advantageous in the study of cosmology.They have been instrumental in replicating the phenomenon of inflation [8], which explains the rapid expansion of the universe in its early stages.Additionally, scalar fields have also been utilized to model quintessence, a type of dark energy that is believed to be responsible for the accelerated expansion of the universe [9].These applications demonstrate the versatility and effectiveness of scalar fields in advancing our understanding of the cosmos.
Hence, in this section, we explore a homogeneous scalar field, denoted as φ, minimally coupled with gravity, and derive the corresponding Friedmann equations within the framework of General Relativity.In this scenario, for the metric (1), the energy density and pressure are expressed as: and the corresponding Lagrangian is derived from (5) by substituting the energy density with minus the pressure, yielding: Consequently, upon performing the variation with respect to the lapse function, we obtain: which, upon selecting N = 1, transforms into the first Friedmann equation (7).
On the other hand, when N = 1, varying with respect to the scalar field yields the conservation equation: which equivalently represents the first law of thermodynamics.Lastly, a straightforward computation demonstrates that the second Friedmann equation arises from the variation with respect to the scale factor.

FRIEDMANN EQUATIONS FROM NEWTONIAN MECHANICS
We consider, in co-moving coordinates, a homogeneous large ball with a radius of R in Euclidean space (we can also consider R = +∞, but for finite radius, the total mass within the ball is finite M = 4π 3 ρ R3 , where ρ is the mass density).Assume that the ball expands radially.This means that if O is the center of the ball, a point P within the ball at t 0 transforms into point P t at time t, and the distance from O to P t is given by d , where a(t), with a(t 0 ) = 1, is the scale factor.Furthermore, at time t 0 , we consider the triangle P OQ, which transforms into the equivalent triangle P t OQ t at time t.Therefore, as d OPt = a(t)d OP and d OQt = a(t)d OQ , using Thales' theorem we find that for any points P and Q within the ball, d PtQt = a(t)d P Q .
The relation shows that any ball, at t 0 , centered at a point P with radius R ≪ R, expands radially at the same rate as the original large ball.Additionally, the relative velocity between P t and Q t follows the Hubble-Lemaître law: The equation of motion for the scale factor in Newtonian mechanics is derived by considering a ball centered at a given point P and initial radius R at time t 0 .At time t, the radial force at a given point Q t on the boundary of the ball is calculated to be To determine the function f , the flux entering the ball is computed as: where n is the external normal to the sphere surrounding the ball and dS is the measure of the sphere.On the other hand, from the Poisson equation ∇.F = −4πGρ, and Gauss's theorem, the flux is also given by: which leads to the expression for f as: Therefore, the acceleration experienced by a probe particle of mass m at the point Q due to the ball is determined by the second Newton's law as [10? , 11]: where we have used that Here, it is important to recall that the constant κ appearing in Einstein's field equations, where R µν denotes the Ricci tensor, g µν the metric, and T µν the energy-stress tensor, is obtained under the assumption that the background is flat.Specifically, by approximating g µν = η µν +h µν , where the background η µν is the Minkowski metric and h µν represents a small perturbation, Einstein's equations simplify to R 0 0 = κ 2 T 0 0 , where ∆g 00 , and Considering that in the Newtonian approximation, g 00 and the Newtonian potential Φ are related by g 00 = −1 − 2Φ, and employing the Poisson equation ∆Φ = 4πGρ, we obtain: Hence, it appears natural, as we have demonstrated, that the background is spatially flat and the volume of the ball is 4π 3 a 3 R 3 .However, as we shall see, the spatial curvature emerges in a natural manner.
Returning to Eq. ( 25), we eliminate the mass m to derive the second Friedmann equation for a dust field (p = 0): This equation can be derived from the Lagrangian: where M = 4π 3 a 3 R 3 ρ represents the mass inside the ball.Indeed, employing the Euler-Lagrange equation yields: where we have utilized mass conservation: We observe that the radius R of the chosen ball does not affect the dynamical equations.Thus, we set R = 1.
To derive the second Friedmann equation for a general fluid field, we employ the relativistic equation E = m, relating the energy of a particle at rest to its mass.We substitute the mass density with the energy density in the Newtonian Lagrangian (30) with R = 1, resulting in: Using the Euler-Lagrange equation and the first law of thermodynamics, we readily derive (12).The next step is to obtain the first Friedmann equation.This can be achieved by combining the second equation with the first law of Thermodynamics, expressed as follows: Firstly, we rewrite (12) as: Then, we calculate Inserting (36) into it, we obtain: whose solution is given by and by setting the constant of integration C equal to −k, we obtain the first Friedmann equation.Hence, the Newtonian Lagrangian in terms of the scale factor is given by: with ǫ(a) given by (13).
Finally, considering that the energy of a homogeneous ball of radius a is E = 4π 3 a 3 ǫ, the Newtonian Lagrangian appears as LN = E kin − V , where E kin = ȧ2 2 is the kinetic energy per unit mass and V = − GE a is the gravitational potential generated by the ball with rest mass E.

Friedmann equations for an scalar field
In a manner analogous to relativistic cosmology, when dealing with a scalar field, we replace ǫ with −p in the Newtonian Lagrangian (40).
Let φ ′ denote the derivative of the scalar field with respect to the scale factor.We have φ = ȧφ ′ , and thus, the pressure takes the form p = ȧ2 (φ ′ ) 2  2 − V (φ), resulting in the Lagrangian: where the scalar field is now a function of the scale factor.Firstly, the first law of thermodynamics, expressed as d dt (ǫa 3 ) = −3pa 2 ȧ, yields the conservation equation (20).
Then, upon variation with respect to the scale factor, we obtain the second Friedmann equation (12).Essentially, this yields: and thus, On the other hand, Then, applying the Euler-Lagrange equation, we arrive at: Utilizing the conservation equation (20), we derive the second Friedmann equation as: where we have employed the relation ǫ + 3p = 2( φ2 − V ).

Application to open systems
The Newtonian formulation extends to open systems, such as adiabatic systems where matter creation is permitted, conserving the total entropy.The first law of thermodynamics in such a scenario reads [12,13]: where N (t) represents the number of produced particles at time t.Equivalently, this equation can be expressed as Employing the Lagrangian LN , the second Friedmann equation becomes: while the first one remains (7).Moreover, combining both Friedmann equations provides insight into the evolution of the Hubble rate.Specifically, considering Ḣ = ä a − H 2 , we derive: This equation admits analytical solutions for linear Equations of State (p = wǫ, with w constant), particularly in spatially flat scenarios, across several open models.
For various functions Γ defining the particle production rate Γ = Ṅ N , one can analytically determine the universe's evolution [14,15].For instance, in the case of a constant Γ > 0, the solution derived from the first Friedmann equation and (50) yields: with the solution: This solution indicates a big bang singularity at t = t s (H(t s ) = +∞), transitioning to a de Sitter phase at late times, where H(t) ∼ = Γ/3.
In closing, it is worth noting that more generalized particle production rates, such as Γ(H) = −Γ 0 + mH + n/H, where Γ 0 , m, and n are constants, have been extensively investigated [15,16].These models predict early and late accelerated expansion phases for various parameter values.

PERTURBATIONS IN CLASSICAL MECHANICS: PERFECT FLUIDS
This section endeavors to generalize the fundamental classical equations in fluid dynamics to align, at least to the first order of perturbations, with Einstein's field equations.
Expanding classical fluid dynamics to incorporate the principles of General Relativity marks a significant step in our understanding of the universe's behavior.By extending classical equations, we aim to capture the intricate dynamics of spacetime curvature influenced by fluid distributions.
In this pursuit, it becomes imperative to reconcile the robust framework of classical fluid dynamics with the profound insights offered by General Relativity.Achieving this alignment facilitates a deeper comprehension of how matter and energy interact with the fabric of spacetime.

First law of thermodynamics
Let ϕ t : R 3 → R 3 be the flow of a perfect fluid, with ϕ 0 = Id.We define the vector velocity v(ϕ t (q), t) = dϕ t (q) dt .
Then, we arrive at the crucial result, as outlined in [17]: where ∇q • u denotes the divergence of the vector field u.
Applying this result to the first law of thermodynamics: Here, once again, ǫ denotes the energy density of the fluid and p its pressure.This yields the conservation equation: Next, we consider an expanding universe described by the flat FLRW metric ds 2 = −dt 2 + a 2 dq 2 .The element of volume is given by dV = a 3 dq 1 dq 2 dq 3 , and in differential form, the first law of thermodynamics becomes: which, up to first order (ǫ = ǫ 0 + δǫ and p = p 0 + δp), leads to: We can also introduce gravity by considering the following metric in the weak field approximation |Φ| ≪ 1: which coincides with formula (106.3) of [18] (also obtained in Einstein's book "The Meaning of Relativity" [19]).In modern language, this is referred to as the "Newtonian gauge".Then, applying the first law of thermodynamics to this metric including the expansion of the universe, i.e., to one obtains the first-order perturbed equation At this point, it is useful to use the notation u ≡ dq dη = av being η the conformal time and, ∇ ≡ 1 a ∇ q , obtaining: Remark 4.1 It is important to recall that this equation is the same as the linearized equation ∇ µ T µ0 = 0, where is the stress-energy tensor.

Euler's equation
First of all, we recall that for a dust fluid, i.e., |p| ≪ ǫ ∼ = ρ, and the element of volume dV = dq 1 dq 2 dq 3 , the classical Euler's equation can be written as: where T : R 3 −→ R 3 is the stress tensor, dS is the element of area, and n is the external unit vector to the boundary.Taking into account that for a perfect fluid one has T (n) = −pn and, from the Gauss theorem, the Euler equation in the differential form becomes: where we have used the first law of thermodynamics for a dust fluid or the continuity equation ρ + ∇ q .(ρv)= 0. Note that the equation ( 64) is incompatible with special relativity.For this reason, we have to compare it with the conservation law ∂ µ T µk = 0 in the Minkowski spacetime: Therefore, the Euler equation in an expanding universe compatible with special relativity is obtained by replacing the mass density ρ by the heat function per unit volume (ǫ + p) [20], the velocity v by a 2 v and using the element of volume dV = a 3 dq 1 dq 2 dq 3 in (66): obtaining, using once again the notation u = av and, ∇ = 1 a ∇ q , at the first order of perturbations: which is equivalent, up to linear terms, to the equation ∇ µ T µk = 0.

Poisson's equation
We start with the classical Poisson equation: where, once again, ρ denotes the mass density.The last equation is the Hamiltonian constraint [21]: where R is the intrinsic curvature (the spatial curvature), 1 + 2Φ ∂ t as the unit time vector.
In our case, we have: Therefore, the third equation is: which leads to the perturbed equation: Remark 4.2 One could understand 1 16πG I as the kinetic energy of the field and 1 16πG R as its potential energy.
Finally, note that when one introduces the new variable ψ = a(1 − 2Φ), the last equation becomes a heat equation with a heat source: which can be seen as the combination of the first Friedmann equation and the Poisson one, that is, the combination of: Note also that, in Fourier space, i.e., writing ψ = R 3 ψ k e iq.k dk 3 , its solution is: where we have introduced the notation δ k = ǫ k ǫ0 and is the kernel of the homogeneous heat equation.

Generalization of the three classical equations
The generalization of the three "classical" equations, for the volume element dV = a 3 (1 − 3Φ)dq 1 dq 2 dq 3 , which, only up to linear order, are equivalent to the Einstein's field equations, are: In differential form, these "classical" equations can be approximated by: where we have introduced the standard notation in fluid mechanics for the total time-derivative: We can also observe that the first and second equations, i.e., the first law of thermodynamics and the generalization of the Euler's equation, up to linear order, correspond to the conservation of the energy-stress tensor: ∇ µ T µν = 0.And the last one is the generalization of the Poisson equation.
In a static universe, for a dust fluid and a weak static potential, we recover the classical equations, namely, the continuity, Euler, and Poisson equations: And the linear order perturbed equations are the same as in General Relativity: To conclude this section, it is important to recognize that the last equation in (78) serves as a constraint, specifically the Hamiltonian constraint.However, by combining all three equations, we can derive the following dynamical equation for the Newtonian potential: 6 where T = 3p − ǫ is the trace of the stress-energy tensor and R 0 = 6( Ḣ + 2H 2 ) the zero order Ricci scalar.
This equation encompasses both the second Friedmann equation and the Poisson equation.Hence, the three dynamical equations in Newtonian theory, which encapsulate the Friedmann equations and the perturbed equations of General Relativity, are: A final remark is in order: By utilizing the conformal time dη = dt a and introducing the new variable q = √ 3q, the dynamical equation for the Newtonian potential takes the form: where δT = 3δp − δǫ represents the linear perturbation of the stress-energy tensor.We can easily see that this equation can be obtained from the variation of the Lagrangian with respect to the Newtonian potential: and we can recognize its similarity with the Lagrangian corresponding to a massless scalar field, φ, conformally coupled with gravity: On the other hand, performing the transformation Φ = Φ a 2 , the dynamical equation (83) becomes: which can be obtained from the variation of the Lagrangian where the firsts three terms resemble those of a harmonic oscillator with a time-dependent frequency √ 2H, and the last one represents the coupling between the potential and the stress-energy tensor.Additionally, in a static universe, the Newtonian potential satisfies the typical wave equation under the action of a mass source: where x = aq.
Finally, we recast our equations in conformal time, coordinates q, velocity u = dq dη , and potential Φ, i.e., using the metric where we continue using the total derivative D η f = ∂ η f + u.∇ q f .And introducing the variable Ψ ≡ a 2 (1 − 2Φ) the last equation can be written as Therefore, the Newtonian equations in an expanding universe can be written as: D η ((ǫ + p)u) + (ǫ + p) 4Hu + (∇ q .u)u− 1 2a 2 ∇ q Ψ + ∇ q p = 0 and in a static one, they become: (92)

CONCLUSIONS
In the current investigation have derived the relativistic Friedmann equations, originating from the foundations of Newtonian mechanics and the first law of thermodynamics.Employing a Lagrangian formulation, we have expanded our inquiry to encompass the Friedmann equations for both fluid and scalar field scenarios.Noteworthy is the profound connection between the matter Lagrangian and energy density for a fluid, as well as its association with pressure in a universe housing a scalar field, a relationship persisting in its Newtonian counterpart as evidenced in our study.Moreover, our research has showcased the adaptability of this formulation by exploring its application to open systems, thus broadening the horizons of our investigation.
This alternative methodology for deriving the Friedmann equations furnishes a robust framework for probing the universe's dynamics and offers profound insights into the intricate interplay between diverse physical properties.By amalgamating Newtonian mechanics and thermodynamics, we stand poised to unravel the processes governing the evolution of our cosmos.
Lastly, our endeavors have extended to the derivation of perturbation equations in the Newtonian gauge within the realm of General Relativity, originating from the classical trio of equations governing a perfect fluid.These encompass the continuity equation, ensuring the conservation of mass, the Euler equation, governing the conservation of momentum, and the Poisson equation, delineating the gravitational potential's relationship with the energy density distribution.Through this comprehensive approach, we aim to bridge classical mechanics with the profound insights of General Relativity, thereby advancing our understanding of the universe's dynamic evolution.