# Schwarzschild geodesics

General relativity :
$G_{\mu \nu }+\Lambda g_{\mu \nu }={\kappa }T_{\mu \nu }$ :
Introduction
HistoryTimelineTests
Mathematical formulation :
Fundamental concepts
Equivalence principle
Special relativity
World line
Pseudo-Riemannian manifold :
Phenomena
Kepler problem
Gravitational lensing
Gravitational redshift
Gravitational time dilation
Gravitational waves
Frame-dragging
Geodetic effect
Event horizon
Singularity
Black hole
Spacetime
Spacetime diagrams
Minkowski spacetime
Einstein–Rosen bridge :
EquationsFormalisms
Equations
Linearized gravity
Einstein field equations
Friedmann
Geodesics
Mathisson–Papapetrou–Dixon
Hamilton–Jacobi–Einstein
Formalisms
ADM
BSSN
Post-Newtonian
Advanced theory
Kaluza–Klein theory
Quantum gravity :
Solutions
Schwarzschild (interior)
Reissner–Nordström
Einstein–Rosen waves
Wormhole
Gödel
Kerr
Kerr–Newman
Kerr–Newman–de Sitter
Kasner
Lemaître–Tolman
Taub–NUT
Milne
Robertson–Walker
Oppenheimer–Snyder
pp-wave
van Stockum dust
Weyl−Lewis−Papapetrou
Hartle–Thorne :
Scientists
Einstein
Lorentz
Hilbert
Poincaré
Schwarzschild
de Sitter
Reissner
Nordström
Weyl
Eddington
Friedmann
Milne
Zwicky
Lemaître
Oppenheimer
Gödel
Wheeler
Robertson
Bardeen
Walker
Kerr
Chandrasekhar
Ehlers
Penrose
Hawking
Raychaudhuri
Taylor
Hulse
van Stockum
Taub
Newman
Yau
Thorne
others :
Physics portal
 Category :
vte :
In general relativity, Schwarzschild geodesics describe the motion of test particles in the gravitational field of a central fixed mass M, {\textstyle M, } that is, motion in the Schwarzschild metric. Schwarzschild geodesics have been pivotal in the validation of Einstein's theory of general relativity. For example, they provide accurate predictions of the anomalous precession of the planets in the Solar System and of the deflection of light by gravity.
Schwarzschild geodesics pertain only to the motion of particles of masses so small they contribute little to the gravitational field. However, they are highly accurate in many astrophysical scenarios provided that m{\textstyle m} is many-fold smaller than the central mass M{\textstyle M}, e.g., for planets orbiting their star. Schwarzschild geodesics are also a good approximation to the relative motion of two bodies of arbitrary mass, provided that the Schwarzschild mass M{\textstyle M} is set equal to the sum of the two individual masses m$_1${\textstyle m_{1}} and m$_2${\textstyle m_{2}}. This is important in predicting the motion of binary stars in general relativity.

## Historical context

The Schwarzschild metric is named in honour of its discoverer Karl Schwarzschild, who found the solution in 1915, only about a month after the publication of Einstein's theory of general relativity. It was the first exact solution of the Einstein field equations other than the trivial flat space solution.
In 1931, Yusuke Hagihara published a paper showing that the trajectory of a test particle in the Schwarzschild metric can be expressed in terms of elliptic functions.
Samuil Kaplan in 1949 has shown that there is a minimum radius for the circular orbit to be stable in Schwarzschild metric.

## Schwarzschild metric

An exact solution to the Einstein field equations is the Schwarzschild metric, which corresponds to the external gravitational field of an uncharged, non-rotating, spherically symmetric body of mass M{\textstyle M}. The Schwarzschild solution can be written as
    $ds^{2}=c^{2}{d\tau }^{2}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}dt^{2}-{\frac {dr^{2}}{1-{\frac {r_{\text{s}}}{r}}}}-r^{2}(d\theta ^{2}+\sin ^{2}\theta \,d\varphi ^{2})$
where
    $\tau$, in the case of a test particle of small positive mass, is the proper time (time measured by a clock moving with the particle) in seconds,
    $c$ is the speed of light in meters per second,
    $t$ is, for $r>r_{\text{s}}$, the time coordinate (time measured by a stationary clock at infinity) in seconds,
    $r$ is, for $r>r_{\text{s}}$, the radial coordinate (circumference of a circle centered at the star divided by $2\pi$) in meters,
    $\theta$ is the colatitude (angle from North) in radians,
    $\varphi$ is the longitude in radians, and
    $r_{\text{s}}$ is the Schwarzschild radius of the massive body (in meters), which is related to its mass M{\textstyle M} by
       $r_{\text{s}}={\frac {2GM}{c^{2}}},$
    where G{\textstyle G} is the gravitational constant. The classical Newtonian theory of gravity is recovered in the limit as the ratio r$_s$/r {\textstyle {\frac {r_{\text{s}}}{r}}} goes to zero. In that limit, the metric returns to that defined by special relativity.
In practice, this ratio is almost always extremely small. For example, the Schwarzschild radius r$_s${\textstyle r_{\text{s}}} of the Earth is roughly 9 mm (3⁄8 inch); at the surface of the Earth, the corrections to Newtonian gravity are only one part in a billion. The Schwarzschild radius of the Sun is much larger, roughly 2953 meters, but at its surface, the ratio r$_s$/r {\textstyle {\frac {r_{\text{s}}}{r}}} is roughly 4 parts in a million. A white dwarf star is much denser, but even here the ratio at its surface is roughly 250 parts in a million. The ratio only becomes large close to ultra-dense objects such as neutron stars (where the ratio is roughly 50%) and black holes.

## Orbits of test particles

We may simplify the problem by using symmetry to eliminate one variable from consideration. Since the Schwarzschild metric is symmetrical about θ=π/2 {\textstyle \theta ={\frac {\pi }{2}}}, any geodesic that begins moving in that plane will remain in that plane indefinitely (the plane is totally geodesic). Therefore, we orient the coordinate system so that the orbit of the particle lies in that plane, and fix the θ{\textstyle \theta } coordinate to be π/2 {\textstyle {\frac {\pi }{2}}} so that the metric (of this plane) simplifies to
    $c^{2}d\tau ^{2}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}dt^{2}-{\frac {dr^{2}}{1-{\frac {r_{\text{s}}}{r}}}}-r^{2}d\varphi ^{2}.$
Two constants of motion (values that do not change over proper time $\tau$) can be identified (cf. the derivation given below). One is the total energy E{\textstyle E}:
    $\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}={\frac {E}{mc^{2}}}.$
and the other is the specific angular momentum:
    $h={\frac {L}{\mu }}=r^{2}{\frac {d\varphi }{d\tau }},$
where L{\textstyle L} is the total angular momentum of the two bodies, and μ{\textstyle \mu } is the reduced mass. When M≫m{\textstyle M\gg m}, the reduced mass is approximately equal to m{\textstyle m}. Sometimes it is assumed that m=μ{\textstyle m=\mu }. In the case of the planet Mercury this simplification introduces an error more than twice as large as the relativistic effect. When discussing geodesics, m{\textstyle m} can be considered fictitious, and what matters are the constants E/m {\textstyle {\frac {E}{m}}} and h{\textstyle h}. In order to cover all possible geodesics, we need to consider cases in which E/m {\textstyle {\frac {E}{m}}} is infinite (giving trajectories of photons) or imaginary (for tachyonic geodesics). For the photonic case, we also need to specify a number corresponding to the ratio of the two constants, namely mh/E {\textstyle {\frac {mh}{E}}}, which may be zero or a non-zero real number.
Substituting these constants into the definition of the Schwarzschild metric
    $c^{2}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}\left({\frac {dt}{d\tau }}\right)^{2}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\frac {dr}{d\tau }}\right)^{2}-r^{2}\left({\frac {d\varphi }{d\tau }}\right)^{2},$
