The question. A penguin hunting fish at depth must commute down and up through water where it cannot breathe. Staying longer at a patch catches more fish, but the patch is depleting and the oxygen store is draining. How long should it stay? This lab answers with the marginal value theorem of Charnov and an explicit oxygen budget.
Patch. Np fish; each is caught after an exponential hunting time of mean tau, so the expected energy caught after a bottom time tb is g(tb) = G (1 - exp(-tb/tau)), diminishing returns.
Oxygen. Swimming costs Dswim(u) = 0.08 + 0.04 u^2 mL O2 per kg per second, hunting costs 0.12 (typical orders of magnitude, not a species fit). Oxygen used in a dive is Dswim x 2d/u + 0.12 tb; the dive is aerobic while this stays below the usable store (about 55 mL/kg for an emperor-like bird). Surface recovery is ts = ts0 + O2used/reload, with any oxygen debt beyond the store counted four times (an illustrative lactate penalty). Energy cost is 20.1 J per mL O2.
Optimum. Net rate over a whole dive cycle R(tb) = (g(tb) - cost) / (2d/u + tb + ts). In the simple case with a fixed overhead T the maximum satisfies g'(tb)(tb + T) = g(tb), i.e. exp(tb/tau) = 1 + (tb + T)/tau: leave when the marginal catch rate falls to the average rate. Deeper patches (bigger T) give longer stays; a richer patch raises the rate but not the best stay.
Checks on the page. (1) Newton's root of the tangent condition against a golden-section search of the rate; (2) thousands of stochastic dives against the closed-form mean catch; (3) Monte-Carlo cycle rate against the analytic rate; (4) a time-stepped oxygen budget against the formula. The experiments compare agent runs with the model prediction.
Honest simplifications. One patch type, no prey escape or travel between patches, constant speeds, a vertical path, no hypometabolism or heart-rate regulation, no thermoregulation or buoyancy; all constants are typical orders of magnitude chosen for a clear model, not measurements. The energy numbers are illustrative. The penguin and fish are drawn about three times larger than life so they stay visible in a 40 to 200 m deep cut-away.