The science
Patch gain. Licking up termites removes prey in proportion to what is left, so the energy gathered after t seconds is g(t) = G (1 − e−t/τ). Staying also costs energy: E(t) = g(t) − cf t − c0, where c0 is the cost of walking and digging to get there.
Marginal value theorem (Charnov 1976). Over many visits the long-run net rate is R(t) = E(t) / (T + t) with T = travel time + dig time. R is largest when the instantaneous gain equals the average: E'(t*) = R(t*), i.e. the tangent from the point (−T, 0) to the curve E(t) touches it at t* (drawn in the chart). Longer trips or harder soil (bigger T) mean staying longer; rich mounds that deplete quickly mean leaving earlier.
Digging. Claw force is soil penetration resistance times claw-tip area, F = σ A, and mechanical power is P = F v, so the dig speed is v = P / (σ A) and the time to reach the nest at depth d is d/v. Metabolic power is P divided by a muscle efficiency of about 0.2. Here A = 1 cm² (illustrative), P = 0.5 W (illustrative).
Closed form check. With no running costs the optimum satisfies ex = 1 + T/τ + x with x = t*/τ, solved by the Lambert W function: x = −W−1(−e−(1+T/τ)) − 1 − T/τ. The page compares it with a numeric root.
In the world view the echidna uses the marginal-value rule with a running estimate of its own average rate: it leaves when the current depletion rate S/τ − cf falls to that average. Mounds recover slowly (recovery time slider), so heavy use of one mound lowers later gains; so the world rate drifts away from the single-patch curve (early on it can even be higher: the forager starts with fresh mounds and picks the nearest ones). A fixed-stay rule is offered for comparison.
Simplifications and honesty. Straight-line walking, uniform prey, one forager, no predators, no torpor or breeding. All energetic numbers (prey content, walking and feeding costs, claw area, digging power, patch time constants) are illustrative round values chosen to give a daily energy budget of the right order of magnitude (about 1-2 MJ/day for a few-kg monotreme); they are not measurements of a particular animal. Echidnas really do eat ants and termites, use long sticky tongues and dig powerfully, but nothing here predicts a real individual.
Independent educational model; the echidna is a stylised low-detail illustration.