yields an equation of motion for the radius as a function of the proper time τ{\textstyle \tau }:
    $\left({\frac {dr}{d\tau }}\right)^{2}={\frac {E^{2}}{m^{2}c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {h^{2}}{r^{2}}}\right).$
The formal solution to this is
    $\tau =\int {\frac {dr}{\pm {\sqrt {{\frac {E^{2}}{m^{2}c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {h^{2}}{r^{2}}}\right)}}}}.$
Note that the square root will be imaginary for tachyonic geodesics.
Using the relation higher up between dt/dτ {\textstyle {\frac {dt}{d\tau }}} and E{\textstyle E}, we can also write
    $t=\int {\frac {dr}{\pm c\left(1-{\frac {r_{\text{s}}}{r}}\right){\sqrt {1-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {h^{2}}{r^{2}}}\right){\frac {m^{2}c^{2}}{E^{2}}}}}}}.$
Since asymptotically the integrand is inversely proportional to r−r$_s${\textstyle r-r_{\text{s}}}, this shows that in the r, θ, φ, t{\textstyle r, \theta , \varphi , t} frame of reference if r{\textstyle r} approaches r$_s${\textstyle r_{\text{s}}} it does so exponentially without ever reaching it. However, as a function of τ{\textstyle \tau }, r{\textstyle r} does reach r$_s${\textstyle r_{\text{s}}}.
The above solutions are valid while the integrand is finite, but a total solution may involve two or an infinity of pieces, each described by the integral but with alternating signs for the square root.
When E=mc$^2${\textstyle E=mc^{2}} and h=0{\textstyle h=0}, we can solve for t{\textstyle t} and τ{\textstyle \tau } explicitly:
    ${\begin{aligned}t&={\text{constant}}\pm {\frac {r_{\text{s}}}{c}}\left({\frac {2}{3}}\left({\frac {r}{r_{\text{s}}}}\right)^{\frac {3}{2}}+2{\sqrt {\frac {r}{r_{\text{s}}}}}+\ln {\frac {\left|{\sqrt {\frac {r}{r_{\text{s}}}}}-1\right|}{{\sqrt {\frac {r}{r_{\text{s}}}}}+1}}\right)\\\tau &={\text{constant}}\pm {\frac {2}{3}}{\frac {r_{\text{s}}}{c}}\left({\frac {r}{r_{\text{s}}}}\right)^{\frac {3}{2}}\end{aligned}}$
and for photonic geodesics (m=0{\textstyle m=0}) with zero angular momentum
    ${\begin{aligned}t&={\text{constant}}\pm {\frac {1}{c}}\left(r+r_{\text{s}}\ln \left|{\frac {r}{r_{\text{s}}}}-1\right|\right)\\\tau &={\text{constant}}.\end{aligned}}$
(Although the proper time is trivial in the photonic case, one can define an affine parameter λ{\textstyle \lambda }, and then the solution to the geodesic equation is r=c$_1$λ+c$_2${\textstyle r=c_{1}\lambda +c_{2}}.)
Another solvable case is that in which E=0{\textstyle E=0} and t{\textstyle t} and φ{\textstyle \varphi } are constant. In the volume where r<r$_s${\textstyle r<r_{\text{s}}} this gives for the proper time
    $\tau ={\text{constant}}\pm {\frac {r_{\text{s}}}{c}}\left(\arcsin {\sqrt {\frac {r}{r_{\text{s}}}}}-{\sqrt {{\frac {r}{r_{\text{s}}}}\left(1-{\frac {r}{r_{\text{s}}}}\right)}}\right).$
This is close to solutions with E$^2$/m$^2$ {\textstyle {\frac {E^{2}}{m^{2}}}} small and positive. Outside of r$_s${\textstyle r_{\text{s}}} the E=0{\textstyle E=0} solution is tachyonic and the "proper time" is space-like:
    $\tau ={\text{constant}}\pm i{\frac {r_{\text{s}}}{c}}\left(\ln \left({\sqrt {\frac {r}{r_{\text{s}}}}}+{\sqrt {{\frac {r}{r_{\text{s}}}}-1}}\right)+{\sqrt {{\frac {r}{r_{\text{s}}}}\left({\frac {r}{r_{\text{s}}}}-1\right)}}\right).$
This is close to other tachyonic solutions with E$^2$/m$^2$ {\textstyle {\frac {E^{2}}{m^{2}}}} small and negative. The constant t{\textstyle t} tachyonic geodesic outside r$_s${\textstyle r_{\text{s}}} is not continued by a constant t{\textstyle t} geodesic inside r$_s${\textstyle r_{\text{s}}}, but rather continues into a "parallel exterior region" (see Kruskal–Szekeres coordinates). Other tachyonic solutions can enter a black hole and re-exit into the parallel exterior region. The constant t{\textstyle t} solution inside the event horizon (r$_s${\textstyle r_{\text{s}}}) is continued by a constant t{\textstyle t} solution in a white hole.
When the angular momentum is not zero we can replace the dependence on proper time by a dependence on the angle φ{\textstyle \varphi } using the definition of h{\textstyle h}
    $\left({\frac {dr}{d\varphi }}\right)^{2}=\left({\frac {dr}{d\tau }}\right)^{2}\left({\frac {d\tau }{d\varphi }}\right)^{2}=\left({\frac {dr}{d\tau }}\right)^{2}\left({\frac {r^{2}}{h}}\right)^{2},$
which yields the equation for the orbit
    $\left({\frac {dr}{d\varphi }}\right)^{2}={\frac {r^{4}}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {r^{4}}{a^{2}}}+r^{2}\right)$
where, for brevity, two length-scales, a{\textstyle a} and b{\textstyle b}, have been defined by
    ${\begin{aligned}a&={\frac {h}{c}},\\b&={\frac {cL}{E}}={\frac {hmc}{E}}.\end{aligned}}$
Note that in the tachyonic case, a{\textstyle a} will be imaginary and b{\textstyle b} real or infinite.
The same equation can also be derived using a Lagrangian approach or the Hamilton–Jacobi equation (see below). The solution of the orbit equation is
    $\varphi =\int {\frac {dr}{\pm r^{2}{\sqrt {{\frac {1}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {1}{a^{2}}}+{\frac {1}{r^{2}}}\right)}}}}.$
This can be expressed in terms of the Weierstrass elliptic function ℘{\textstyle \wp }.

## Local and delayed velocities

Unlike in classical mechanics, in Schwarzschild coordinates dr/dτ {\textstyle {\frac {{\rm {d}}r}{{\rm {d}}\tau }}} and r dφ/dτ {\textstyle r\ {\frac {{\rm {d}}\varphi }{{\rm {d}}\tau }}} are not the radial v$_∥${\textstyle v_{\parallel }} and transverse v$_⊥${\textstyle v_{\perp }} components of the local velocity v{\textstyle v} (relative to a stationary observer), instead they give the components for the celerity which are related to v{\textstyle v} by
    ${\frac {{\rm {d}}r}{{\rm {d}}\tau }}=v_{\parallel }{\sqrt {1-{\frac {r_{\text{s}}}{r}}}}\ \gamma$
