Worked examples — Gauss's method for Lambert's problem
Before anything, let us re-anchor the symbols we will type a hundred times, in plain words:
Because every example runs the same loop, let us display and number the two Gauss equations and the loop on this page, so nobody has to flip back:

The scenario matrix
Every Lambert case a real solver meets falls into one of these cells. Each worked example below is tagged with the cell(s) it covers. The "why it can break" column points straight back to the formulas above.
| Cell | What makes it special | Why it can break naive code (see above) | Example |
|---|---|---|---|
| A. Small () | sector triangle, | none — the friendly base case | Ex 1 |
| B. Moderate (–) | noticeably , can exceed | series diverges once | Ex 2 |
| C. (long way) | → change sign | never returns this branch | Ex 3 |
| D. Near (antipodal) | → | denominators vanish → Gauss diverges, must bail | Ex 4 |
| E. Equal radii, | symmetric geometry, chord simplifies | not broken, but a sanity anchor | Ex 5 |
| F. Very short (limit) | → nearly straight chord, | rounding; check it does stay finite | Ex 6 |
| G. Real-world word problem | Earth→Mars-style numbers | unit bookkeeping, scaling | Ex 7 |
| H. Exam twist: recover full | vectors + , not just | sign of , plane normal | Ex 8 |
| I. Multi-revolution () | orbit loops full times before arriving | Gauss's single-rev have no ; solution non-unique | Ex 9 |
Ex 1 — Cell A: the friendly small-angle transfer
Step 1 — geometry constants. , . Why this step? are pure inputs — computed once, never touched inside the loop. Doing them first stops us re-deriving them each iteration.
Step 2 — iterate. Start .
- (this is (E1))
- (this is (E2) rearranged — the boxed update)
Why this step? We use (E1) to get from the current , feed it through the series , then use the boxed (E2) update to get a better . That is the whole contraction — its origin is the derivation displayed at the top of this page.
Step 3 — one more pass. ; the update settles to .
Verify: is indeed "a hair above 1" — matches the forecast. Both Gauss equations are now consistent to ; a full run to needs ~2 more passes. Units: are all dimensionless ratios, as they must be. ✓
Ex 2 — Cell B: moderate angle, visibly larger
Step 1 — geometry. , . Why this step? Same recipe; note and are now both order-1, not tiny — the transfer is genuinely curved.
Step 2 — first inversion via (E1). : .
Step 3 — the series can't be truncated; use the closed form. Because , the power series for diverges — adding more terms makes it worse, not better. Gauss's has an exact closed form in terms of an angle defined by ; when that angle becomes imaginary and is written with hyperbolic functions: which for evaluates to . This is the same function the series computes for — just written so it stays valid for all .
Why this step matters? The pretty series only converges for . When lands outside, blind truncation gives garbage — a real solver switches to this closed form. Running the loop with the closed-form gives the honest converged value .
Verify: and clearly bigger than Ex 1's — matches the "fatter slice" forecast. Lesson banked: check before trusting the series (Cell B is where that first bites). ✓
Ex 3 — Cell C: the long way round ()
Step 1 — the half-angle. , so . Negative. Why this step? can only ever hand you , never . To go the long way you must choose the branch from a prograde/retrograde flag — the angle is a decision, not a formula output.
Step 2 — constants change. Reading straight off the formulas at the top, with now negative: Why this step? carries a in its denominator — an odd power — so a negative flips 's sign cleanly. For , the flipped fraction then has subtracted, giving . The physics: the long-way orbit sweeps a reflex pie-slice, so the sector/triangle bookkeeping changes sign convention.
Verify: is exactly the negative of Ex 1's value; is negative too (its fraction part is the sign-flip of Ex 1's fraction, minus ). Exactly the sign changes the matrix's "change sign" cell promised. A solver that hard-codes would silently compute the short way and give a wrong orbit for a long-way mission. ✓

