{"abstract":"The combined step is only first order accurate.","category":"Physics integrator stability","checks":8,"contract":"solve(x0, v0, k, c, F, wf, dt, steps): unit mass x''=-k*x-c*v+F*cos(wf*t) with wf in rad/s, t starting at 0, integrated with classical RK4. Return [x, v, t] rounded to 6.","contract_signature":"x0, v0, k, c, F, wf, dt, steps","evaluation_group":"w2-physics_integrator_stability-forced-oscillator-rk4","failed_approach":"Doubling the endpoint slopes instead of the midpoints inverts Simpson weights.","family":"w2-physics_integrator_stability-forced-oscillator-rk4-stage-weights","id":"FA-87016","implementations":{"attempt":{"sha256":"56f9b4b54b4f06dccb32a2d8cd26bdad2693b58b2b87ecdced797bf5e38ff956","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t + dt / 2, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt * k3x, v + dt * k3v)\n        x = x + dt / 6 * (2 * k1x + k2x + k3x + 2 * k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.488, -0.59, 18.046, 0.065, 1.27, 1.284, 0.2, 3], [-0.348659, -0.553321, 0.6]], [[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]], [[0.043, -0.274, 12.514, 0.941, 1.718, 1.943, 0.1, 6], [0.088471, 0.195664, 0.6]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[0.882, 0.468, 0.596, 1.065, 0.599, 2.931, 0.2, 6], [0.969734, -0.430672, 1.2]], [[-0.156, 0.405, 4.019, 0.13, 0.809, 3.428, 0.1, 5], [0.148937, 0.625786, 0.5]], [[-0.435, 0.18, 4.535, 0.378, 1.241, 0.995, 0.2, 6], [0.675696, 0.34121, 1.2]]], [[[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]], [[-0.314, -0.856, 15.027, 0.039, 0.971, 3.038, 0.1, 4], [-0.172381, 1.364757, 0.4]], [[-0.876, -0.199, 5.264, 1.176, 0.534, 2.649, 0.1, 3], [-0.724871, 1.082023, 0.3]], [[-0.827, 0.717, 1.853, 0.324, 0.414, 2.766, 0.05, 3], [-0.701343, 0.949832, 0.15]], [[-0.541, -0.377, 16.521, 1.005, 0.304, 1.061, 0.05, 7], [-0.191246, 1.884299, 0.35]], [[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]]], [[[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[-0.346, -0.2, 8.452, 1.354, 0.585, 4.532, 0.1, 9], [0.091625, 0.239009, 0.9]], [[0.704, 0.002, 17.554, 0.361, 1.232, 1.599, 0.05, 4], [0.499246, -1.906948, 0.2]], [[0.722, 0.536, 7.744, 0.165, 1.679, 3.18, 0.05, 5], [0.724479, -0.530907, 0.25]], [[0.389, 0.616, 7.403, 1.127, 1.629, 2.121, 0.2, 1], [0.470821, 0.193297, 0.2]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]], [[-0.314, 0.869, 7.658, 1.211, 1.937, 0.965, 0.05, 3], [-0.152866, 1.236835, 0.15]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]]], [[[0.612, -0.071, 18.951, 0.15, 1.941, 3.737, 0.05, 10], [-0.235385, -2.074863, 0.5]], [[0.28, 0.052, 4.066, 1.361, 0.882, 2.789, 0.2, 1], [0.283811, -0.015909, 0.2]], [[0.561, -0.998, 18.692, 1.273, 1.093, 2.216, 0.2, 6], [0.099116, 0.552827, 1.2]], [[-0.167, -0.626, 6.981, 0.788, 1.493, 3.024, 0.2, 4], [0.018342, 0.36187, 0.8]], [[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[0.962, 0.482, 3.289, 0.436, 1.4, 4.793, 0.05, 12], [0.785086, -1.262878, 0.6]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]]], [[[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]], [[0.0, 0.489, 9.543, 0.742, 1.537, 3.108, 0.1, 13], [-0.277379, -0.761947, 1.3]], [[0.163, 0.02, 4.507, 0.115, 0.982, 3.557, 0.1, 3], [0.175188, 0.032334, 0.3]], [[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[0.949, -0.613, 14.001, 1.335, 0.724, 4.136, 0.1, 10], [-0.470021, 0.99105, 1.0]], [[0.207, 0.017, 8.404, 1.117, 1.656, 2.196, 0.05, 4], [0.207866, -0.012779, 0.2]], [[0.476, 0.606, 16.115, 1.076, 0.293, 2.306, 0.2, 1], [0.443713, -0.858349, 0.2]]]]\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":"fdf5fd6fccc135fb039aba31af8a0239b905f75a9de5d488a17f60882f2046ce","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x0, v0, k, c, F, wf, dt, steps):\n    def f(t, x, v):\n        return v, -k * x - c * v + F * math.cos(wf * t)\n    t = 0.0\n    x, v = x0, v0\n    for _ in range(steps):\n        k1x, k1v = f(t, x, v)\n        k2x, k2v = f(t + dt / 2, x + dt / 2 * k1x, v + dt / 2 * k1v)\n        k3x, k3v = f(t + dt / 2, x + dt / 2 * k2x, v + dt / 2 * k2v)\n        k4x, k4v = f(t + dt, x + dt * k3x, v + dt * k3v)\n        x = x + dt / 4 * (k1x + k2x + k3x + k4x)\n        v = v + dt / 6 * (k1v + 2 * k2v + 2 * k3v + k4v)\n        t = t + dt\n    return [round(x, 6), round(v, 6), round(t, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[0.594, 0.724, 5.574, 1.414, 0.54, 2.544, 0.2, 5], [0.050911, -1.000788, 1.0]], [[0.488, -0.59, 18.046, 0.065, 1.27, 1.284, 0.2, 3], [-0.348659, -0.553321, 0.6]], [[-0.109, -0.682, 16.643, 0.151, 1.208, 3.199, 0.05, 3], [-0.171504, -0.13078, 0.15]], [[0.043, -0.274, 12.514, 0.941, 1.718, 1.943, 0.1, 6], [0.088471, 0.195664, 0.6]], [[0.477, 0.804, 9.463, 0.795, 0.343, 4.866, 0.2, 1], [0.539279, -0.178827, 0.2]], [[0.882, 0.468, 0.596, 1.065, 0.599, 2.931, 0.2, 6], [0.969734, -0.430672, 1.2]], [[-0.156, 0.405, 4.019, 0.13, 0.809, 3.428, 0.1, 5], [0.148937, 0.625786, 0.5]], [[-0.435, 0.18, 4.535, 0.378, 1.241, 0.995, 0.2, 6], [0.675696, 0.34121, 1.2]]], [[[-0.926, 0.952, 5.429, 0.55, 1.365, 4.948, 0.2, 1], [-0.633361, 1.884933, 0.2]], [[-0.032, 0.808, 18.227, 0.749, 0.437, 3.703, 0.1, 1], [0.04836, 0.775101, 0.1]], [[-0.314, -0.856, 15.027, 0.039, 0.971, 3.038, 0.1, 4], [-0.172381, 1.364757, 0.4]], [[-0.876, -0.199, 5.264, 1.176, 0.534, 2.649, 0.1, 3], [-0.724871, 1.082023, 0.3]], [[-0.827, 0.717, 1.853, 0.324, 0.414, 2.766, 0.05, 3], [-0.701343, 0.949832, 0.15]], [[-0.541, -0.377, 16.521, 1.005, 0.304, 1.061, 0.05, 7], [-0.191246, 1.884299, 0.35]], [[0.35, 0.024, 2.459, 0.489, 1.678, 3.184, 0.2, 2], [0.401172, 0.137673, 0.4]], [[-0.492, -0.144, 14.57, 1.424, 1.521, 1.605, 0.05, 3], [-0.421761, 1.012157, 0.15]]], [[[-0.571, 0.019, 10.668, 1.333, 0.813, 4.88, 0.1, 10], [0.238859, -0.217571, 1.0]], [[-0.346, -0.2, 8.452, 1.354, 0.585, 4.532, 0.1, 9], [0.091625, 0.239009, 0.9]], [[0.704, 0.002, 17.554, 0.361, 1.232, 1.599, 0.05, 4], [0.499246, -1.906948, 0.2]], [[0.722, 0.536, 7.744, 0.165, 1.679, 3.18, 0.05, 5], [0.724479, -0.530907, 0.25]], [[0.389, 0.616, 7.403, 1.127, 1.629, 2.121, 0.2, 1], [0.470821, 0.193297, 0.2]], [[0.156, -0.808, 12.089, 0.635, 0.926, 3.013, 0.05, 7], [-0.092465, -0.474045, 0.35]], [[-0.314, 0.869, 7.658, 1.211, 1.937, 0.965, 0.05, 3], [-0.152866, 1.236835, 0.15]], [[-0.394, 0.849, 18.783, 1.27, 1.837, 1.788, 0.1, 10], [0.047492, -1.406422, 1.0]]], [[[0.612, -0.071, 18.951, 0.15, 1.941, 3.737, 0.05, 10], [-0.235385, -2.074863, 0.5]], [[0.28, 0.052, 4.066, 1.361, 0.882, 2.789, 0.2, 1], [0.283811, -0.015909, 0.2]], [[0.561, -0.998, 18.692, 1.273, 1.093, 2.216, 0.2, 6], [0.099116, 0.552827, 1.2]], [[-0.167, -0.626, 6.981, 0.788, 1.493, 3.024, 0.2, 4], [0.018342, 0.36187, 0.8]], [[-0.772, 0.752, 2.823, 0.497, 1.621, 2.92, 0.1, 6], [0.065151, 1.550767, 0.6]], [[-0.198, -0.028, 4.048, 0.079, 1.642, 1.588, 0.2, 8], [0.361524, -1.100738, 1.6]], [[0.962, 0.482, 3.289, 0.436, 1.4, 4.793, 0.05, 12], [0.785086, -1.262878, 0.6]], [[-0.484, -0.908, 18.372, 0.481, 1.964, 2.315, 0.2, 2], [-0.051507, 2.343495, 0.4]]], [[[-0.341, 0.921, 14.484, 0.78, 0.993, 4.954, 0.1, 11], [-0.092121, -0.961694, 1.1]], [[0.0, 0.489, 9.543, 0.742, 1.537, 3.108, 0.1, 13], [-0.277379, -0.761947, 1.3]], [[0.163, 0.02, 4.507, 0.115, 0.982, 3.557, 0.1, 3], [0.175188, 0.032334, 0.3]], [[0.96, 0.368, 6.136, 0.868, 0.713, 4.277, 0.1, 13], [-0.632372, -0.226167, 1.3]], [[0.48, 0.991, 13.504, 0.938, 1.754, 1.99, 0.2, 8], [-0.112907, 0.598276, 1.6]], [[0.949, -0.613, 14.001, 1.335, 0.724, 4.136, 0.1, 10], [-0.470021, 0.99105, 1.0]], [[0.207, 0.017, 8.404, 1.117, 1.656, 2.196, 0.05, 4], [0.207866, -0.012779, 0.2]], [[0.476, 0.606, 16.115, 1.076, 0.293, 2.306, 0.2, 1], [0.443713, -0.858349, 0.2]]]]\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-forced-oscillator-rk4-stage-weights","generated_at":"2026-09-29T14:50:54.762639+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":"Position update uses dt/4*(k1+k2+k3+k4).","sha256":"786ef0158504998b519dbeb3595df4186fb67d40ce11de2b8151d35e28980de0","title":"RK4 position update weights all stages equally · 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":38.923,"exit_code":1,"observations":[{"actual":[0.055994,-1.011184,1.0],"check":"case 0","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[-0.334467,-0.649806,0.6],"check":"case 1","expected":[-0.348659,-0.553321,0.6],"passed":false},{"actual":[-0.171442,-0.130865,0.15],"check":"case 2","expected":[-0.171504,-0.13078,0.15],"passed":false},{"actual":[0.087743,0.197211,0.6],"check":"case 3","expected":[0.088471,0.195664,0.6],"passed":false},{"actual":[0.541141,-0.178827,0.2],"check":"case 4","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[0.969484,-0.430509,1.2],"check":"case 5","expected":[0.969734,-0.430672,1.2],"passed":false},{"actual":[0.14811,0.626356,0.5],"check":"case 6","expected":[0.148937,0.625786,0.5],"passed":false},{"actual":[0.672197,0.356196,1.2],"check":"case 7","expected":[0.675696,0.34121,1.2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0.055994, -1.011184, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [-0.334467, -0.649806, 0.6], \"expected\": [-0.348659, -0.553321, 0.6], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [-0.171442, -0.130865, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.087743, 0.197211, 0.6], \"expected\": [0.088471, 0.195664, 0.6], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.541141, -0.178827, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [0.969484, -0.430509, 1.2], \"expected\": [0.969734, -0.430672, 1.2], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [0.14811, 0.626356, 0.5], \"expected\": [0.148937, 0.625786, 0.5], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [0.672197, 0.356196, 1.2], \"expected\": [0.675696, 0.34121, 1.2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.786,"exit_code":1,"observations":[{"actual":[0.053438,-1.005973,1.0],"check":"case 0","expected":[0.050911,-1.000788,1.0],"passed":false},{"actual":[-0.341792,-0.601343,0.6],"check":"case 1","expected":[-0.348659,-0.553321,0.6],"passed":false},{"actual":[-0.171473,-0.130822,0.15],"check":"case 2","expected":[-0.171504,-0.13078,0.15],"passed":false},{"actual":[0.088107,0.196437,0.6],"check":"case 3","expected":[0.088471,0.195664,0.6],"passed":false},{"actual":[0.54021,-0.178827,0.2],"check":"case 4","expected":[0.539279,-0.178827,0.2],"passed":false},{"actual":[0.969609,-0.430591,1.2],"check":"case 5","expected":[0.969734,-0.430672,1.2],"passed":false},{"actual":[0.148524,0.626071,0.5],"check":"case 6","expected":[0.148937,0.625786,0.5],"passed":false},{"actual":[0.673961,0.348688,1.2],"check":"case 7","expected":[0.675696,0.34121,1.2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [0.053438, -1.005973, 1.0], \"expected\": [0.050911, -1.000788, 1.0], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [-0.341792, -0.601343, 0.6], \"expected\": [-0.348659, -0.553321, 0.6], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [-0.171473, -0.130822, 0.15], \"expected\": [-0.171504, -0.13078, 0.15], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [0.088107, 0.196437, 0.6], \"expected\": [0.088471, 0.195664, 0.6], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [0.54021, -0.178827, 0.2], \"expected\": [0.539279, -0.178827, 0.2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [0.969609, -0.430591, 1.2], \"expected\": [0.969734, -0.430672, 1.2], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [0.148524, 0.626071, 0.5], \"expected\": [0.148937, 0.625786, 0.5], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [0.673961, 0.348688, 1.2], \"expected\": [0.675696, 0.34121, 1.2], \"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."}}