for the radial and
    ${\frac {{\rm {d}}\varphi }{{\rm {d}}\tau }}={\frac {v_{\perp }}{r}}\ \gamma$
for the transverse component of motion, with v$^2$=v$_∥$$^2$+v$_⊥$$^2${\textstyle v^{2}=v_{\parallel }^{2}+v_{\perp }^{2}}. The coordinate bookkeeper far away from the scene observes the shapiro-delayed velocity v$^^${\textstyle {\hat {v}}}, which is given by the relation
    ${\hat {v}}_{\perp }=v_{\perp }{\sqrt {1-{\frac {r_{\text{s}}}{r}}}}$ and ${\hat {v}}_{\parallel }=v_{\parallel }\left(1-{\frac {r_{\text{s}}}{r}}\right)$.
The time dilation factor between the bookkeeper and the moving test-particle can also be put into the form
    ${\frac {{\rm {d}}\tau }{{\rm {d}}t}}={\frac {\sqrt {1-{\frac {r_{\text{s}}}{r}}}}{\gamma }}$
where the numerator is the gravitational, and the denominator is the kinematic component of the time dilation. For a particle falling in from infinity the left factor equals the right factor, since the in-falling velocity v{\textstyle v} matches the escape velocity c√(r$_s$/r){\textstyle c{\sqrt {\frac {r_{\text{s}}}{r}}}} in this case.
The two constants angular momentum L{\textstyle L} and total energy E{\textstyle E} of a test-particle with mass m{\textstyle m} are in terms of v{\textstyle v}
    $L=m\ v_{\perp }\ r\ \gamma$
and
    $E=mc^{2}\ {\sqrt {1-{\frac {r_{\text{s}}}{r}}}}\ \gamma$
where
    $E=E_{\rm {rest}}+E_{\rm {kin}}+E_{\rm {pot}}$
and
    $E_{\rm {rest}}=mc^{2}\ ,\ \ E_{\rm {kin}}=(\gamma -1)mc^{2}\ ,\ \ E_{\rm {pot}}=\left({\sqrt {1-{\frac {r_{\text{s}}}{r}}}}-1\right)\ \gamma \ mc^{2}$
For massive testparticles γ{\textstyle \gamma } is the Lorentz factor γ=1/√(1−v$^2$/c$^2$){\textstyle \gamma =1/{\sqrt {1-v^{2}/c^{2}}}} and τ{\textstyle \tau } is the proper time, while for massless particles like photons γ{\textstyle \gamma } is set to 1{\textstyle 1} and τ{\textstyle \tau } takes the role of an affine parameter. If the particle is massless E$_{rest}${\textstyle E_{\rm {rest}}} is replaced with E$_{kin}${\textstyle E_{\rm {kin}}} and mc$^2${\textstyle mc^{2}} with hf{\textstyle hf}, where h{\textstyle h} is the Planck constant and f{\textstyle f} the locally observed frequency.

## Exact solution using elliptic functions

The fundamental equation of the orbit is easier to solve if it is expressed in terms of the inverse radius u=1/r {\textstyle u={\frac {1}{r}}}
    $\left({\frac {du}{d\varphi }}\right)^{2}={\frac {1}{b^{2}}}-\left(1-ur_{\text{s}}\right)\left({\frac {1}{a^{2}}}+u^{2}\right)$
The right-hand side of this equation is a cubic polynomial, which has three roots, denoted here as u$_1${\textstyle u_{1}}, u$_2${\textstyle u_{2}}, and u$_3${\textstyle u_{3}}
    $\left({\frac {du}{d\varphi }}\right)^{2}=r_{\text{s}}\left(u-u_{1}\right)\left(u-u_{2}\right)\left(u-u_{3}\right)$
The sum of the three roots equals the coefficient of the u$^2${\textstyle u^{2}} term
    $u_{1}+u_{2}+u_{3}={\frac {1}{r_{\text{s}}}}$
A cubic polynomial with real coefficients can either have three real roots, or one real root and two complex conjugate roots. If all three roots are real numbers, the roots are labeled so that u$_1$<u$_2$<u$_3${\textstyle u_{1}<u_{2}<u_{3}}. If instead there is only one real root, then that is denoted as u$_3${\textstyle u_{3}}; the complex conjugate roots are labeled u$_1${\textstyle u_{1}} and u$_2${\textstyle u_{2}}. Using Descartes' rule of signs, there can be at most one negative root; u$_1${\textstyle u_{1}} is negative if and only if b<a{\textstyle b<a}. As discussed below, the roots are useful in determining the types of possible orbits.
Given this labeling of the roots, the solution of the fundamental orbital equation is
    $u=u_{1}+\left(u_{2}-u_{1}\right)\,\mathrm {sn} ^{2}\left({\frac {1}{2}}\varphi {\sqrt {r_{\text{s}}\left(u_{3}-u_{1}\right)}}+\delta \right)$
where sn{\textstyle \mathrm {sn} } represents the sinus amplitudinus function (one of the Jacobi elliptic functions) and δ{\textstyle \delta } is a constant of integration reflecting the initial position. The elliptic modulus k{\textstyle k} of this elliptic function is given by the formula
    $k={\sqrt {\frac {u_{2}-u_{1}}{u_{3}-u_{1}}}}$

### Newtonian limit

To recover the Newtonian solution for the planetary orbits, one takes the limit as the Schwarzschild radius r$_s${\textstyle r_{\text{s}}} goes to zero. In this case, the third root u$_3${\textstyle u_{3}} becomes roughly 1/r$_s$ {\textstyle {\frac {1}{r_{\text{s}}}}}, and much larger than u$_1${\textstyle u_{1}} or u$_2${\textstyle u_{2}}. Therefore, the modulus k{\textstyle k} tends to zero; in that limit, sn{\textstyle \mathrm {sn} } becomes the trigonometric sine function
    $u=u_{1}+\left(u_{2}-u_{1}\right)\,\sin ^{2}\left({\frac {1}{2}}\varphi +\delta \right)$
Consistent with Newton's solutions for planetary motions, this formula describes a focal conic of eccentricity e{\textstyle e}
    $e={\frac {u_{2}-u_{1}}{u_{2}+u_{1}}}$
If u$_1${\textstyle u_{1}} is a positive real number, then the orbit is an ellipse where u$_1${\textstyle u_{1}} and u$_2${\textstyle u_{2}} represent the distances of furthest and closest approach, respectively. If u$_1${\textstyle u_{1}} is zero or a negative real number, the orbit is a parabola or a hyperbola, respectively. In these latter two cases, u$_2${\textstyle u_{2}} represents the distance of closest approach; since the orbit goes to infinity (u=0{\textstyle u=0}), there is no distance of furthest approach.

### Roots and overview of possible orbits

A root represents a point of the orbit where the derivative vanishes, i.e., where du/dϕ=0{\textstyle {\frac {du}{d\phi }}=0}. At such a turning point, u{\textstyle u} reaches a maximum, a minimum, or an inflection point, depending on the value of the second derivative, which is given by the formula
    ${\frac {d^{2}u}{d\varphi ^{2}}}={\frac {r_{\text{s}}}{2}}\left[\left(u-u_{2}\right)\left(u-u_{3}\right)+\left(u-u_{1}\right)\left(u-u_{3}\right)+\left(u-u_{1}\right)\left(u-u_{2}\right)\right]$
