The solvers (COMPUTE)
Step 4 is where physics actually happens. computeByDomain(prefix, inputs, constants) in
shared/api-core/src/lib/zeqSolvers.ts dispatches the validated query, by domain prefix, to a
closed-form solver. Each solver evaluates a real equation over the constants bound in Step 2
and the inputs validated in Step 3, and returns a structured result — not a bare number:
{
value: 2954.0077, // the answer
unit: "m", // its physical dimension
uncertainty: 0.0, // propagated error
equation: "r_s = 2GM/c²", // the closed form used
detail: { G: 6.674e-11, M: 1.989e30, c: 299792458 } // the bound constants
}
The number, the unit, the uncertainty, and the equation it came from. A result that can't name its own equation isn't a Zeq result.
The dedicated solvers
There are roughly two dozen dedicated solvers. Each owns a band of physics and evaluates genuine closed forms — a representative selection:
| Solver | Domain | Representative equations |
|---|---|---|
solveZR | Zeq Resonance | R(t) = S(t)·[1 + α_K·sin(2π·f_H·t)] |
solveQM | Quantum Mechanics | particle-in-a-box Eₙ = n²π²ħ²/(2mL²) |
solveQR | Quantum Resonance | ω_r = 1/√(LC), Q = ω₀L/R |
solveWP | Wave Physics | v = λf, λ = c/f, k = 2π/λ |
solveCM | Classical Mechanics | F = ma, KE = ½mv², p = mv, F = Gm₁m₂/r² |
solvePlasma | Plasma Physics | electron plasma frequency ω_p = √(n_e e²/ε₀m_e) |
solveCrystal | Crystallography | Bragg λ = 2d·sinθ, cubic spacing d = a/√(h²+k²+l²) |
solveTD | Thermodynamics | ideal gas P = nRT/V, Stefan–Boltzmann j = σT⁴ |
solveEM | Electromagnetism | Coulomb F = q²/(4πε₀r²), Lorentz F = q(E + v×B) |
solveOM | Orbital Mechanics | r_s, v_orb = √(GM/r), T = 2π√(r³/GM) |
solveFD | Fluid Dynamics | Bernoulli, Reynolds Re = ρvL/μ |
solveSM | Statistical Mechanics | Fermi–Dirac n(E) = 1/(e^{(E−μ)/k_BT}+1) |
solveGR | General Relativity | Schwarzschild r_s = 2GM/c², gravitational redshift |
solveNU | Nuclear Physics | semi-empirical mass formula (binding energy) |
solveOP | Optics | E = hf, Snell n₁sinθ₁ = n₂sinθ₂, Fresnel reflection |
solveStructural | Materials / Structural | σ = F/A, ε = σ/E |
solvePP | Particle Physics | de Broglie λ = h/p, relativistic p = γmv |
Many solvers compute several related quantities and return the one that matches the input
signature — e.g. solveCM computes force, kinetic energy and momentum, and returns whichever
the supplied inputs ask for. Nothing is recalled from a table of pre-computed answers; the
Schwarzschild radius of the Sun is derived from r_s = 2GM/c² every time.
Worked example
curl -X POST https://zeqsdk.com/api/zeq/compute \
-H "Authorization: Bearer $ZEQ_KEY" \
-H "Content-Type: application/json" \
-d '{"operators":["GR37"],"inputs":{"mass":1.989e30}}'
solveGR binds G and c from CODATA 2018, takes M from your input, evaluates
r_s = 2GM/c², and returns 2954.0077 m. Run it on zeqsdk.com and again on
zeqond.com: same value, because both bind the same constants and run the same closed form.
Honest coverage
Not every catalogued domain has a dedicated closed-form solver, and the framework is explicit
about which is which. solverCoverage.ts classifies every registry category into one of four
honesty tiers, and a test cross-checks the registry against the solver dispatch so the
classification can't silently drift:
| Tier | Meaning | Count |
|---|---|---|
| Dedicated | Its own native closed-form physics | ~35 categories |
| Aliased | Routed to a defensible neighbour (e.g. exoplanet → statistical mechanics) | a few |
| Generic | Handled by the formula pattern-matcher solveGeneric | ~25 categories |
| Mismatch | Known prefix collisions, flagged for fixing, not hidden | 2 |
solveGeneric matches a query against ~16 universal formulas (E = hf, E = mc², V = IR,
p = mv, U = mgh, …) and returns a value when one fits. When nothing fits, it returns a
non-finite value with a diagnostic — which the VERIFY step
surfaces honestly as no_solution and marks unverifiable. It does not fabricate a
physical number for an operator it cannot solve.
This honesty is a feature, not an apology. A scientific tool that pretends to solve everything is untrustworthy; one that tells you exactly where its closed-form coverage ends is one you can build on. For authoritative values, compute against a node and verify the signed result.
The VX fallback
When a paid user exhausts their quota, the wizard degrades to VX mode (computeVX) rather
than hard-failing: it returns the Zeq Resonance ground state and marks the result
unverifiable. Free users over quota still receive a 429. VX is a graceful floor, clearly
labelled — never presented as a verified physical answer.
Read next
- Generative mathematics — how the solver's operator set becomes one printed equation
- Precision & proof — Step 5: how the result is checked and signed
- The operators reference — the full catalogue the prefixes index
The solver derives. It never recalls. And where it can't derive, it says so.