The quadratic matrix equation at the heart of optimal control and estimation. Give it a linear plant and a quadratic cost, and it returns the one symmetric, positive-definite cost-to-go that steers the system home. This page solves the continuous algebraic Riccati equation live, from real logic, and lets a red team try to break it.
SOURCE J. Riccati (1720s), quadratic differential equation · algebraic form in optimal control: R. E. Kalman, “Contributions to the theory of optimal control,” Bol. Soc. Mat. Mex. 5:102–199 (1960). No stable open link — cited by author/title/year. Rendered, not quoted.
A constructed linear time-invariant plant — the double integrator — with a quadratic cost. Every number below is closed-form checkable.
Continuous ARE: AᵀP + PA − P·B·R⁻¹·Bᵀ·P + Q = 0. Solve for the unique symmetric positive-definite stabilizing P.
System: A = [[0,1],[0,0]] (poles 0,0), B = [0;1], Q = I, R = 1. Controllable & observable, so a stabilizing P exists and is unique.
Known solution: P = [[√3, 1],[1, √3]], gain K = [1, √3], closed loop at −√3/2 ± i/2.
The ARE is the continuous fixed point of the-bellman-equation: iterate the value recursion in continuous time and its limit is this equation.
It is the one equation that the-lqr regulator and the-kalman filter (its exact dual, on the estimation-error covariance) both solve — a quadratic recursion whose limit is the optimal quadratic cost.
Live re-check. It re-solves from Q, recomputes the true ARE residual (with the quadratic term intact) and confirms symmetry, positive-definiteness and a Hurwitz closed loop. If window 6 tampers, it flips red.
Plant matrix A
Steady state of the Riccati recursion Pₖ₊₁ = Pₖ + dt·(AᵀP+PA−PBR⁻¹BᵀP+Q), started from P₀=Q:
Proven, closed-form, to 1e−8:
The disclosed planted void: drop the quadratic term −PBR⁻¹BᵀP from the recursion, turning the ARE into a linear Lyapunov equation. The solved P then solves the wrong equation — its true ARE residual explodes. The witness (7) catches it live.