{"abstract":"Undamped oscillators are called stable although explicit Euler always gains energy on them.","category":"Physics integrator stability","checks":8,"contract":"solve(k, m, c, dt): classify explicit Euler on x'=v, v'=(-k*x-c*v)/m. Eigenvalues are the roots of s^2+(c/m)s+k/m; amplification is max |1+dt*lambda|. Return [\"marginal\" if |amp-1|<=1e-9, else \"stable\" if amp<1, else \"unstable\", amp rounded to 6].","contract_signature":"k, m, c, dt","evaluation_group":"w2-physics_integrator_stability-explicit-euler-stability","failed_approach":"Dropping the imaginary part of dt*lambda hides the oscillatory growth.","family":"w2-physics_integrator_stability-explicit-euler-stability-real-axis-criterion","id":"FA-86921","implementations":{"attempt":{"sha256":"b403bd752602e6f2b5f903d169695e788dbaf440deea4e1fcdaa9b0bb20b202b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(k, m, c, dt):\n    a = c / m\n    b = k / m\n    disc = a * a - 4 * b\n    if disc >= 0:\n        r = math.sqrt(disc)\n        lams = [complex((-a + r) / 2, 0), complex((-a - r) / 2, 0)]\n    else:\n        r = math.sqrt(-disc)\n        lams = [complex(-a / 2, r / 2), complex(-a / 2, -r / 2)]\n    amp = max(abs(1 + dt * lam.real) for lam in lams)\n    if abs(amp - 1) <= 1e-9:\n        label = 'marginal'\n    elif amp < 1:\n        label = 'stable'\n    else:\n        label = 'unstable'\n    return [label, round(amp, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[30.639, 3.582, 3.661, 0.4], ['unstable', 1.399912]], [[32.4, 3.038, 3.326, 0.2], ['unstable', 1.098925]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[11.082, 0.828, 5.406, 0.8], ['unstable', 2.083893]], [[38.284, 3.135, 4.579, 0.2], ['unstable', 1.093778]], [[42.221, 2.418, 7.819, 0.01], ['stable', 0.984586]]], [[[50.892, 1.977, 6.092, 0.8], ['unstable', 3.874242]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[0.0, 2.92, 3.001, 0.1], ['marginal', 1.0]], [[2.124, 2.111, 2.83, 0.8], ['stable', 0.755952]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[1.0, 1.0, 3.0, 0.1], ['stable', 0.961803]], [[8.452, 3.883, 5.856, 0.4], ['stable', 0.863147]]], [[[7.364, 1.8, 2.173, 0.1], ['stable', 0.959265]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[14.137, 0.782, 5.45, 1.0], ['unstable', 3.479755]], [[33.332, 2.078, 0.851, 0.05], ['unstable', 1.009765]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[34.941, 2.954, 0.853, 0.2], ['unstable', 1.189699]], [[26.203, 2.441, 7.403, 0.4], ['unstable', 1.226546]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]]], [[[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[0.0, 3.727, 0.555, 0.2], ['marginal', 1.0]], [[59.202, 0.85, 4.717, 0.1], ['unstable', 1.068435]], [[25.042, 3.597, 6.989, 0.1], ['stable', 0.935584]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[32.965, 3.721, 3.681, 0.1], ['stable', 0.99482]], [[28.743, 3.175, 4.507, 0.8], ['unstable', 2.378706]]], [[[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[36.647, 2.751, 2.545, 0.01], ['stable', 0.996033]], [[22.607, 3.348, 6.875, 0.2], ['stable', 0.92704]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[14.174, 2.424, 0.649, 0.8], ['unstable', 2.127938]], [[1.0, 1.0, 3.0, 0.1], ['stable', 0.961803]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[29.176, 2.254, 7.792, 0.01], ['stable', 0.983222]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"740f11e96eaf2ad83da7d4ecd3532ee5b24490ba2b585e86080fe3618d1a3341","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(k, m, c, dt):\n    a = c / m\n    b = k / m\n    disc = a * a - 4 * b\n    if disc >= 0:\n        r = math.sqrt(disc)\n        lams = [complex((-a + r) / 2, 0), complex((-a - r) / 2, 0)]\n    else:\n        r = math.sqrt(-disc)\n        lams = [complex(-a / 2, r / 2), complex(-a / 2, -r / 2)]\n    amp = max(abs(dt * lam) / 2 for lam in lams)\n    if abs(amp - 1) <= 1e-9:\n        label = 'marginal'\n    elif amp < 1:\n        label = 'stable'\n    else:\n        label = 'unstable'\n    return [label, round(amp, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[30.639, 3.582, 3.661, 0.4], ['unstable', 1.399912]], [[32.4, 3.038, 3.326, 0.2], ['unstable', 1.098925]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[11.082, 0.828, 5.406, 0.8], ['unstable', 2.083893]], [[38.284, 3.135, 4.579, 0.2], ['unstable', 1.093778]], [[42.221, 2.418, 7.819, 0.01], ['stable', 0.984586]]], [[[50.892, 1.977, 6.092, 0.8], ['unstable', 3.874242]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[0.0, 2.92, 3.001, 0.1], ['marginal', 1.0]], [[2.124, 2.111, 2.83, 0.8], ['stable', 0.755952]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[1.0, 1.0, 3.0, 0.1], ['stable', 0.961803]], [[8.452, 3.883, 5.856, 0.4], ['stable', 0.863147]]], [[[7.364, 1.8, 2.173, 0.1], ['stable', 0.959265]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[14.137, 0.782, 5.45, 1.0], ['unstable', 3.479755]], [[33.332, 2.078, 0.851, 0.05], ['unstable', 1.009765]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[34.941, 2.954, 0.853, 0.2], ['unstable', 1.189699]], [[26.203, 2.441, 7.403, 0.4], ['unstable', 1.226546]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]]], [[[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[0.0, 3.727, 0.555, 0.2], ['marginal', 1.0]], [[59.202, 0.85, 4.717, 0.1], ['unstable', 1.068435]], [[25.042, 3.597, 6.989, 0.1], ['stable', 0.935584]], [[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[32.965, 3.721, 3.681, 0.1], ['stable', 0.99482]], [[28.743, 3.175, 4.507, 0.8], ['unstable', 2.378706]]], [[[0.0, 2.0, 1.0, 0.1], ['marginal', 1.0]], [[36.647, 2.751, 2.545, 0.01], ['stable', 0.996033]], [[22.607, 3.348, 6.875, 0.2], ['stable', 0.92704]], [[0.0, 1.0, 2.0008, 1.0], ['unstable', 1.0008]], [[14.174, 2.424, 0.649, 0.8], ['unstable', 2.127938]], [[1.0, 1.0, 3.0, 0.1], ['stable', 0.961803]], [[0.0, 1.0, 1.0, 0.5], ['marginal', 1.0]], [[29.176, 2.254, 7.792, 0.01], ['stable', 0.983222]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %d\" % i, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with stipulated toy conventions and rounded float output; not a production physics engine or a proof of numerical stability. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-physics_integrator_stability-explicit-euler-stability-real-axis-criterion","generated_at":"2026-09-29T14:50:53.995472+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Game and robotics physics loops depend on integrator update order, step control and stabilization terms; a wrong decision point turns a stable simulation into drifting or exploding motion.","root_cause":"Amplification is replaced by |dt*lambda|/2, the interval test valid only for negative real eigenvalues.","sha256":"df655fa35514b50e17b6c9ed77494a01d5a61ae385b85219a935dce67561f13b","title":"Complex eigenvalues are tested with the real-axis step criterion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.978,"exit_code":1,"observations":[{"actual":["marginal",1.0],"check":"case 0","expected":["marginal",1.0],"passed":true},{"actual":["stable",0.795589],"check":"case 1","expected":["unstable",1.399912],"passed":false},{"actual":["stable",0.89052],"check":"case 2","expected":["unstable",1.098925],"passed":false},{"actual":["marginal",1.0],"check":"case 3","expected":["marginal",1.0],"passed":true},{"actual":["unstable",1.0008],"check":"case 4","expected":["unstable",1.0008],"passed":true},{"actual":["unstable",1.611594],"check":"case 5","expected":["unstable",2.083893],"passed":false},{"actual":["stable",0.853939],"check":"case 6","expected":["unstable",1.093778],"passed":false},{"actual":["stable",0.983832],"check":"case 7","expected":["stable",0.984586],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [\"marginal\", 1.0], \"expected\": [\"marginal\", 1.0], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [\"stable\", 0.795589], \"expected\": [\"unstable\", 1.399912], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [\"stable\", 0.89052], \"expected\": [\"unstable\", 1.098925], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [\"marginal\", 1.0], \"expected\": [\"marginal\", 1.0], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [\"unstable\", 1.0008], \"expected\": [\"unstable\", 1.0008], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [\"unstable\", 1.611594], \"expected\": [\"unstable\", 2.083893], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [\"stable\", 0.853939], \"expected\": [\"unstable\", 1.093778], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [\"stable\", 0.983832], \"expected\": [\"stable\", 0.984586], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.634,"exit_code":1,"observations":[{"actual":["stable",0.25],"check":"case 0","expected":["marginal",1.0],"passed":false},{"actual":["stable",0.584931],"check":"case 1","expected":["unstable",1.399912],"passed":false},{"actual":["stable",0.326572],"check":"case 2","expected":["unstable",1.098925],"passed":false},{"actual":["stable",0.025],"check":"case 3","expected":["marginal",1.0],"passed":false},{"actual":["unstable",1.0004],"check":"case 4","expected":["unstable",1.0008],"passed":false},{"actual":["unstable",1.463369],"check":"case 5","expected":["unstable",2.083893],"passed":false},{"actual":["stable",0.349454],"check":"case 6","expected":["unstable",1.093778],"passed":false},{"actual":["stable",0.020893],"check":"case 7","expected":["stable",0.984586],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [\"stable\", 0.25], \"expected\": [\"marginal\", 1.0], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [\"stable\", 0.584931], \"expected\": [\"unstable\", 1.399912], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [\"stable\", 0.326572], \"expected\": [\"unstable\", 1.098925], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [\"stable\", 0.025], \"expected\": [\"marginal\", 1.0], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [\"unstable\", 1.0004], \"expected\": [\"unstable\", 1.0008], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [\"unstable\", 1.463369], \"expected\": [\"unstable\", 2.083893], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [\"stable\", 0.349454], \"expected\": [\"unstable\", 1.093778], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [\"stable\", 0.020893], \"expected\": [\"stable\", 0.984586], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}