If all three roots are distinct real numbers, the second derivative is positive, negative, and positive at u$_1$, u$_2$, and u$_3$, respectively. It follows that a graph of u versus φ may either oscillate between u$_1$ and u$_2$, or it may move away from u$_3$ towards infinity (which corresponds to r going to zero). If u$_1$ is negative, only part of an "oscillation" will actually occur. This corresponds to the particle coming from infinity, getting near the central mass, and then moving away again toward infinity, like the hyperbolic trajectory in the classical solution.
If the particle has just the right amount of energy for its angular momentum, u$_2$ and u$_3$ will merge. There are three solutions in this case. The orbit may spiral in to r=1/u$_2$=1/u$_3$ {\textstyle r={\frac {1}{u_{2}}}={\frac {1}{u_{3}}}}, approaching that radius as (asymptotically) a decreasing exponential in φ, τ{\textstyle \tau }, or t{\textstyle t}. Or one can have a circular orbit at that radius. Or one can have an orbit that spirals down from that radius to the central point. The radius in question is called the inner radius and is between 3/2 {\textstyle {\frac {3}{2}}} and 3 times r$_s$. A circular orbit also results when u$_2${\textstyle u_{2}} is equal to u$_1${\textstyle u_{1}}, and this is called the outer radius. These different types of orbits are discussed below.
If the particle comes at the central mass with sufficient energy and sufficiently low angular momentum then only u$_1${\textstyle u_{1}} will be real. This corresponds to the particle falling into a black hole. The orbit spirals in with a finite change in φ.

## Precession of orbits

The function sn and its square sn$^2$ have periods of 4K and 2K, respectively, where K is defined by the equation
    $K=\int _{0}^{1}{\frac {dy}{\sqrt {\left(1-y^{2}\right)\left(1-k^{2}y^{2}\right)}}}$
Therefore, the change in φ over one oscillation of u{\textstyle u} (or, equivalently, one oscillation of r{\textstyle r}) equals
    $\Delta \varphi ={\frac {4K}{\sqrt {r_{\text{s}}\left(u_{3}-u_{1}\right)}}}$
In the classical limit, u$_3$ approaches 1/r$_s$ {\textstyle {\frac {1}{r_{\text{s}}}}} and is much larger than u$_1${\textstyle u_{1}} or u$_2${\textstyle u_{2}}. Hence, k$^2${\textstyle k^{2}} is approximately
    $k^{2}={\frac {u_{2}-u_{1}}{u_{3}-u_{1}}}\approx r_{\text{s}}\left(u_{2}-u_{1}\right)\ll 1$
For the same reasons, the denominator of Δφ is approximately
    ${\frac {1}{\sqrt {r_{\text{s}}\left(u_{3}-u_{1}\right)}}}={\frac {1}{\sqrt {1-r_{\text{s}}\left(2u_{1}+u_{2}\right)}}}\approx 1+{\frac {1}{2}}r_{\text{s}}\left(2u_{1}+u_{2}\right)$
Since the modulus k{\textstyle k} is close to zero, the period K can be expanded in powers of k{\textstyle k}; to lowest order, this expansion yields
    $K\approx \int _{0}^{1}{\frac {dy}{\sqrt {1-y^{2}}}}\left(1+{\frac {1}{2}}k^{2}y^{2}\right)={\frac {\pi }{2}}\left(1+{\frac {k^{2}}{4}}\right)$
Substituting these approximations into the formula for Δφ yields a formula for angular advance per radial oscillation
    $\delta \varphi =\Delta \varphi -2\pi \approx {\frac {3}{2}}\pi r_{\text{s}}\left(u_{1}+u_{2}\right)$
For an elliptical orbit, u$_1${\textstyle u_{1}} and u$_2${\textstyle u_{2}} represent the inverses of the longest and shortest distances, respectively. These can be expressed in terms of the ellipse's semi-major axis A{\textstyle A} and its orbital eccentricity e{\textstyle e},
    ${\begin{aligned}r_{\text{max}}&={\frac {1}{u_{1}}}=A(1+e)\\r_{\text{min}}&={\frac {1}{u_{2}}}=A(1-e)\end{aligned}}$
giving
    $u_{1}+u_{2}={\frac {2}{A\left(1-e^{2}\right)}}$
Substituting the definition of r$_s${\textstyle r_{\text{s}}} gives the final equation
    $\delta \varphi \approx {\frac {6\pi GM}{c^{2}A\left(1-e^{2}\right)}}$

## Bending of light by gravity

In the limit as the particle mass m goes to zero (or, equivalently if the light is heading directly toward the central mass, as the length-scale a goes to infinity), the equation for the orbit becomes
    $\varphi =\int {\frac {dr}{r^{2}{\sqrt {{\frac {1}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {1}{r^{2}}}}}}}$
Expanding in powers of r$_s$/r {\textstyle {\frac {r_{\text{s}}}{r}}}, the leading order term in this formula gives the approximate angular deflection δφ for a massless particle coming in from infinity and going back out to infinity:
    $\delta \varphi \approx {\frac {2r_{\text{s}}}{b}}={\frac {4GM}{c^{2}b}}.$
