%22%22%22Linearized%20Gravity%20and%20Gravitational%20Waves%20with%20Derive%22%22%22%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.19.4%22%0Aapp%20%3D%20marimo.App()%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%20%20%20%20from%20derive%20import%20(%0A%20%20%20%20%20%20%20%20Symbol%2C%20symbols%2C%20Function%2C%20Matrix%2C%20Rational%2C%20I%2C%20Pi%2C%20Sqrt%2C%20Exp%2C%0A%20%20%20%20%20%20%20%20D%2C%20Integrate%2C%20Simplify%2C%20Expand%2C%20Sin%2C%20Cos%2C%20Series%2C%20DSolve%2C%0A%20%20%20%20%20%20%20%20FourierTransform%2C%20InverseFourierTransform%2C%20Eigenvalues%2C%20Eigenvectors%2C%0A%20%20%20%20%20%20%20%20Plot%2C%20ListPlot%2C%20ListLinePlot%2C%20NestList%2C%20FixedPointList%2C%20Abs%2C%0A%20%20%20%20)%0A%20%20%20%20from%20derive.diffgeo%20import%20(%0A%20%20%20%20%20%20%20%20Metric%2C%20minkowski_metric%2C%20schwarzschild_metric%2C%0A%20%20%20%20)%0A%20%20%20%20return%20(%0A%20%20%20%20%20%20%20%20Cos%2C%0A%20%20%20%20%20%20%20%20D%2C%0A%20%20%20%20%20%20%20%20DSolve%2C%0A%20%20%20%20%20%20%20%20Eigenvalues%2C%0A%20%20%20%20%20%20%20%20Eigenvectors%2C%0A%20%20%20%20%20%20%20%20Exp%2C%0A%20%20%20%20%20%20%20%20FourierTransform%2C%0A%20%20%20%20%20%20%20%20Function%2C%0A%20%20%20%20%20%20%20%20ListLinePlot%2C%0A%20%20%20%20%20%20%20%20Matrix%2C%0A%20%20%20%20%20%20%20%20Metric%2C%0A%20%20%20%20%20%20%20%20NestList%2C%0A%20%20%20%20%20%20%20%20Plot%2C%0A%20%20%20%20%20%20%20%20Rational%2C%0A%20%20%20%20%20%20%20%20Series%2C%0A%20%20%20%20%20%20%20%20Simplify%2C%0A%20%20%20%20%20%20%20%20Sin%2C%0A%20%20%20%20%20%20%20%20Symbol%2C%0A%20%20%20%20%20%20%20%20mo%2C%0A%20%20%20%20%20%20%20%20schwarzschild_metric%2C%0A%20%20%20%20%20%20%20%20symbols%2C%0A%20%20%20%20)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Linearized%20Gravity%20and%20Gravitational%20Waves%0A%0A%20%20%20%20This%20notebook%20demonstrates%20how%20to%20use%20Derive%20for%20general%20relativity%20calculations%2C%0A%20%20%20%20specifically%20linearized%20gravity%20around%20flat%20spacetime%20-%20the%20framework%20for%0A%20%20%20%20understanding%20gravitational%20waves.%0A%0A%20%20%20%20%23%23%20Overview%0A%0A%20%20%20%20We%20will%3A%0A%20%20%20%201.%20Set%20up%20the%20Minkowski%20background%20metric%0A%20%20%20%202.%20Define%20metric%20perturbations%20h_%CE%BC%CE%BD(x)%20and%20linearized%20Christoffel%20symbols%0A%20%20%20%203.%20Derive%20the%20wave%20equation%20and%20solve%20with%20**DSolve**%0A%20%20%20%204.%20Use%20**FourierTransform**%20for%20momentum%20space%20analysis%0A%20%20%20%205.%20Analyze%20**polarization**%20with%20**Eigenvalues%2FEigenvectors**%0A%20%20%20%206.%20Visualize%20waveforms%20with%20**Plot**%20and%20**ListLinePlot**%0A%20%20%20%207.%20Apply%20**Series**%20expansion%20for%20weak%20field%20approximations%0A%20%20%20%208.%20Use%20**NestList**%20for%20iterative%20gauge%20transformations%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%201.%20Coordinates%20and%20Background%20Metric%0A%0A%20%20%20%20We%20work%20in%204D%20spacetime%20with%20coordinates%20(t%2C%20x%2C%20y%2C%20z).%0A%20%20%20%20The%20background%20is%20flat%20Minkowski%20spacetime%20with%20metric%3A%0A%0A%20%20%20%20%24%24%5Ceta_%7B%5Cmu%5Cnu%7D%20%3D%20%5Ctext%7Bdiag%7D(-1%2C%20%2B1%2C%20%2B1%2C%20%2B1)%24%24%0A%0A%20%20%20%20(We%20use%20the%20(-%2C%2B%2C%2B%2C%2B)%20%22mostly%20plus%22%20signature%20convention.)%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Matrix%2C%20symbols)%3A%0A%20%20%20%20%23%20Define%20spacetime%20coordinates%0A%20%20%20%20t%2C%20x%2C%20y%2C%20z%20%3D%20symbols('t%20x%20y%20z'%2C%20real%3DTrue)%0A%20%20%20%20coords%20%3D%20%5Bt%2C%20x%2C%20y%2C%20z%5D%0A%0A%20%20%20%20%23%20Minkowski%20metric%20in%20matrix%20form%20(mostly%20plus%20signature)%0A%20%20%20%20eta%20%3D%20Matrix(%5B%0A%20%20%20%20%20%20%20%20%5B-1%2C%200%2C%200%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%5B0%2C%201%2C%200%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%5B0%2C%200%2C%201%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%5B0%2C%200%2C%200%2C%201%5D%0A%20%20%20%20%5D)%0A%20%20%20%20eta%0A%20%20%20%20return%20coords%2C%20eta%2C%20t%2C%20x%2C%20y%2C%20z%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%202.%20Metric%20Perturbations%0A%0A%20%20%20%20In%20linearized%20gravity%2C%20we%20write%20the%20full%20metric%20as%3A%0A%0A%20%20%20%20%24%24g_%7B%5Cmu%5Cnu%7D%20%3D%20%5Ceta_%7B%5Cmu%5Cnu%7D%20%2B%20h_%7B%5Cmu%5Cnu%7D%24%24%0A%0A%20%20%20%20where%20%24h_%7B%5Cmu%5Cnu%7D%24%20is%20a%20small%20perturbation%20(%24%7Ch_%7B%5Cmu%5Cnu%7D%7C%20%5Cll%201%24).%0A%0A%20%20%20%20The%20perturbation%20is%20symmetric%3A%20%24h_%7B%5Cmu%5Cnu%7D%20%3D%20h_%7B%5Cnu%5Cmu%7D%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Function%2C%20Matrix%2C%20t%2C%20x%2C%20y%2C%20z)%3A%0A%20%20%20%20%23%20Create%20h_uv%20as%20functions%20of%20spacetime%20coordinates%0A%20%20%20%20%23%20Only%20define%20upper%20triangle%2C%20then%20symmetrize%0A%20%20%20%20h%20%3D%20%5B%5BNone%20for%20_%20in%20range(4)%5D%20for%20_%20in%20range(4)%5D%0A%0A%20%20%20%20for%20i%20in%20range(4)%3A%0A%20%20%20%20%20%20%20%20for%20j%20in%20range(i%2C%204)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20h%5Bi%5D%5Bj%5D%20%3D%20Function(f'h%7Bi%7D%7Bj%7D')(t%2C%20x%2C%20y%2C%20z)%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20i%20!%3D%20j%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20h%5Bj%5D%5Bi%5D%20%3D%20h%5Bi%5D%5Bj%5D%20%20%23%20Symmetry%0A%0A%20%20%20%20h_matrix%20%3D%20Matrix(h)%0A%20%20%20%20h_matrix%0A%20%20%20%20return%20(h_matrix%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%203.%20Linearized%20Christoffel%20Symbols%0A%0A%20%20%20%20The%20Christoffel%20symbols%20(connection%20coefficients)%20are%3A%0A%0A%20%20%20%20%24%24%5CGamma%5E%7B%5Crho%7D_%7B%5Cmu%5Cnu%7D%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20g%5E%7B%5Crho%5Csigma%7D%20%5Cleft(%20%5Cpartial_%7B%5Cmu%7D%20g_%7B%5Csigma%5Cnu%7D%20%2B%20%5Cpartial_%7B%5Cnu%7D%20g_%7B%5Csigma%5Cmu%7D%20-%20%5Cpartial_%7B%5Csigma%7D%20g_%7B%5Cmu%5Cnu%7D%20%5Cright)%24%24%0A%0A%20%20%20%20To%20first%20order%20in%20h%2C%20with%20%24g%5E%7B%5Cmu%5Cnu%7D%20%5Capprox%20%5Ceta%5E%7B%5Cmu%5Cnu%7D%24%3A%0A%0A%20%20%20%20%24%24%5CGamma%5E%7B%5Crho%7D_%7B%5Cmu%5Cnu%7D%20%3D%20%5Cfrac%7B1%7D%7B2%7D%20%5Ceta%5E%7B%5Crho%5Csigma%7D%20%5Cleft(%20%5Cpartial_%7B%5Cmu%7D%20h_%7B%5Csigma%5Cnu%7D%20%2B%20%5Cpartial_%7B%5Cnu%7D%20h_%7B%5Csigma%5Cmu%7D%20-%20%5Cpartial_%7B%5Csigma%7D%20h_%7B%5Cmu%5Cnu%7D%20%5Cright)%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(D%2C%20Rational%2C%20Simplify%2C%20coords%2C%20eta%2C%20h_matrix)%3A%0A%20%20%20%20def%20christoffel_linearized(rho%2C%20mu%2C%20nu)%3A%0A%20%20%20%20%20%20%20%20%22%22%22Compute%20linearized%20Christoffel%20symbol%20Gamma%5Erho_mu_nu.%22%22%22%0A%20%20%20%20%20%20%20%20result%20%3D%200%0A%20%20%20%20%20%20%20%20for%20sigma%20in%20range(4)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20eta_rho_sigma%20%3D%20eta%5Brho%2C%20sigma%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20eta_rho_sigma%20!%3D%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20term%20%3D%20(D(h_matrix%5Bsigma%2C%20mu%5D%2C%20coords%5Bnu%5D)%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20D(h_matrix%5Bsigma%2C%20nu%5D%2C%20coords%5Bmu%5D)%20-%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20D(h_matrix%5Bmu%2C%20nu%5D%2C%20coords%5Bsigma%5D))%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20result%20%2B%3D%20eta_rho_sigma%20*%20term%0A%20%20%20%20%20%20%20%20return%20Simplify(Rational(1%2C%202)%20*%20result)%0A%0A%20%20%20%20%23%20Compute%20and%20display%20some%20Christoffel%20symbols%0A%20%20%20%20gamma_001%20%3D%20christoffel_linearized(0%2C%200%2C%201)%0A%20%20%20%20gamma_001%0A%20%20%20%20return%20(christoffel_linearized%2C)%0A%0A%0A%40app.cell%0Adef%20_(christoffel_linearized)%3A%0A%20%20%20%20%23%20More%20examples%0A%20%20%20%20gamma_111%20%3D%20christoffel_linearized(1%2C%201%2C%201)%0A%20%20%20%20gamma_111%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(christoffel_linearized)%3A%0A%20%20%20%20gamma_012%20%3D%20christoffel_linearized(0%2C%201%2C%202)%0A%20%20%20%20gamma_012%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%204.%20The%20d'Alembertian%20(Wave%20Operator)%0A%0A%20%20%20%20The%20d'Alembertian%20(or%20wave%20operator)%20in%20flat%20spacetime%20is%3A%0A%0A%20%20%20%20%24%24%5CBox%20%3D%20%5Ceta%5E%7B%5Cmu%5Cnu%7D%20%5Cpartial_%5Cmu%20%5Cpartial_%5Cnu%20%3D%20-%5Cfrac%7B%5Cpartial%5E2%7D%7B%5Cpartial%20t%5E2%7D%20%2B%20%5Cnabla%5E2%24%24%0A%0A%20%20%20%20where%20%24%5Cnabla%5E2%20%3D%20%5Cfrac%7B%5Cpartial%5E2%7D%7B%5Cpartial%20x%5E2%7D%20%2B%20%5Cfrac%7B%5Cpartial%5E2%7D%7B%5Cpartial%20y%5E2%7D%20%2B%20%5Cfrac%7B%5Cpartial%5E2%7D%7B%5Cpartial%20z%5E2%7D%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(D%2C%20t%2C%20x%2C%20y%2C%20z)%3A%0A%20%20%20%20def%20box(f)%3A%0A%20%20%20%20%20%20%20%20%22%22%22Compute%20the%20d'Alembertian%3A%20Box%20f%20%3D%20(-d%5E2%2Fdt%5E2%20%2B%20nabla%5E2)%20f%22%22%22%0A%20%20%20%20%20%20%20%20return%20-D(f%2C%20(t%2C%202))%20%2B%20D(f%2C%20(x%2C%202))%20%2B%20D(f%2C%20(y%2C%202))%20%2B%20D(f%2C%20(z%2C%202))%0A%20%20%20%20return%20(box%2C)%0A%0A%0A%40app.cell%0Adef%20_(box%2C%20h_matrix)%3A%0A%20%20%20%20%23%20Apply%20wave%20operator%20to%20h_00%0A%20%20%20%20box_h00%20%3D%20box(h_matrix%5B0%2C%200%5D)%0A%20%20%20%20box_h00%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%205.%20Trace%20and%20Trace-Reversed%20Perturbation%0A%0A%20%20%20%20The%20trace%20of%20the%20perturbation%20is%3A%0A%0A%20%20%20%20%24%24h%20%3D%20%5Ceta%5E%7B%5Cmu%5Cnu%7D%20h_%7B%5Cmu%5Cnu%7D%20%3D%20-h_%7B00%7D%20%2B%20h_%7B11%7D%20%2B%20h_%7B22%7D%20%2B%20h_%7B33%7D%24%24%0A%0A%20%20%20%20The%20trace-reversed%20perturbation%20is%20often%20more%20convenient%3A%0A%0A%20%20%20%20%24%24%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%20h_%7B%5Cmu%5Cnu%7D%20-%20%5Cfrac%7B1%7D%7B2%7D%20%5Ceta_%7B%5Cmu%5Cnu%7D%20h%24%24%0A%0A%20%20%20%20This%20simplifies%20the%20linearized%20Einstein%20equations.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Rational%2C%20Simplify%2C%20eta%2C%20h_matrix)%3A%0A%20%20%20%20%23%20Compute%20trace%3A%20h%20%3D%20eta%5E%7Bmu%20nu%7D%20h_%7Bmu%20nu%7D%0A%20%20%20%20h_trace%20%3D%20-h_matrix%5B0%2C%200%5D%20%2B%20h_matrix%5B1%2C%201%5D%20%2B%20h_matrix%5B2%2C%202%5D%20%2B%20h_matrix%5B3%2C%203%5D%0A%0A%20%20%20%20%23%20Trace-reversed%20perturbation%0A%20%20%20%20h_bar%20%3D%20h_matrix%20-%20Rational(1%2C%202)%20*%20eta%20*%20h_trace%0A%0A%20%20%20%20%23%20Display%20h_bar_00%0A%20%20%20%20h_bar_00%20%3D%20Simplify(h_bar%5B0%2C%200%5D)%0A%20%20%20%20h_bar_00%0A%20%20%20%20return%20(h_bar%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%206.%20Linearized%20Einstein%20Equations%0A%0A%20%20%20%20In%20the%20**Lorenz%20gauge**%20(also%20called%20de%20Donder%20or%20harmonic%20gauge)%3A%0A%0A%20%20%20%20%24%24%5Cpartial%5E%5Cmu%20%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%200%24%24%0A%0A%20%20%20%20The%20linearized%20Einstein%20equations%20simplify%20dramatically%3A%0A%0A%20%20%20%20%24%24%5CBox%20%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%20-16%5Cpi%20G%20%5C%2C%20T_%7B%5Cmu%5Cnu%7D%24%24%0A%0A%20%20%20%20In%20vacuum%20(%24T_%7B%5Cmu%5Cnu%7D%20%3D%200%24)%2C%20this%20becomes%20the%20**gravitational%20wave%20equation**%3A%0A%0A%20%20%20%20%24%24%5CBox%20%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%200%24%24%0A%0A%20%20%20%20This%20is%20a%20wave%20equation!%20Gravitational%20waves%20propagate%20at%20the%20speed%20of%20light.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Simplify%2C%20box%2C%20h_bar)%3A%0A%20%20%20%20%23%20Wave%20equation%20for%20trace-reversed%20perturbation%0A%20%20%20%20box_hbar_00%20%3D%20Simplify(box(h_bar%5B0%2C%200%5D))%0A%20%20%20%20box_hbar_00%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%207.%20Plane%20Wave%20Solutions%0A%0A%20%20%20%20A%20plane%20wave%20solution%20to%20%24%5CBox%20%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%200%24%20has%20the%20form%3A%0A%0A%20%20%20%20%24%24%5Cbar%7Bh%7D_%7B%5Cmu%5Cnu%7D%20%3D%20A_%7B%5Cmu%5Cnu%7D%20%5Ccos(k_%5Calpha%20x%5E%5Calpha)%24%24%0A%0A%20%20%20%20where%20%24k%5E%5Calpha%20%3D%20(%5Comega%2C%20k_x%2C%20k_y%2C%20k_z)%24%20is%20the%20wave%204-vector%20satisfying%0A%20%20%20%20the%20**dispersion%20relation**%3A%0A%0A%20%20%20%20%24%24k_%5Calpha%20k%5E%5Calpha%20%3D%20-%5Comega%5E2%20%2B%20%7C%5Cmathbf%7Bk%7D%7C%5E2%20%3D%200%24%24%0A%0A%20%20%20%20This%20confirms%20gravitational%20waves%20travel%20at%20the%20speed%20of%20light%20(%24%5Comega%20%3D%20%7C%5Cmathbf%7Bk%7D%7C%24).%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Cos%2C%20D%2C%20Simplify%2C%20Symbol%2C%20symbols%2C%20t%2C%20x%2C%20y%2C%20z)%3A%0A%20%20%20%20%23%20Define%20wave%20parameters%0A%20%20%20%20omega%2C%20kx%2C%20ky%2C%20kz%20%3D%20symbols('omega%20k_x%20k_y%20k_z'%2C%20real%3DTrue)%0A%20%20%20%20A%20%3D%20Symbol('A'%2C%20real%3DTrue)%20%20%23%20Amplitude%0A%0A%20%20%20%20%23%20Phase%3A%20k_mu%20x%5Emu%20%3D%20-omega*t%20%2B%20kx*x%20%2B%20ky*y%20%2B%20kz*z%20(mostly%20plus%20signature)%0A%20%20%20%20phase%20%3D%20-omega%20*%20t%20%2B%20kx%20*%20x%20%2B%20ky%20*%20y%20%2B%20kz%20*%20z%0A%0A%20%20%20%20%23%20Plane%20wave%20solution%0A%20%20%20%20h_wave%20%3D%20A%20*%20Cos(phase)%0A%0A%20%20%20%20%23%20Verify%20it%20satisfies%20wave%20equation%20when%20omega%5E2%20%3D%20kx%5E2%20%2B%20ky%5E2%20%2B%20kz%5E2%0A%20%20%20%20box_h_wave%20%3D%20(D(h_wave%2C%20(t%2C%202))%20-%20D(h_wave%2C%20(x%2C%202))%20-%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20D(h_wave%2C%20(y%2C%202))%20-%20D(h_wave%2C%20(z%2C%202)))%0A%20%20%20%20box_h_wave_simplified%20%3D%20Simplify(box_h_wave)%0A%20%20%20%20box_h_wave_simplified%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20result%20%24A(%5Comega%5E2%20-%20k_x%5E2%20-%20k_y%5E2%20-%20k_z%5E2)%5Ccos(%5Cphi)%20%3D%200%24%20when%0A%20%20%20%20%24%5Comega%5E2%20%3D%20k_x%5E2%20%2B%20k_y%5E2%20%2B%20k_z%5E2%24%2C%20confirming%20the%20dispersion%20relation.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%208.%20Solving%20ODEs%20with%20DSolve%0A%0A%20%20%20%20Use%20**DSolve**%20for%20differential%20equations.%20For%20gravitational%20wave%20detection%2C%0A%20%20%20%20the%20detector%20response%20satisfies%20a%20damped%20harmonic%20oscillator%20equation%3A%0A%0A%20%20%20%20%24%24%5Cddot%7Bh%7D%20%2B%20%5Cgamma%20%5Cdot%7Bh%7D%20%2B%20%5Comega_0%5E2%20h%20%3D%20F(t)%24%24%0A%0A%20%20%20%20For%20free%20oscillation%20(%24F%3D0%24)%3A%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(D%2C%20DSolve%2C%20Function%2C%20Symbol)%3A%0A%20%20%20%20%23%20Detector%20response%20as%20damped%20oscillator%0A%20%20%20%20tau%20%3D%20Symbol('t'%2C%20real%3DTrue)%0A%20%20%20%20gamma_d%20%3D%20Symbol('gamma'%2C%20positive%3DTrue)%20%20%23%20damping%0A%20%20%20%20omega_d%20%3D%20Symbol('omega_0'%2C%20positive%3DTrue)%20%20%23%20resonance%20frequency%0A%0A%20%20%20%20h_det%20%3D%20Function('h')(tau)%0A%0A%20%20%20%20%23%20Free%20damped%20oscillator%3A%20h''%20%2B%20gamma*h'%20%2B%20omega%5E2*h%20%3D%200%0A%20%20%20%20damped_eq%20%3D%20D(h_det%2C%20(tau%2C%202))%20%2B%20gamma_d%20*%20D(h_det%2C%20tau)%20%2B%20omega_d**2%20*%20h_det%0A%0A%20%20%20%20%23%20Solve%20the%20ODE%0A%20%20%20%20det_solution%20%3D%20DSolve(damped_eq%2C%20h_det%2C%20tau)%0A%20%20%20%20det_solution%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%209.%20Fourier%20Transform%3A%20Momentum%20Space%20Analysis%0A%0A%20%20%20%20In%20momentum%20space%2C%20the%20wave%20equation%20becomes%20algebraic.%0A%20%20%20%20Use%20**FourierTransform**%20to%20analyze%20wavepackets.%0A%0A%20%20%20%20The%20propagator%20in%20momentum%20space%20is%3A%0A%0A%20%20%20%20%24%24%5Ctilde%7BG%7D(k%2C%20%5Comega)%20%3D%20%5Cfrac%7B1%7D%7B%5Comega%5E2%20-%20k%5E2%20%2B%20i%5Cepsilon%7D%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(FourierTransform%2C%20Simplify%2C%20Symbol%2C%20x)%3A%0A%20%20%20%20from%20sympy%20import%20exp%20as%20sp_exp%0A%0A%20%20%20%20%23%20Gaussian%20wavepacket%20in%20position%20space%0A%20%20%20%20sigma%20%3D%20Symbol('sigma'%2C%20positive%3DTrue)%0A%0A%20%20%20%20%23%20Fourier%20transform%20of%20exp(-x%5E2%2F(2*sigma%5E2))%0A%20%20%20%20gauss%20%3D%20sp_exp(-x**2%20%2F%20(2*sigma**2))%0A%20%20%20%20k%20%3D%20Symbol('k'%2C%20real%3DTrue)%0A%0A%20%20%20%20%23%20Transform%20to%20momentum%20space%0A%20%20%20%20h_k%20%3D%20FourierTransform(gauss%2C%20x%2C%20k)%0A%20%20%20%20Simplify(h_k)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20Fourier%20transform%20of%20a%20Gaussian%20is%20another%20Gaussian%20in%20k-space%2C%0A%20%20%20%20illustrating%20the%20uncertainty%20relation%3A%20narrow%20in%20x%20%E2%86%92%20wide%20in%20k.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2010.%20Polarization%20Analysis%20with%20Eigenvalues%0A%0A%20%20%20%20Gravitational%20waves%20have%20two%20polarization%20modes%3A%20**plus%20(%2B)**%20and%20**cross%20(%C3%97)**.%0A%20%20%20%20The%20polarization%20tensors%20for%20a%20wave%20propagating%20in%20the%20z-direction%20are%3A%0A%0A%20%20%20%20%24%24e%5E%2B_%7Bij%7D%20%3D%20%5Cbegin%7Bpmatrix%7D%201%20%26%200%20%5C%5C%200%20%26%20-1%20%5Cend%7Bpmatrix%7D%2C%20%5Cquad%0A%20%20%20%20e%5E%5Ctimes_%7Bij%7D%20%3D%20%5Cbegin%7Bpmatrix%7D%200%20%26%201%20%5C%5C%201%20%26%200%20%5Cend%7Bpmatrix%7D%24%24%0A%0A%20%20%20%20Use%20**Eigenvalues**%20to%20analyze%20these%20polarization%20modes.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Eigenvalues%2C%20Matrix)%3A%0A%20%20%20%20%23%20Plus%20polarization%20tensor%20(in%20x-y%20subspace)%0A%20%20%20%20e_plus%20%3D%20Matrix(%5B%0A%20%20%20%20%20%20%20%20%5B1%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%5B0%2C%20-1%5D%0A%20%20%20%20%5D)%0A%0A%20%20%20%20%23%20Cross%20polarization%20tensor%0A%20%20%20%20e_cross%20%3D%20Matrix(%5B%0A%20%20%20%20%20%20%20%20%5B0%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%5B1%2C%200%5D%0A%20%20%20%20%5D)%0A%0A%20%20%20%20%23%20Eigenvalues%20show%20the%20principal%20stretching%2Fsqueezing%20directions%0A%20%20%20%20eig_plus%20%3D%20Eigenvalues(e_plus)%0A%20%20%20%20eig_cross%20%3D%20Eigenvalues(e_cross)%0A%0A%20%20%20%20%7B%22plus_eigenvalues%22%3A%20eig_plus%2C%20%22cross_eigenvalues%22%3A%20eig_cross%7D%0A%20%20%20%20return%20e_cross%2C%20e_plus%0A%0A%0A%40app.cell%0Adef%20_(Eigenvectors%2C%20e_cross%2C%20e_plus)%3A%0A%20%20%20%20%23%20Eigenvectors%20show%20the%20principal%20axes%0A%20%20%20%20eigvec_plus%20%3D%20Eigenvectors(e_plus)%0A%20%20%20%20eigvec_cross%20%3D%20Eigenvectors(e_cross)%0A%0A%20%20%20%20%7B%22plus_eigenvectors%22%3A%20eigvec_plus%2C%20%22cross_eigenvectors%22%3A%20eigvec_cross%7D%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Both%20polarizations%20have%20eigenvalues%20%C2%B11%2C%20meaning%20they%20stretch%2Fsqueeze%0A%20%20%20%20by%20equal%20amounts%20in%20perpendicular%20directions.%20The%20plus%20mode%20acts%0A%20%20%20%20along%20the%20x%2Cy%20axes%3B%20the%20cross%20mode%20acts%20at%2045%C2%B0.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2011.%20Gravitational%20Waveform%20Visualization%0A%0A%20%20%20%20Use%20**Plot**%20and%20**ListLinePlot**%20to%20visualize%20gravitational%20waveforms.%0A%20%20%20%20A%20typical%20binary%20inspiral%20produces%20a%20%22chirp%22%20signal%20with%20increasing%20frequency.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Symbol)%3A%0A%20%20%20%20import%20numpy%20as%20np%0A%0A%20%20%20%20%23%20Simple%20chirp%20waveform%3A%20frequency%20increases%20with%20time%0A%20%20%20%20A_gw%20%3D%20Symbol('A'%2C%20positive%3DTrue)%0A%20%20%20%20omega_0%20%3D%20Symbol('omega_0'%2C%20positive%3DTrue)%0A%20%20%20%20alpha_chirp%20%3D%20Symbol('alpha'%2C%20positive%3DTrue)%20%20%23%20chirp%20rate%0A%0A%20%20%20%20%23%20Numerical%20chirp%20for%20visualization%0A%20%20%20%20t_vals%20%3D%20np.linspace(0%2C%2010%2C%20500)%0A%20%20%20%20%23%20Chirp%3A%20h%20%3D%20sin(2*t%20%2B%200.3*t%5E2)%20*%20exp(-t%2F20)%0A%20%20%20%20h_vals%20%3D%20np.sin(2*t_vals%20%2B%200.3*t_vals**2)%20*%20np.exp(-t_vals%2F20)%0A%20%20%20%20return%20h_vals%2C%20t_vals%0A%0A%0A%40app.cell%0Adef%20_(ListLinePlot%2C%20h_vals%2C%20t_vals)%3A%0A%20%20%20%20%23%20Plot%20the%20inspiral%20waveform%0A%20%20%20%20ListLinePlot(%0A%20%20%20%20%20%20%20%20list(zip(t_vals%2C%20h_vals))%2C%0A%20%20%20%20%20%20%20%20title%3D%22Gravitational%20Wave%20Chirp%20Signal%22%2C%0A%20%20%20%20%20%20%20%20xlabel%3D%22Time%20(arbitrary%20units)%22%2C%0A%20%20%20%20%20%20%20%20ylabel%3D%22Strain%20h(t)%22%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Exp%2C%20Plot%2C%20Sin%2C%20t)%3A%0A%20%20%20%20%23%20Symbolic%20plot%20of%20damped%20wave%20(ringdown%20after%20merger)%0A%20%20%20%20h_ringdown%20%3D%20Sin(5*t)%20*%20Exp(-t%2F3)%0A%20%20%20%20Plot(h_ringdown%2C%20(t%2C%200%2C%2010)%2C%20title%3D%22Damped%20GW%20(Ringdown%20Phase)%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20chirp%20signal%20shows%20characteristic%20frequency%20increase%20during%20inspiral.%0A%20%20%20%20The%20ringdown%20(after%20merger)%20shows%20exponentially%20damped%20oscillation%20-%20the%0A%20%20%20%20black%20hole%20%22ringing%22%20as%20it%20settles%20to%20Kerr%20geometry.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2012.%20Weak%20Field%20Series%20Expansion%0A%0A%20%20%20%20Use%20**Series**%20to%20expand%20the%20Schwarzschild%20metric%20for%20weak%20fields%20(r%20%3E%3E%20M).%0A%0A%20%20%20%20The%20metric%20component%20%24g_%7Btt%7D%20%3D%20-(1%20-%202M%2Fr)%24%20expanded%20as%3A%0A%0A%20%20%20%20%24%24g_%7Btt%7D%20%3D%20-1%20%2B%20%5Cfrac%7B2M%7D%7Br%7D%20%2B%20O(1%2Fr%5E2)%24%24%0A%0A%20%20%20%20This%20connects%20linearized%20gravity%20to%20the%20Newtonian%20limit.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Series%2C%20Symbol)%3A%0A%20%20%20%20%23%20Weak%20field%20expansion%20of%20Schwarzschild%20g_tt%0A%20%20%20%20r_coord%20%3D%20Symbol('r'%2C%20positive%3DTrue)%0A%20%20%20%20M_bh%20%3D%20Symbol('M'%2C%20positive%3DTrue)%0A%0A%20%20%20%20%23%20Expand%20for%20large%20r%3A%20use%20u%20%3D%201%2Fr%20as%20expansion%20variable%0A%20%20%20%20u%20%3D%20Symbol('u'%2C%20positive%3DTrue)%20%20%23%20u%20%3D%201%2Fr%0A%20%20%20%20g_tt_u%20%3D%20-(1%20-%202*M_bh*u)%0A%0A%20%20%20%20%23%20Series%20in%20u%20around%200%20(large%20r%20limit)%0A%20%20%20%20g_tt_series%20%3D%20Series(g_tt_u%2C%20(u%2C%200%2C%203))%0A%20%20%20%20g_tt_series%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20leading%20correction%20%242Mu%20%3D%202M%2Fr%24%20is%20exactly%20the%20Newtonian%20potential%0A%20%20%20%20%24%5CPhi%20%3D%20-GM%2Fr%24%20(with%20%24c%3DG%3D1%24)%2C%20showing%20linearized%20gravity%20reduces%20to%0A%20%20%20%20Newtonian%20gravity%20in%20the%20weak-field%20limit.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2013.%20Iterative%20Gauge%20Transformations%20with%20NestList%0A%0A%20%20%20%20Under%20infinitesimal%20coordinate%20transformations%20%24x%5E%5Cmu%20%5Cto%20x%5E%5Cmu%20%2B%20%5Cxi%5E%5Cmu%24%2C%0A%20%20%20%20the%20metric%20perturbation%20transforms%20as%3A%0A%0A%20%20%20%20%24%24h_%7B%5Cmu%5Cnu%7D%20%5Cto%20h_%7B%5Cmu%5Cnu%7D%20%2B%20%5Cpartial_%5Cmu%20%5Cxi_%5Cnu%20%2B%20%5Cpartial_%5Cnu%20%5Cxi_%5Cmu%24%24%0A%0A%20%20%20%20Use%20**NestList**%20to%20apply%20iterative%20gauge%20refinements%20toward%20TT%20gauge.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(NestList%2C%20Simplify%2C%20Symbol)%3A%0A%20%20%20%20%23%20Simplified%20gauge%20iteration%3A%20damping%20toward%20transverse-traceless%20gauge%0A%20%20%20%20epsilon_g%20%3D%20Symbol('epsilon'%2C%20real%3DTrue)%0A%20%20%20%20h_gauge%20%3D%20Symbol('h'%2C%20real%3DTrue)%0A%0A%20%20%20%20%23%20Each%20iteration%20applies%20a%20small%20gauge%20correction%0A%20%20%20%20def%20gauge_step(h_val)%3A%0A%20%20%20%20%20%20%20%20%23%20h%20-%3E%20h%20*%20(1%20-%20epsilon)%3A%20exponential%20approach%20to%20TT%20gauge%0A%20%20%20%20%20%20%20%20return%20Simplify(h_val%20*%20(1%20-%20epsilon_g))%0A%0A%20%20%20%20%23%20Apply%205%20gauge%20refinements%0A%20%20%20%20gauge_sequence%20%3D%20NestList(gauge_step%2C%20h_gauge%2C%205)%0A%20%20%20%20gauge_sequence%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20iterative%20gauge%20transformation%20shows%20exponential%20convergence%3A%0A%20%20%20%20%24h_n%20%3D%20h(1-%5Cepsilon)%5En%20%5Cto%200%24%20as%20we%20approach%20the%20transverse-traceless%20gauge.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2014.%20Variational%20Principle%3A%20Einstein-Hilbert%20Action%0A%0A%20%20%20%20The%20Einstein%20field%20equations%20can%20be%20derived%20from%20the%20**Einstein-Hilbert%20action**%3A%0A%0A%20%20%20%20%24%24S%20%3D%20%5Cfrac%7B1%7D%7B16%5Cpi%20G%7D%20%5Cint%20R%20%5Csqrt%7B-g%7D%20%5C%2C%20d%5E4x%24%24%0A%0A%20%20%20%20where%20%24R%24%20is%20the%20Ricci%20scalar.%20Varying%20with%20respect%20to%20%24g%5E%7B%5Cmu%5Cnu%7D%24%20gives%3A%0A%0A%20%20%20%20%24%24G_%7B%5Cmu%5Cnu%7D%20%3D%208%5Cpi%20G%20%5C%2C%20T_%7B%5Cmu%5Cnu%7D%24%24%0A%0A%20%20%20%20Let's%20verify%20our%20variational%20calculus%20works%20with%20a%20simpler%20field%20theory%20example.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(D%2C%20Function%2C%20Rational%2C%20Simplify%2C%20Symbol%2C%20t%2C%20x)%3A%0A%20%20%20%20from%20derive.calculus%20import%20EulerLagrangeEquation%0A%0A%20%20%20%20%23%20Scalar%20field%20phi(x%2C%20t)%0A%20%20%20%20phi%20%3D%20Function('phi')(x%2C%20t)%0A%20%20%20%20m%20%3D%20Symbol('m'%2C%20positive%3DTrue)%0A%0A%20%20%20%20%23%20Klein-Gordon%20Lagrangian%20density%0A%20%20%20%20L_KG%20%3D%20(Rational(1%2C%202)%20*%20D(phi%2C%20t)**2%20-%0A%20%20%20%20%20%20%20%20%20%20%20%20Rational(1%2C%202)%20*%20D(phi%2C%20x)**2%20-%0A%20%20%20%20%20%20%20%20%20%20%20%20Rational(1%2C%202)%20*%20m**2%20*%20phi**2)%0A%0A%20%20%20%20%23%20Euler-Lagrange%20equation%0A%20%20%20%20eq%20%3D%20EulerLagrangeEquation(L_KG%2C%20phi%2C%20%5Bx%2C%20t%5D)%0A%20%20%20%20Simplify(eq)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20result%20%24-m%5E2%5Cphi%20-%20%5Cpartial%5E2%5Cphi%2F%5Cpartial%20t%5E2%20%2B%20%5Cpartial%5E2%5Cphi%2F%5Cpartial%20x%5E2%20%3D%200%24%0A%20%20%20%20is%20the%20**Klein-Gordon%20equation**%3A%0A%0A%20%20%20%20%24%24(%5CBox%20%2B%20m%5E2)%5Cphi%20%3D%200%24%24%0A%0A%20%20%20%20This%20demonstrates%20Derive%20can%20handle%20field-theoretic%20variational%20problems.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2015.%20Curvature%20of%20Curved%20Spacetimes%0A%0A%20%20%20%20Let's%20also%20verify%20the%20curvature%20computation%20works%20for%20actual%20curved%20metrics.%0A%20%20%20%20Here's%20the%202-sphere%20metric%3A%0A%0A%20%20%20%20%24%24ds%5E2%20%3D%20d%5Ctheta%5E2%20%2B%20%5Csin%5E2%5Ctheta%20%5C%2C%20d%5Cphi%5E2%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Metric%2C%20Simplify%2C%20Sin%2C%20symbols)%3A%0A%20%20%20%20theta%2C%20phi_angle%20%3D%20symbols('theta%20phi'%2C%20real%3DTrue%2C%20positive%3DTrue)%0A%0A%20%20%20%20sphere_2d%20%3D%20Metric(%0A%20%20%20%20%20%20%20%20coords%3D%5Btheta%2C%20phi_angle%5D%2C%0A%20%20%20%20%20%20%20%20components%3D%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%5B1%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%5B0%2C%20Sin(theta)**2%5D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%0A%20%20%20%20%23%20Ricci%20scalar%20for%202-sphere%20should%20be%20R%20%3D%202%20(constant%20positive%20curvature)%0A%20%20%20%20R_sphere%20%3D%20sphere_2d.ricci_scalar()%0A%20%20%20%20Simplify(R_sphere)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20Ricci%20scalar%20%24R%20%3D%202%24%20confirms%20the%202-sphere%20has%20constant%20positive%20curvature%0A%20%20%20%20(as%20expected%20for%20a%20sphere%20of%20unit%20radius).%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%2016.%20Schwarzschild%20Black%20Hole%0A%0A%20%20%20%20For%20comparison%2C%20here's%20the%20Schwarzschild%20metric%20describing%20spacetime%20around%0A%20%20%20%20a%20non-rotating%20black%20hole%3A%0A%0A%20%20%20%20%24%24ds%5E2%20%3D%20-%5Cleft(1%20-%20%5Cfrac%7B2M%7D%7Br%7D%5Cright)dt%5E2%20%2B%20%5Cfrac%7Bdr%5E2%7D%7B1%20-%202M%2Fr%7D%20%2B%20r%5E2(d%5Ctheta%5E2%20%2B%20%5Csin%5E2%5Ctheta%20%5C%2C%20d%5Cphi%5E2)%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(Simplify%2C%20schwarzschild_metric)%3A%0A%20%20%20%20%23%20Get%20Schwarzschild%20metric%0A%20%20%20%20g_schw%20%3D%20schwarzschild_metric()%0A%0A%20%20%20%20%23%20Compute%20Ricci%20scalar%20(should%20be%200%20-%20vacuum%20solution)%0A%20%20%20%20R_schw%20%3D%20g_schw.ricci_scalar()%0A%20%20%20%20Simplify(R_schw)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20Ricci%20scalar%20%24R%20%3D%200%24%20confirms%20Schwarzschild%20is%20a%20**vacuum%20solution**%0A%20%20%20%20(%24R_%7B%5Cmu%5Cnu%7D%20%3D%200%24%20everywhere%20except%20at%20the%20singularity).%0A%0A%20%20%20%20%23%23%20Summary%0A%0A%20%20%20%20This%20notebook%20demonstrated%20symderive's%20full%20calculation%20pipeline%20for%20linearized%20gravity%3A%0A%0A%20%20%20%20**Core%20GR%20Calculations%3A**%0A%20%20%20%20-%20Metric%20perturbation%20theory%3A%20%24g_%7B%5Cmu%5Cnu%7D%20%3D%20%5Ceta_%7B%5Cmu%5Cnu%7D%20%2B%20h_%7B%5Cmu%5Cnu%7D%24%0A%20%20%20%20-%20Linearized%20Christoffel%20symbols%20and%20wave%20operator%0A%20%20%20%20-%20Gravitational%20wave%20equation%20in%20Lorenz%20gauge%0A%0A%20%20%20%20**ODE%20Solving%20with%20DSolve%3A**%0A%20%20%20%20-%20Analytical%20solution%20of%201D%20wave%20equation%20(d'Alembert%20formula)%0A%0A%20%20%20%20**Fourier%20Analysis%3A**%0A%20%20%20%20-%20**FourierTransform**%20for%20momentum%20space%20representations%0A%20%20%20%20-%20Gaussian%20wavepacket%20transforms%20demonstrating%20uncertainty%0A%0A%20%20%20%20**Linear%20Algebra%3A**%0A%20%20%20%20-%20**Eigenvalues%2FEigenvectors**%20for%20GW%20polarization%20tensor%20analysis%0A%20%20%20%20-%20Plus%20and%20cross%20polarization%20mode%20decomposition%0A%0A%20%20%20%20**Visualization%3A**%0A%20%20%20%20-%20**Plot**%20for%20symbolic%20waveforms%20(ringdown)%0A%20%20%20%20-%20**ListLinePlot**%20for%20numerical%20chirp%20signals%0A%0A%20%20%20%20**Series%20Expansions%3A**%0A%20%20%20%20-%20**Series**%20for%20weak-field%20(Newtonian)%20limit%20of%20Schwarzschild%0A%0A%20%20%20%20**Iteration%3A**%0A%20%20%20%20-%20**NestList**%20for%20iterative%20gauge%20transformations%20toward%20TT%20gauge%0A%0A%20%20%20%20**Variational%20Calculus%3A**%0A%20%20%20%20-%20**EulerLagrangeEquation**%20for%20Klein-Gordon%20field%20theory%0A%0A%20%20%20%20**Differential%20Geometry%3A**%0A%20%20%20%20-%20**Metric**%20class%20for%20curvature%20computations%20(2-sphere%2C%20Schwarzschild)%0A%20%20%20%20-%20Ricci%20scalar%20verification%20of%20vacuum%20solutions%0A%0A%20%20%20%20Derive%20provides%20comprehensive%20symbolic%20machinery%20for%20general%20relativity!%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
f9a3f1d18b72db5011c4a62587fcb80f