Skip to main content

The Functional Equation

Where the master equation is what evolves, the functional equation is a single number that characterizes a whole solve() run — a register-dump reduction of the trajectory and its environment:

E  =  Pϕ    Z(M,R,δ,C,X)E \;=\; P_\phi \;\cdot\; Z(M,\,R,\,\delta,\,C,\,X)

It is computed by computeFunctionalEquation (shared/api-core/src/lib/zeqSolver.ts) and returned on every solve()/multibody() result as functionalEnergy (with a functionalEnergyTerms breakdown). It is strictly additive — a diagnostic scalar that sits alongside the physics, never altering the conserved energy energy = mean(K + U).

The two factors, exactly as computed

P_φ — the field's RMS momentum over the trajectory:

Pϕ=mean ⁣(ϕ˙2)P_\phi = \sqrt{\operatorname{mean}\!\left(\dot\phi^2\right)}

taken directly from the integrator's dφ/dt (not a finite difference of φ, which would lose precision at extreme scales). It measures how energetic the evolution was.

Z — a runtime-environment scale factor that folds the run's context into one number:

Z=MR(1+C)(1+X)eδttotalZ = M \cdot R \cdot (1 + C)\cdot(1 + X)\cdot e^{-\delta\, t_{\text{total}}}
TermIsFrom
Mobject mass parameteryour mass
Rcelestial / scale radiusthe body's radius
Ccoupling sum Σ w_kyour koSettings operator weights
Xexternal input `β
δdamping coefficientthe baseline damping constant

What it's for (and what it isn't)

functionalEnergy is a compact signature of a run — two runs with the same operators, mass, scale and forcing produce the same E, so it's a cheap way to compare or fingerprint solves. Its terms are printed in the register dump so you can see exactly what went into it.

It is not a physical energy and not a claim about nature — the energy field (mean(K + U)) is the conserved physical quantity; functionalEnergy is a derived characterization. It is model-defined: the Z factor is a chosen combination of the run's parameters, not a law. Read it as a run descriptor, not a measurement.

const r = await zeq.solve({ prompt: "…", mass: 5, location: "earth", koSettings: { NM19: 1 }, tMax: 5, dt: 0.01 });

r.functionalEnergy; // E = P_φ · Z for this run
r.functionalEnergyTerms; // { P_phi, Z, M, R, delta, C, X }
r.energy; // the conserved physical energy — separate