Here, b{\textstyle b} is the impact parameter, somewhat greater than the distance of closest approach, r$_3${\textstyle r_{3}}:
$b=r_{3}{\sqrt {\frac {r_{3}}{r_{3}-r_{\text{s}}}}}$
Although this formula is approximate, it is accurate for most measurements of gravitational lensing, due to the smallness of the ratio r$_s$/r {\textstyle {\frac {r_{\text{s}}}{r}}}. For light grazing the surface of the sun, the approximate angular deflection is roughly 1.75 arcseconds, roughly one millionth part of a circle.
More generally, the geodesics of a photon with radial coordinate $r\in [r_{s},\infty [$ can be calculated as follows, by applying the equation
    ${\left({\frac {dr}{d\varphi }}\right)}^{2}={\frac {r^{4}}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {r^{4}}{a^{2}}}+r^{2}\right)$
which gives with $u={1 \over r}$
    ${\left({du \over d\varphi }\right)^{2}}=r_{s}\ u^{3}-u^{2}+{\frac {1}{b^{2}}}$
The equation can be derived as
    $2\ {\frac {du}{d\varphi }}{\frac {d^{2}u}{d\varphi ^{2}}}=3\ r_{s}u^{2}{\frac {du}{d\varphi }}-2\ u{\frac {du}{d\varphi }}$
which leads to
    ${d^{2}u \over d\varphi ^{2}}={\frac {3}{2}}\ r_{s}\ u^{2}-\ u$
This equation with second derivative can be numerically integrated as follows by a 4th order Runge-Kutta method, considering a step size $\Delta \varphi$ and with:
    $k_{1}={d^{2}u \over d\varphi ^{2}}(u)$,
    $k_{2}={d^{2}u \over d\varphi ^{2}}{\biglu+{\frac {\Delta \varphi }{2}}{du \over d\varphi }{\bigr )}$,
    $k_{3}={d^{2}u \over d\varphi ^{2}}{\Biglu+{\frac {\Delta \varphi }{2}}{du \over d\varphi }+{\frac {\Delta \varphi ^{2}}{4}}k_{1}{\Bigr )}$ and
    $k_{4}={d^{2}u \over d\varphi ^{2}}{\Biglu+\Delta \varphi {du \over d\varphi }+{\frac {\Delta \varphi ^{2}}{2}}k_{2}{\Bigr )}$.
The value at the next step ${du \over d\varphi }(\varphi +\Delta \varphi )$ is
    ${du \over d\varphi }(\varphi )+{\frac {\Delta \varphi }{6}}(k_{1}+2k_{2}+2k_{3}+k_{4})$
and the value at the next step $u(\varphi +\Delta \varphi )$ is
    $u(\varphi )+\Delta \varphi {du \over d\varphi }(\varphi )+{\frac {\Delta \varphi ^{2}}{6}}(k_{1}+k_{2}+k_{3})$
The step $\Delta \varphi$ can be chosen to be constant or adaptive, depending on the accuracy required on $r={1 \over u}$.

## Relation to Newtonian physics
### Effective radial potential energy

The equation of motion for the particle derived above
    $\left({\frac {dr}{d\tau }}\right)^{2}={\frac {E^{2}}{m^{2}c^{2}}}-c^{2}+{\frac {r_{\text{s}}c^{2}}{r}}-{\frac {L^{2}}{m\mu r^{2}}}+{\frac {r_{\text{s}}L^{2}}{m\mu r^{3}}}$
can be rewritten using the definition of the Schwarzschild radius r$_s$ as
    ${\frac {1}{2}}m\left({\frac {dr}{d\tau }}\right)^{2}=\left[{\frac {E^{2}}{2mc^{2}}}-{\frac {1}{2}}mc^{2}\right]+{\frac {GMm}{r}}-{\frac {L^{2}}{2\mu r^{2}}}+{\frac {G(M+m)L^{2}}{c^{2}\mu r^{3}}},$
which is equivalent to a particle moving in a one-dimensional effective potential
    $V(r)=-{\frac {GMm}{r}}+{\frac {L^{2}}{2\mu r^{2}}}-{\frac {G(M+m)L^{2}}{c^{2}\mu r^{3}}}$
The first two terms are well-known classical energies, the first being the attractive Newtonian gravitational potential energy and the second corresponding to the repulsive "centrifugal" potential energy; however, the third term is an attractive energy unique to general relativity. As shown below and elsewhere, this inverse-cubic energy causes elliptical orbits to precess gradually by an angle δφ per revolution
    $\delta \varphi \approx {\frac {6\pi G(M+m)}{c^{2}A\left(1-e^{2}\right)}}$
where A{\textstyle A} is the semi-major axis and e{\textstyle e} is the eccentricity.
The third term is attractive and dominates at small r{\textstyle r} values, giving a critical inner radius r$_{inner}$ at which a particle is drawn inexorably inwards to r=0{\textstyle r=0}; this inner radius is a function of the particle's angular momentum per unit mass or, equivalently, the a{\textstyle a} length-scale defined above.

### Circular orbits and their stability

The effective potential V{\textstyle V} can be re-written in terms of the length a=h/c {\textstyle a={\frac {h}{c}}}.
    $V(r)={\frac {\mu c^{2}}{2}}\left[-{\frac {r_{\text{s}}}{r}}+{\frac {a^{2}}{r^{2}}}-{\frac {r_{\text{s}}a^{2}}{r^{3}}}\right]$
Circular orbits are possible when the effective force is zero
    $F=-{\frac {dV}{dr}}=-{\frac {\mu c^{2}}{2r^{4}}}\left[r_{\text{s}}r^{2}-2a^{2}r+3r_{\text{s}}a^{2}\right]=0$
i.e., when the two attractive forces — Newtonian gravity (first term) and the attraction unique to general relativity (third term) — are exactly balanced by the repulsive centrifugal force (second term). There are two radii at which this balancing can occur, denoted here as r$_{inner}$ and r$_{outer}$
    ${\begin{aligned}r_{\text{outer}}&={\frac {a^{2}}{r_{\text{s}}}}\left(1+{\sqrt {1-{\frac {3r_{\text{s}}^{2}}{a^{2}}}}}\right)\\[3pt]r_{\text{inner}}&={\frac {a^{2}}{r_{\text{s}}}}\left(1-{\sqrt {1-{\frac {3r_{\text{s}}^{2}}{a^{2}}}}}\right)={\frac {3a^{2}}{r_{\text{outer}}}}\end{aligned}}$
which are obtained using the quadratic formula. The inner radius r$_{inner}$ is unstable, because the attractive third force strengthens much faster than the other two forces when r becomes small; if the particle slips slightly inwards from r$_{inner}$ (where all three forces are in balance), the third force dominates the other two and draws the particle inexorably inwards to r = 0. At the outer radius, however, the circular orbits are stable; the third term is less important and the system behaves more like the non-relativistic Kepler problem.
When a{\textstyle a} is much greater than r$_s${\textstyle r_{\text{s}}} (the classical case), these formulae become approximately
    ${\begin{aligned}r_{\text{outer}}&\approx {\frac {2a^{2}}{r_{\text{s}}}}\\[3pt]r_{\text{inner}}&\approx {\frac {3}{2}}r_{\text{s}}\end{aligned}}$
Substituting the definitions of a{\textstyle a} and r$_s$ into r$_{outer}$ yields the classical formula for a particle of mass m{\textstyle m} orbiting a body of mass M{\textstyle M}.
    $r_{\mathrm {outer} }^{3}={\frac {G(M+m)}{\omega _{\varphi }^{2}}}$
where ω$_φ$ is the orbital angular speed of the particle. This formula is obtained in non-relativistic mechanics by setting the centrifugal force equal to the Newtonian gravitational force:
    ${\frac {GMm}{r^{2}}}=\mu \omega _{\varphi }^{2}r$
Where μ{\textstyle \mu } is the reduced mass.
In our notation, the classical orbital angular speed equals
    $\omega _{\varphi }^{2}\approx {\frac {GM}{r_{\mathrm {outer} }^{3}}}=\left({\frac {r_{\text{s}}c^{2}}{2r_{\mathrm {outer} }^{3}}}\right)=\left({\frac {r_{\text{s}}c^{2}}{2}}\right)\left({\frac {r_{\text{s}}^{3}}{8a^{6}}}\right)={\frac {c^{2}r_{\text{s}}^{4}}{16a^{6}}}$
At the other extreme, when a$^2$ approaches 3r$_s$$^2$ from above, the two radii converge to a single value
    $r_{\mathrm {outer} }\approx r_{\mathrm {inner} }\approx 3r_{\text{s}}$
The quadratic solutions above ensure that r$_{outer}$ is always greater than 3r$_s$, whereas r$_{inner}$ lies between 3⁄2 r$_s$ and 3r$_s$. Circular orbits smaller than 3⁄2 r$_s$ are not possible. For massless particles, a goes to infinity, implying that there is a circular orbit for photons at r$_{inner}$ = 3⁄2 r$_s$. The sphere of this radius is sometimes known as the photon sphere.

### Precession of elliptical orbits

The orbital precession rate may be derived using this radial effective potential V. A small radial deviation from a circular orbit of radius r$_{outer}$ will oscillate stably with an angular frequency
    $\omega _{r}^{2}={\frac {1}{m}}\left[{\frac {d^{2}V}{dr^{2}}}\right]_{r=r_{\mathrm {outer} }}$
which equals
    $\omega _{r}^{2}=\left({\frac {c^{2}r_{\text{s}}}{2r_{\mathrm {outer} }^{4}}}\right)\left(r_{\mathrm {outer} }-r_{\mathrm {inner} }\right)=\omega _{\varphi }^{2}{\sqrt {1-{\frac {3r_{\text{s}}^{2}}{a^{2}}}}}$
Taking the square root of both sides and performing a Taylor series expansion yields
    $\omega _{r}=\omega _{\varphi }\left[1-{\frac {3r_{\text{s}}^{2}}{4a^{2}}}+{\mathcal {O}}\left({\frac {r_{\text{s}}^{4}}{a^{4}}}\right)\right]$
Multiplying by the period T of one revolution gives the precession of the orbit per revolution
    $\delta \varphi =T\left(\omega _{\varphi }-\omega _{r}\right)\approx 2\pi \left({\frac {3r_{\text{s}}^{2}}{4a^{2}}}\right)={\frac {3\pi m^{2}c^{2}}{2L^{2}}}r_{\text{s}}^{2}$
where we have used ω$_φ$T = 2п and the definition of the length-scale a. Substituting the definition of the Schwarzschild radius r$_s$ gives
    $\delta \varphi \approx {\frac {3\pi m^{2}c^{2}}{2L^{2}}}\left({\frac {4G^{2}M^{2}}{c^{4}}}\right)={\frac {6\pi G^{2}M^{2}m^{2}}{c^{2}L^{2}}}$
This may be simplified using the elliptical orbit's semiaxis A and eccentricity e related by the formula
    ${\frac {h^{2}}{G(M+m)}}=A\left(1-e^{2}\right)$
to give the precession angle
    $\delta \varphi \approx {\frac {6\pi G(M+m)}{c^{2}A\left(1-e^{2}\right)}}$

## Mathematical derivations of the orbital equation
### Christoffel symbols

The non-vanishing Christoffel symbols for the Schwarzschild-metric are:
    ${\begin{aligned}\Gamma _{rt}^{t}=-\Gamma _{rr}^{r}&={\frac {r_{\text{s}}}{2r(r-r_{\text{s}})}}\\[3pt]\Gamma _{tt}^{r}&={\frac {r_{\text{s}}(r-r_{\text{s}})}{2r^{3}}}\\[3pt]\Gamma _{\phi \phi }^{r}&=(r_{\text{s}}-r)\sin ^{2}(\theta )\\[3pt]\Gamma _{\theta \theta }^{r}&=r_{\text{s}}-r\\[3pt]\Gamma _{r\theta }^{\theta }=\Gamma _{r\phi }^{\phi }&={\frac {1}{r}}\\[3pt]\Gamma _{\phi \phi }^{\theta }&=-\sin(\theta )\cos(\theta )\\[3pt]\Gamma _{\theta \phi }^{\phi }&=\cot(\theta )\end{aligned}}$

### Geodesic equation

According to Einstein's theory of general relativity, particles of negligible mass travel along geodesics in the space-time. In flat space-time, far from a source of gravity, these geodesics correspond to straight lines; however, they may deviate from straight lines when the space-time is curved. The equation for the geodesic lines is
    ${\frac {d^{2}x^{\lambda }}{dq^{2}}}+\Gamma _{\mu \nu }^{\lambda }{\frac {dx^{\mu }}{dq}}{\frac {dx^{\nu }}{dq}}=0$
where Γ represents the Christoffel symbol and the variable q{\textstyle q} parametrizes the particle's path through space-time, its so-called world line. The Christoffel symbol depends only on the metric tensor g$_{μν}${\textstyle g_{\mu \nu }}, or rather on how it changes with position. The variable q{\textstyle q} is a constant multiple of the proper time τ{\textstyle \tau } for timelike orbits (which are traveled by massive particles), and is usually taken to be equal to it. For lightlike (or null) orbits (which are traveled by massless particles such as the photon), the proper time is zero and, strictly speaking, cannot be used as the variable q{\textstyle q}. Nevertheless, lightlike orbits can be derived as the ultrarelativistic limit of timelike orbits, that is, the limit as the particle mass m goes to zero while holding its total energy fixed.
Therefore, to solve for the motion of a particle, the most straightforward way is to solve the geodesic equation, an approach adopted by Einstein and others. The Schwarzschild metric may be written as
    $c^{2}d\tau ^{2}=w(r)c^{2}dt^{2}-v(r)dr^{2}-r^{2}d\theta ^{2}-r^{2}\sin ^{2}\theta d\phi ^{2}\,$
where the two functions w(r)=1−r$_s$/r {\textstyle w(r)=1-{\frac {r_{\text{s}}}{r}}}and its reciprocal v(r)=1/w(r) {\textstyle v(r)={\frac {1}{w(r)}}}are defined for brevity. From this metric, the Christoffel symbols Γ$_{μν}$$^λ${\textstyle \Gamma _{\mu \nu }^{\lambda }}may be calculated, and the results substituted into the geodesic equations
    ${\begin{aligned}0&={\frac {d^{2}\theta }{dq^{2}}}+{\frac {2}{r}}{\frac {d\theta }{dq}}{\frac {dr}{dq}}-\sin \theta \cos \theta \left({\frac {d\phi }{dq}}\right)^{2}\\[3pt]0&={\frac {d^{2}\phi }{dq^{2}}}+{\frac {2}{r}}{\frac {d\phi }{dq}}{\frac {dr}{dq}}+2\cot \theta {\frac {d\phi }{dq}}{\frac {d\theta }{dq}}\\[3pt]0&={\frac {d^{2}t}{dq^{2}}}+{\frac {1}{w}}{\frac {dw}{dr}}{\frac {dt}{dq}}{\frac {dr}{dq}}\\[3pt]0&={\frac {d^{2}r}{dq^{2}}}-{\frac {1}{v}}{\frac {dv}{dr}}\left({\frac {dr}{dq}}\right)^{2}-{\frac {r}{v}}\left({\frac {d\theta }{dq}}\right)^{2}-{\frac {r\sin ^{2}\theta }{v}}\left({\frac {d\phi }{dq}}\right)^{2}+{\frac {c^{2}}{2v}}{\frac {dw}{dr}}\left({\frac {dt}{dq}}\right)^{2}\end{aligned}}$
It may be verified that θ=π/2 {\textstyle \theta ={\frac {\pi }{2}}} is a valid solution by substitution into the first of these four equations. By symmetry, the orbit must be planar, and we are free to arrange the coordinate frame so that the equatorial plane is the plane of the orbit. This θ{\textstyle \theta } solution simplifies the second and fourth equations.
To solve the second and third equations, it suffices to divide them by dϕ/dq {\textstyle {\frac {d\phi }{dq}}} and dt/dq {\textstyle {\frac {dt}{dq}}}, respectively.
    ${\begin{aligned}0&={\frac {d}{dq}}\left[\ln {\frac {d\phi }{dq}}+\ln r^{2}\right]\\[3pt]0&={\frac {d}{dq}}\left[\ln {\frac {dt}{dq}}+\ln w\right],\end{aligned}}$
which yields two constants of motion.

### Lagrangian approach

Because test particles follow geodesics in a fixed metric, the orbits of those particles may be determined using the calculus of variations, also called the Lagrangian approach. Geodesics in space-time are defined as curves for which small local variations in their coordinates (while holding their endpoints events fixed) make no significant change in their overall length s. This may be expressed mathematically using the calculus of variations
    $0=\delta s=\delta \int ds=\delta \int {\sqrt {g_{\mu \nu }{\frac {dx^{\mu }}{d\tau }}{\frac {dx^{\nu }}{d\tau }}}}d\tau =\delta \int {\sqrt {2T}}d\tau$
where τ is the proper time, s = cτ is the arc-length in space-time and T is defined as
    $2T=c^{2}=\left({\frac {ds}{d\tau }}\right)^{2}=g_{\mu \nu }{\frac {dx^{\mu }}{d\tau }}{\frac {dx^{\nu }}{d\tau }}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}\left({\frac {dt}{d\tau }}\right)^{2}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\frac {dr}{d\tau }}\right)^{2}-r^{2}\left({\frac {d\varphi }{d\tau }}\right)^{2}$