Ex 4 — Cell D: the antipodal breakdown ()
Step 1 — the half-angle collapses. , . Almost zero. Why this step? In the formulas at the top, sits in the denominator of both. As the two points become opposite ends of a diameter, that denominator races to zero.
Step 2 — the blow-up. . Why this step? These are astronomically large — the iteration produces huge, ill-conditioned numbers. Floating point loses all precision; the map is no longer a contraction.
Step 3 — the correct action: bail out.
Verify: and — grotesquely large, exactly the divergence the matrix's "" cell promised. The right "answer" here is refuse to iterate. ✓
Ex 5 — Cell E: equal radii symmetry check
Step 1 — chord (pure geometry). . Why this step? Equal radii + makes an equilateral triangle, so the chord equals the radius. A perfect sanity anchor: if your isn't , your law-of-cosines wiring is wrong.
Step 2 — constants. , .
Verify: chord confirms the equilateral geometry (). is larger than Ex 1's because is bigger (fatter slice). All ratios dimensionless. ✓
Ex 6 — Cell F: the very-short-time limit ()
Step 1 — shrinks like . Reusing Ex 1's denominator : Why this step? Mistake box (M3) insists . Halving time quarters ; here fell from to (factor ), so fell by — check: . ✓ matches.
Step 2 — limit. With (unchanged, geometry only):
- ((E1))
- (boxed (E2) update)
Why this step? As the correction term vanishes, so exactly — the analytic proof that a zero-time transfer degenerates to the straight-line chord.
Verify: — essentially , matching the "barely bends" forecast. The method stays finite and well-behaved in this limit (contrast Cell D, which blows up). ✓
Ex 7 — Cell G: real-world Earth→Mars-flavoured transfer
Step 1 — geometry. , . Why this step? Nothing new — but this is exactly the arithmetic behind one dot of a Porkchop plot, where Lambert is solved for a whole grid of and departure dates.
Step 2 — first update. :
- ((E1))
- (boxed (E2) update)
Verify: — above 1, in the ballpark forecast for a curved transfer; a couple more passes tighten it. Real Hohmann-ish Earth→Mars geometry lives right here. Units: all dimensionless. ✓
Ex 8 — Cell H: exam twist — recover the full velocity
Step 1 — semi-latus rectum . From the parent's extraction formula, Numerator: . Denominator: . Why this step? (the semi-latus rectum) is the orbit's "size" parameter; every Lagrange coefficient needs it. This is where (eccentric-anomaly info) finally feeds the geometry.
Step 2 — Lagrange and . Using the closed forms recalled in the cast of characters, Why this step? is the divisor in . It is positive because (short way, ) — exactly the forecast. A long-way would make , flipping and correctly reversing the velocity direction.
Step 3 — Lagrange . Why this step? scales the old position inside the relation . With and in hand we can now invert that relation for the velocity.
Step 4 — assemble (the point of the whole method). Rearranging for : To make it fully concrete, plant coordinates: put along the -axis and at , so . Then So the departure speed is (canonical units). Why this step? Because the Lagrange f and g functions propagate the orbit, inverting gives with no re-solving of Kepler's equation. That is the entire payoff of Gauss's method.
Verify: (a real ellipse); and — both exactly as forecast for a prograde arc. Velocity components come out finite and order-1. A closing consistency check on the Lagrange f and g functions: the identity (unit Wronskian) holds for correct . ✓
Ex 9 — Cell I: multi-revolution transfers ()
Step 1 — see what a huge does to . Reusing Ex 1's denominator : Why this step? carries the whole time as a single — it has no slot for "how many full loops." The formula treats time units as one direct arc, not one-loop-plus-a-short-arc.
Step 2 — why the physics is now multi-valued. For a fixed geometry, plotting time-of-flight versus orbit size is not monotonic once you allow full revolutions: the same can be met by a small fast orbit that goes direct, or by a larger orbit that loops times, giving generally two solutions per revolution number. Single-rev Gauss, built from one and one series branch, can only ever chase the (direct) branch.
Step 3 — the correct action. For you must use a solver that takes as an input and returns both the "left" and "right" branch:
Verify: is finite and computable, yet feeding it to single-rev Gauss would converge (if at all) to the direct orbit whose natural period simply doesn't take units — a physically wrong match. The honest answer: plain Gauss cannot represent ; use a multi-rev solver. ✓
Recall
Recall Which cell breaks Gauss, and what do you switch to?
Cell D (near ): makes and the iteration diverges. Cell I (): Gauss has no revolution counter. Both switch to Universal variable formulation, Battin's method, or the Izzo Lambert solver.
Recall Where do the loop's inversion and update formulas come from?
(E1) inverts to . Substituting (E1) into (E2) and dividing by gives . Not magic — algebra.
Recall Why did the series in Ex 2 fail?
The series converges only for ; Ex 2 gave , so you must use the closed (hyperbolic) form of instead of truncating.
Where does carry the time information, and how?
Why can and change sign?
What is the limit of as ?
Why can't plain Gauss do multi-revolution transfers?
See also: Lambert's problem · Kepler's second law · the parent topic note.