Skip to content

Documentation / @interstellar-tools/equations / solveKeplerBisection

Function: solveKeplerBisection() ​

ts
function solveKeplerBisection(
  M: Radians,
  e: number,
  maxIter: number,
  tolerance: number
): Radians;

Defined in: kepler/solve-kepler-bisection.ts:35

Solve Kepler's equation for the eccentric anomaly (E) via bisection (elliptic case: (0≤e<1)).

Equation

M=E−esin⁡E,F(E)=E−esin⁡E−M

Bracketing & normalization

  • Normalize (M) to ([0,2π)).
  • Use the bracket ([0,2π]). Then (F(0)=−M≤0) and (F(2π)=2π−M≥0).
  • For (0≤e<1), (F′(E)=1−ecos⁡E≥1−e>0) ⇒ strictly increasing ⇒ unique root.

Stopping criteria (either)

  • Residual: (|F(E)|<tolerance)
  • Bracket width: (12(Ehigh−Elow)<tolerance)

Parameters ​

ParameterTypeDescription
MRadiansMean anomaly (radians). Can be any real; will be normalized to ([0,2π)).
enumberEccentricity, must satisfy (0≤e<1) (elliptic).
maxIternumberMaximum iterations (must be > 0).
tolerancenumberConvergence tolerance for both residual and half-interval (must be > 0, radians).

Returns ​

Radians

Eccentric anomaly (E) in radians, normalized to ([0,2π)).

Throws ​

If inputs are non-finite or out of domain.

Example ​

ts
const E = solveKeplerBisection((Math.PI / 3) as Radians, 0.5, 100, 1e-12);