in analogy with kinetic energy. If the derivative with respect to proper time is represented by a dot for brevity
    ${\dot {x}}^{\mu }={\frac {dx^{\mu }}{d\tau }}$
T may be written as
    $2T=c^{2}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}\left({\dot {t}}\right)^{2}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\dot {r}}\right)^{2}-r^{2}\left({\dot {\varphi }}\right)^{2}$
Constant factors (such as c or the square root of two) don't affect the answer to the variational problem; therefore, taking the variation inside the integral yields Hamilton's principle
    $0=\delta \int {\sqrt {2T}}d\tau =\int {\frac {\delta T}{\sqrt {2T}}}d\tau ={\frac {1}{c}}\delta \int Td\tau .$
The solution of the variational problem is given by Lagrange's equations
    ${\frac {d}{d\tau }}\left({\frac {\partial T}{\partial {\dot {x}}^{\sigma }}}\right)={\frac {\partial T}{\partial x^{\sigma }}}.$
When applied to t and φ, these equations reveal two constants of motion
    ${\begin{aligned}{\frac {d}{d\tau }}\left[r^{2}{\frac {d\varphi }{d\tau }}\right]&=0,\\{\frac {d}{d\tau }}\left[\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\right]&=0,\end{aligned}}$
which may be expressed in terms of two constant length-scales, a{\textstyle a} and b{\textstyle b}
    ${\begin{aligned}r^{2}{\frac {d\varphi }{d\tau }}&=ac,\\\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}&={\frac {a}{b}}.\end{aligned}}$
