ABSTRACT (original article): We compute tidal signatures in the gravitational waves (GWs) from neutron star binary inspirals in scalar-tensor gravity, where the dominant adiabatic even-parity tidal interactions involve three types of Love numbers that depend on the matter equation of state and parameters of the gravitational theory. We calculate the modes of the GW amplitudes and the phase evolution in the time and frequency domain, working up to first order in the post-Newtonian and small finite-size approximations. We also perform several case studies to quantify the dipolar and quadrupolar tidal effects and their parameter dependencies specialized to Gaussian couplings. We show that various tidal contributions enter with different signs and scalings with frequency, which generally leads to smaller net tidal GW imprints than for the same binary system in General Relativity. CITATION (original article): Gastón Creci, Iris van Gemeren, Tanja Hinderer, Jan Steinhoff (2024), Tidal effects in gravitational waves from neutron stars in scalar-tensor theories of gravity, arXiv:2412.06620. https://doi.org/10.48550/arXiv.2412.06620​
GitHub: https://github.com/GastCre/Mathematica.codes
This notebook accompanies the research presented in “Tidal properties of neutron stars in scalar-tensor theories of gravity” (INSPIRE:2690202). It demonstrates how Wolfram Mathematica was employed to perform both symbolic and numerical computations to analyze tidal interactions in neutron stars within scalar-tensor theories of gravity. The notebook is organized into two main sections: an analytical part deriving the relevant equations, and a numerical part implementing simulations to explore the physical implications of the model.
This code uses the xAct package: http://www.xact.es/

Analytical calculation