As shown above, substitution of these equations into the definition of the Schwarzschild metric yields the equation for the orbit.

### Hamiltonian approach

A Lagrangian solution can be recast into an equivalent Hamiltonian form. In this case, the Hamiltonian $H$ is given by
    $2H=c^{2}={\frac {p_{t}^{2}}{c^{2}\left(1-{\frac {r_{\text{s}}}{r}}\right)}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)p_{r}^{2}-{\frac {p_{\theta }^{2}}{r^{2}}}-{\frac {p_{\varphi }^{2}}{r^{2}\sin ^{2}\theta }}$
Once again, the orbit may be restricted to θ=π/2 {\textstyle \theta ={\frac {\pi }{2}}}by symmetry. Since t{\textstyle t} and φ{\textstyle \varphi } do not appear in the Hamiltonian, their conjugate momenta are constant; they may be expressed in terms of the speed of light c{\textstyle c} and two constant length-scales a{\textstyle a} and b{\textstyle b}
    ${\begin{aligned}p_{\varphi }&=-ac\\p_{\theta }&=0\\p_{t}&={\frac {ac^{2}}{b}}\end{aligned}}$
The derivatives with respect to proper time are given by
    ${\begin{aligned}{\frac {dr}{d\tau }}&={\frac {\partial H}{\partial p_{r}}}=-\left(1-{\frac {r_{\text{s}}}{r}}\right)p_{r}\\{\frac {d\varphi }{d\tau }}&={\frac {\partial H}{\partial p_{\varphi }}}={\frac {-p_{\varphi }}{r^{2}}}={\frac {ac}{r^{2}}}\\{\frac {dt}{d\tau }}&={\frac {\partial H}{\partial p_{t}}}={\frac {p_{t}}{c^{2}\left(1-{\frac {r_{\text{s}}}{r}}\right)}}={\frac {a}{b\left(1-{\frac {r_{\text{s}}}{r}}\right)}}\end{aligned}}$
Dividing the first equation by the second yields the orbital equation
    ${\frac {dr}{d\varphi }}=-{\frac {r^{2}}{ac}}\left(1-{\frac {r_{\text{s}}}{r}}\right)p_{r}$
The radial momentum p$_r$ can be expressed in terms of r using the constancy of the Hamiltonian H=c$^2$/2 {\textstyle H={\frac {c^{2}}{2}}}; this yields the fundamental orbital equation
    $\left({\frac {dr}{d\varphi }}\right)^{2}={\frac {r^{4}}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {r^{4}}{a^{2}}}+r^{2}\right)$

### Hamilton–Jacobi approach

The orbital equation can be derived from the Hamilton–Jacobi equation. The advantage of this approach is that it equates the motion of the particle with the propagation of a wave, and leads neatly into the derivation of the deflection of light by gravity in general relativity, through Fermat's principle. The basic idea is that, due to gravitational slowing of time, parts of a wave-front closer to a gravitating mass move more slowly than those further away, thus bending the direction of the wave-front's propagation.
Using general covariance, the Hamilton–Jacobi equation for a single particle of unit mass can be expressed in arbitrary coordinates as
    $g^{\mu \nu }{\frac {\partial S}{\partial x^{\mu }}}{\frac {\partial S}{\partial x^{\nu }}}=c^{2}.$
This is equivalent to the Hamiltonian formulation above, with the partial derivatives of the action taking the place of the generalized momenta. Using the Schwarzschild metric g$^{μν}$, this equation becomes
    ${\frac {1}{c^{2}\left(1-{\frac {r_{\text{s}}}{r}}\right)}}\left({\frac {\partial S}{\partial t}}\right)^{2}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {\partial S}{\partial r}}\right)^{2}-{\frac {1}{r^{2}}}\left({\frac {\partial S}{\partial \varphi }}\right)^{2}=c^{2}$
where we again orient the spherical coordinate system with the plane of the orbit. The time t and azimuthal angle φ are cyclic coordinates, so that the solution for Hamilton's principal function S can be written
    $S=-p_{t}t+p_{\varphi }\varphi +S_{r}(r)\,$
where $p_{t}$ and $p_{\varphi }$ are the constant generalized momenta. The Hamilton–Jacobi equation gives an integral solution for the radial part $S_{r}(r)$
    $S_{r}(r)=\int ^{r}{\frac {dr}{1-{\frac {r_{\text{s}}}{r}}}}{\sqrt {{\frac {p_{t}^{2}}{c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {p_{\varphi }^{2}}{r^{2}}}\right)}}.$
Taking the derivative of Hamilton's principal function S with respect to the conserved momentum p$_φ$ yields
    ${\frac {\partial S}{\partial p_{\varphi }}}=\varphi +{\frac {\partial S_{r}}{\partial p_{\varphi }}}=\mathrm {constant}$
which equals
    $\varphi -\int ^{r}{\frac {p_{\varphi }dr}{r^{2}{\sqrt {{\frac {p_{t}^{2}}{c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {p_{\varphi }^{2}}{r^{2}}}\right)}}}}=\mathrm {constant}$
Taking an infinitesimal variation in φ and r yields the fundamental orbital equation
    $\left({\frac {dr}{d\varphi }}\right)^{2}={\frac {r^{4}}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {r^{4}}{a^{2}}}+r^{2}\right).$
where the conserved length-scales a and b are defined by the conserved momenta by the equations
    ${\begin{aligned}{\frac {\partial S}{\partial \varphi }}=p_{\varphi }&=-ac\\{\frac {\partial S}{\partial t}}=p_{t}&={\frac {ac^{2}}{b}}\end{aligned}}$

### Hamilton's principle

The action integral for a particle affected only by gravity is
    $S=\int {-mc^{2}d\tau }=-mc\int {c{\frac {d\tau }{dq}}dq}=-mc\int {{\sqrt {-g_{\mu \nu }{\frac {dx^{\mu }}{dq}}{\frac {dx^{\nu }}{dq}}}}dq}$
where τ{\textstyle \tau } is the proper time and q{\textstyle q} is any smooth parameterization of the particle's world line. If one applies the calculus of variations to this, one again gets the equations for a geodesic. To simplify the calculations, one first takes the variation of the square of the integrand. For the metric and coordinates of this case and assuming that the particle is moving in the equatorial plane θ=π/2 {\textstyle \theta ={\frac {\pi }{2}}}, that square is
    $\left(c{\frac {d\tau }{dq}}\right)^{2}=-g_{\mu \nu }{\frac {dx^{\mu }}{dq}}{\frac {dx^{\nu }}{dq}}=\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}\left({\frac {dt}{dq}}\right)^{2}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\frac {dr}{dq}}\right)^{2}-r^{2}\left({\frac {d\varphi }{dq}}\right)^{2}\,.$
Taking variation of this gives
    $\delta \left(c{\frac {d\tau }{dq}}\right)^{2}=2c^{2}{\frac {d\tau }{dq}}\delta {\frac {d\tau }{dq}}=\delta \left[\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}\left({\frac {dt}{dq}}\right)^{2}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\frac {dr}{dq}}\right)^{2}-r^{2}\left({\frac {d\varphi }{dq}}\right)^{2}\right]\,.$

#### Motion in longitude

Vary with respect to longitude φ{\textstyle \varphi } only to get
    $2c^{2}{\frac {d\tau }{dq}}\delta {\frac {d\tau }{dq}}=-2r^{2}{\frac {d\varphi }{dq}}\delta {\frac {d\varphi }{dq}}\,.$
Divide by 2c dτ/dq {\textstyle 2c{\frac {d\tau }{dq}}} to get the variation of the integrand itself
    $c\,\delta {\frac {d\tau }{dq}}=-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}\delta {\frac {d\varphi }{dq}}=-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}{\frac {d\delta \varphi }{dq}}\,.$
Thus
    $0=\delta \int {c{\frac {d\tau }{dq}}dq}=\int {c\delta {\frac {d\tau }{dq}}dq}=\int {-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}{\frac {d\delta \varphi }{dq}}dq}\,.$
Integrating by parts gives
    $0=-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}\delta \varphi -\int {{\frac {d}{dq}}\left[-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}\right]\delta \varphi dq}\,.$
The variation of the longitude is assumed to be zero at the end points, so the first term disappears. The integral can be made nonzero by a perverse choice of δφ{\textstyle \delta \varphi } unless the other factor inside is zero everywhere. So the equation of motion is
    ${\frac {d}{dq}}\left[-{\frac {r^{2}}{c}}{\frac {d\varphi }{d\tau }}\right]=0\,.$

#### Motion in time

Vary with respect to time t{\textstyle t} only to get
    $2c^{2}{\frac {d\tau }{dq}}\delta {\frac {d\tau }{dq}}=2\left(1-{\frac {r_{\text{s}}}{r}}\right)c^{2}{\frac {dt}{dq}}\delta {\frac {dt}{dq}}\,.$
Divide by 2c dτ/dq {\textstyle 2c{\frac {d\tau }{dq}}} to get the variation of the integrand itself
    $c\delta {\frac {d\tau }{dq}}=c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\delta {\frac {dt}{dq}}=c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}{\frac {d\delta t}{dq}}\,.$
Thus
    $0=\delta \int {c{\frac {d\tau }{dq}}dq}=\int {c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}{\frac {d\delta t}{dq}}dq}\,.$
Integrating by parts gives
    $0=c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\delta t-\int {{\frac {d}{dq}}\left[c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\right]\delta tdq}\,.$
So the equation of motion is
    ${\frac {d}{dq}}\left[c\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\right]=0\,.$

#### Conserved momenta

Integrate these equations of motion to determine the constants of integration getting
    ${\begin{aligned}L=p_{\phi }&=mr^{2}{\frac {d\varphi }{d\tau }}\,,\\E=-p_{t}&=mc^{2}\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {dt}{d\tau }}\,.\end{aligned}}$
These two equations for the constants of motion L{\textstyle L} (angular momentum) and E{\textstyle E} (energy) can be combined to form one equation that is true even for photons and other massless particles for which the proper time along a geodesic is zero.
    ${\frac {d\varphi }{dt}}=\left(1-{\frac {r_{\text{s}}}{r}}\right){\frac {L\,c^{2}}{E\,r^{2}}}\,.$

#### Radial motion

Substituting
    ${\frac {d\varphi }{d\tau }}={\frac {L}{m\,r^{2}}}\,$
and
    ${\frac {dt}{d\tau }}={\frac {E}{\left(1-{\frac {r_{\text{s}}}{r}}\right)m\,c^{2}}}\,$
into the metric equation (and using θ=π/2 {\textstyle \theta ={\frac {\pi }{2}}}) gives
    $c^{2}={\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\,{\frac {E^{2}}{m^{2}c^{2}}}-{\frac {1}{1-{\frac {r_{\text{s}}}{r}}}}\left({\frac {dr}{d\tau }}\right)^{2}-{\frac {1}{r^{2}}}\,{\frac {L^{2}}{m^{2}}}\,,$
from which one can derive
    ${\left({\frac {dr}{d\tau }}\right)}^{2}={\frac {E^{2}}{m^{2}c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left(c^{2}+{\frac {L^{2}}{m^{2}r^{2}}}\right)\,,$
which is the equation of motion for r{\textstyle r}. The dependence of r{\textstyle r} on φ{\textstyle \varphi } can be found by dividing this by
    ${\left({\frac {d\varphi }{d\tau }}\right)}^{2}={\frac {L^{2}}{m^{2}r^{4}}}$
to get
    ${\left({\frac {dr}{d\varphi }}\right)}^{2}={\frac {E^{2}r^{4}}{L^{2}c^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {m^{2}c^{2}r^{4}}{L^{2}}}+r^{2}\right)\,$
which is true even for particles without mass. If length scales are defined by
    $a={\frac {L}{m\,c}}$
and
    $b={\frac {L\,c}{E}}\,,$
then the dependence of r{\textstyle r} on φ{\textstyle \varphi } simplifies to
    ${\left({\frac {dr}{d\varphi }}\right)}^{2}={\frac {r^{4}}{b^{2}}}-\left(1-{\frac {r_{\text{s}}}{r}}\right)\left({\frac {r^{4}}{a^{2}}}+r^{2}\right)\,.$