In the analytical section, we utilize Mathematica’s package xAct (https://josmar493.dreamhosters.com/) to derive the tensorial equations governing tidal properties of neutron stars in scalar-tensor gravity frameworks. This involves calculating tidal Love numbers and other related quantities that characterize the deformability of neutron stars under external gravitational fields. Mathematica’s robust tensor algebra and symbolic manipulation tools were instrumental in managing the complex calculations inherent in this theoretical framework.

Loading xAct


Definitions and set-up


4-velocity, EM tensor and perturbations

4-velocity to 1st order in pert
In[]:=
DefTensor[u[-a],H];​​DefScalarFunction/@{A,ρ,p,p0,ρ0,δp,Deriv,V,W,U,ur,ut,ue,uo};​​uNorm=u[a_]u[-a_]+1;​​uback={Exp[-ν[r[]]/2],0,0,0};​​upert={ut[r[]],ur[r[]],0,0};​​upertEven=ue[r[]]{0,0,D[YLM,θ[]],D[YLM,ϕ[]]/Sin[θ[]]^2};​​upertOdd=uo[r[]]{0,0,-D[YLM,ϕ[]]/Sin[θ[]],Sin[θ[]]D[YLM,θ[]]/Sin[θ[]]^2};​​ComponentValue[ComponentArray[u[{a,RW}]],uback+ϵupert+ϵupertEven+ϵoddupertOdd]​​ChangeComponents[u[-{a,RW}],u[{a,RW}]];
Out[]=

u
0

-
ν[r]
2

+ϵut[r],
u
1
ϵur[r],
u
2

-mϕ

ϵ(moddCsc[θ]PL[θ]uo[r]+ue[r]
′
PL
[θ]),
u
3

-mϕ

ϵCsc[θ](-mCsc[θ]PL[θ]ue[r]+odduo[r]
′
PL
[θ])
Computed
u
a

g
a1
a
u
a1
in 0.037561 Seconds
Fluid EM tensor
In[]:=
DefTensor[T[-a,-b],H,Symmetric[{-a,-b}]];​​T[a_,b_]:=
4
A[φ[]]
(p+ρ)u[a]u[b]+
4
A[φ[]]
pg[a,b];
Fluid perturbations
In[]:=
pertpρ={pp0[r[]]+ϵδp[r[]]YLM,ρρ0[r[]]+ϵDeriv[r[]]YLMδp[r[]]}
Out[]=
pp0[r]+
-mϕ

ϵPL[θ]δp[r],ρ
-mϕ

ϵDeriv[r]PL[θ]δp[r]+ρ0[r]
In[]:=
T[a,b]=T[a,b]/.pertpρ//ToValues//linearize/.rr[]
Out[]=
4
A[φ[]]
g
a
b
p0[r]+
4
A[φ[]]
p0[r]
u
a
u
b
+
-mϕ

ϵ
4
A[φ[]]
PL[θ](
g
a
b
+
u
a
u
b
+Deriv[r]
u
a
u
b
)δp[r]+
4
A[φ[]]
u
a
u
b
ρ0[r]
In[]:=
TRW={ToCanonical[ContractMetric[FixedPoint[ToBasis[RW],(T[a,b])]],UseMetricOnVBundle->None]/.pertpρ/.{PD->PDRW,ChristoffelCD->ChristoffelCDPDRW}//TraceBasisDummy//ComponentArray//ToValues//linearize//ToValues//linearize//ToValues//linearize//ToValues//linearize}//Expand
Out[]=

Computing the scalar and metric EoM from Lagrangian

Scalar field and its perturbations
DefTensor[φ[],H]​​DefScalarFunction@{φ0,φp,φpk,α}
In[]:=
KR=
1
(16πGN)
;​​Kφ=
1
8π
;
EH Lagrangian and scalar Lagrangian
LEH=KRSqrt[-Detg[]]RicciScalarCD[];​​Lφ=-KφSqrt[-Detg[]](CD[a]@φ[]CD[-a]@φ[]);
In[]:=
DefConstantSymbol[χ]
Total Lagrangian
Ltotal=LEH+Lφ;
Perturbing the Lagrangian
In[]:=
DefMetricPerturbation[g,dg,δ]
In[]:=
DefTensorPerturbation[δφ[LI["order"]],φ[],{H,δ}]
In[]:=
Ltotalpert=Perturbation[Ltotal]//ExpandPerturbation//ContractMetric//ToCanonical;
EoM of the metric
eomGR=
1
2KR
2(*-*)
-Detg[]
VarD[dg[LI[1],a,b],CD][Ltotalpert]/.delta[-LI[1],LI[1]]1//ContractMetric//Simplification//Expand
Out[]=
-
R[▽]
a
b
+
1
2
g
a
b
R[▽]-GN
g
a
b
(
▽
a1
φ)(
a1
▽
φ)+2GN(
▽
a
φ)(
▽
b
φ)
EoM of the scalar
eomphi=
1
2Kφ
1
-

~
g
ToCanonical[VarD[δφ[LI[1]],CD][Ltotalpert]/.delta[-LI[1],LI[1]]1]-
1
2Kφ
α[φ[]]T[c,-c]/.pertpρ//ToValues//linearize/.rr[]
Out[]=
-16π
4
A[φ]
p0[r]α[φ]-4π
4
A[φ]
p0[r]
u
c
u
c
α[φ]-4
-mϕ

πϵ
4
A[φ]
PL[θ](4+
u
c
u
c
+Deriv[r]
u
c
u
c
)α[φ]δp[r]-4π
4
A[φ]
u
c
u
c
α[φ]ρ0[r]+
▽
a
a
▽
φ
Deomposition of the scalar field perturbations
pertphi=ϵYLMφp[r[]];
Total scalar field : The radial part is real, so the same for both Φ and Φc
φ[]:=(φ0[r[]]+pertphi)

EoM of the scalar field


EoM of the fluid


Einstein Field Equations

EoM of the metric in RW gauge
In[]:=
EFE=eomGR+8πGNT[-a,-b]/.pertpρ//linearize
Out[]=
1
2
16GNπ
4
A[φ0[r]]
g
a
b
p0[r]-2
R[▽]
a
b
+
g
a
b
R[▽]+16GNπ
4
A[φ0[r]]
p0[r]
u
a
u
b
+16GNπ
4
A[φ0[r]]
u
a
u
b
ρ0[r]+4GN
e
1
a
e
1
b
2
′
φ0
[r]
-2GN
e
1
a1
g
a
b
g
a1
1
2
′
φ0
[r]
+
-mϕ

ϵ8GNπ
4
A[φ0[r]]
g
a
b
PL[θ]δp[r]+8GNπ
4
A[φ0[r]]
PL[θ]
u
a
u
b
δp[r]+8GNπ
4
A[φ0[r]]
Deriv[r]PL[θ]
u
a
u
b
δp[r]+32GNπ
3
A[φ0[r]]
g
a
b
p0[r]PL[θ]φp[r]
′
A
[φ0[r]]+32GNπ
3
A[φ0[r]]
p0[r]PL[θ]
u
a
u
b
φp[r]
′
A
[φ0[r]]+32GNπ
3
A[φ0[r]]
PL[θ]
u
a
u
b
ρ0[r]φp[r]
′
A
[φ0[r]]-2GNm
e
3
a
e
1
b
PL[θ]φp[r]
′
φ0
[r]-2GNm
e
1
a
e
3
b
PL[θ]φp[r]
′
φ0
[r]+GNm
e
3
a1
g
a
b
g
a1
1
PL[θ]φp[r]
′
φ0
[r]+GNm
e
1
a1
g
a
b
g
a1
3
PL[θ]φp[r]
′
φ0
[r]+2GN
e
2
a
e
1
b
φp[r]
′
PL
[θ]
′
φ0
[r]+2GN
e
1
a
e
2
b
φp[r]
′
PL
[θ]
′
φ0
[r]-GN
e
2
a1
g
a
b
g
a1
1
φp[r]
′
PL
[θ]
′
φ0
[r]-GN
e
1
a1
g
a
b
g
a1
2
φp[r]
′
PL
[θ]
′
φ0
[r]+4GN
e
1
a
e
1
b
PL[θ]
′
φ0
[r]
′
φp
[r]-2GN
e
1
a1
g
a
b
g
a1
1
PL[θ]
′
φ0
[r]
′
φp
[r]
In[]:=
EFERW=ToCanonical[ContractMetric[FixedPoint[ToBasis[RW],(EFE)]],UseMetricOnVBundle->None]/.{PD->PDRW,ChristoffelCD->ChristoffelCDPDRW}//TraceBasisDummy//ComponentArray//ToValues//linearize//ToValues//linearize//ToValues//linearize//ToValues//linearize;
EoM of background metric
In[]:=
EFEback=EFERW/.ϵ0;
In[]:=
EFEback*
γ[r]-ν[r]

//Expand
Out[]=

1
2
r
-
γ[r]

2
r
+8
γ[r]

GNπ
4
A[φ0[r]]
ρ0[r]-
′
γ
[r]
r
+GN
2
′
φ0
[r]
,0,0,0,0,8
2γ[r]-ν[r]

GNπ
4
A[φ0[r]]
p0[r]-
γ[r]-ν[r]

2
r
+
2γ[r]-ν[r]

2
r
-
γ[r]-ν[r]

′
ν
[r]
r
+
γ[r]-ν[r]

GN
2
′
φ0
[r]
,0,0,0,0,8
γ[r]-ν[r]

GNπ
4
A[φ0[r]]
p0[r]
2
r
+
1
2
-ν[r]

r
′
γ
[r]-
1
2
-ν[r]

r
′
ν
[r]+
1
4
-ν[r]

2
r
′
γ
[r]
′
ν
[r]-
1
4
-ν[r]

2
r
2
′
ν
[r]
-
-ν[r]

GN
2
r
2
′
φ0
[r]
-
1
2
-ν[r]

2
r
′′
ν
[r],0,0,0,0,8
γ[r]-ν[r]

GNπ
4
A[φ0[r]]
p0[r]
2
r
2
Sin[θ]
+
1
2
-ν[r]

r
2
Sin[θ]
′
γ
[r]-
1
2
-ν[r]

r
2
Sin[θ]
′
ν
[r]+
1
4
-ν[r]

2
r
2
Sin[θ]
′
γ
[r]
′
ν
[r]-
1
4
-ν[r]

2
r
2
Sin[θ]
2
′
ν
[r]
-
-ν[r]

GN
2
r
2
Sin[θ]
2
′
φ0
[r]
-
1
2
-ν[r]

2
r
2
Sin[θ]
′′
ν
[r]
Background metric EoM
In[]:=
γbackeq=EFEback[[1,1]]*
γ[r]-ν[r]

//Expand;​​νbackeq=EFEback[[2,2]]*
γ[r]-ν[r]

//Expand;
In[]:=
dνdγbackgr=Solve[{γbackeq0,νbackeq0},{γ'[r[]],ν'[r[]]}][[1]]//Simplify
Out[]=

′
γ
[r]
1
r
-
γ[r]

r
+8
γ[r]

GNπ
4
A[φ0[r]]
rρ0[r]+GNr
2
′
φ0
[r]
,
′
ν
[r]
-1+
γ[r]

+8
γ[r]

GNπ
4
A[φ0[r]]
p0[r]
2
r
+GN
2
r
2
′
φ0
[r]
r

In[]:=
gammaminusnu=γ'[r[]]-
′
ν
[r]/.dνdγbackgr//FullSimplify
Out[]=
2-2
γ[r]

(1+4GNπ
4
A[φ0[r]]
2
r
(p0[r]-ρ0[r]))
r
In[]:=
νtoγprime={ν'[r[]]γ'[r[]]-gammaminusnu}
Out[]=

′
ν
[r]-
2-2
γ[r]

(1+4GNπ
4
A[φ0[r]]
2
r
(p0[r]-ρ0[r]))
r
+
′
γ
[r]
In[]:=
AddtoList[Unevaluated[{γbackeq,νbackeq,gammaminusnu,νtoγprime}]];

TOV Eqs


Solving for the metric perturbations


Numerical calculation

The numerical section implements the integration of the field and structure equations for neutron stars in scalar-tensor theories, allowing the computation of tidal deformabilities across a range of equations of state and scalar-tensor coupling strengths. Mathematica’s numerical solvers are used to solve the modified Tolman–Oppenheimer–Volkoff equations alongside the scalar field dynamics, producing profiles for mass-radius relations, scalar charges, and tidal Love numbers. These results provide critical insights into how deviations from general relativity manifest in astrophysical observables, which are relevant for interpreting gravitational-wave data.
The resolution of the calculations has been lowered significantly, from 122 neutron star configurations to 25, in order to execute in a reasonable amount of time. This code uses parallelization when useful through the function “ParallelTable”. If there are any issues with it, one can simply change the function to “Table”.

Background solution: TOV eqs with scalar field background

Loading data from analytical calculations

This routine opens the saved file and assigns each equation their corresponding name

Plots

Pressure vs density
Einstein frame M - R curves
Jordan frame M - R curves
Charge - Mass curves
Einstein frame q - M curves
Jordan frame q - M curves

Error estimation (takes long, don’t run if not needed)

Overlap between numerics and analytics

Absolute relative difference

References

[1] G. Creci, T. Hinderer and J. Steinhoff, Tidal properties of neutron stars in scalar- tensor theories of gravity, Phys. Rev. D 108, 124073 (2023), arXiv:2308.11323 [gr- qc].
[2] J. S. Read, B. D. Lackey, B. J. Owen, and J. L. Friedman, Constraints on a phenomenologically parameterized neutron-star equation of state, Phys. Rev. D 79, 124032 (2009), arXiv:0812.2163 [astro-ph].
[3] P. Pani and E. Berti, Slowly rotating neutron stars in scalar-tensor theories, Phys. Rev. D 90, 024025 (2014), arXiv:1405.4547 [gr-qc].
[4] S. M. Brown, Tidal Deformability of Neutron Stars in Scalar-Tensor Theories of Gravity for Gravitational Wave Analysis, (2022), arXiv:2210.14025 [gr-qc].

CITE THIS NOTEBOOK

Tidal effects in gravitational waves from neutron stars in scalar-tensor theories of gravity​
by Gastón Creci, Iris van Gemeren, Tanja Hinderer & Jan Steinhoff
Wolfram Community, STAFF PICKS, May 12, 2025
​https://community.wolfram.com/groups/-/m/t/3459453