FAILURE MAP
← Case archive

FA-6381 / Discrete calculus / Open access

Simpson three point integral · case 01

Trapezoidal weights replace the quadratic-exact Simpson weights.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Trapezoidal weights replace the quadratic-exact Simpson weights.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(h*(y0+4*y1+y2),3))

Unsuccessful approach: The center weight and two-interval span are lost.

Case contract

Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. y0,y1,y2 are equally spaced samples separated by h>0; integrate over a span of 2*h. Exact operational definition: str(Fraction(h*(y0+4*y1+y2),3))

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Discrete calculus results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(y0, y1, y2, h):
    return str(Fraction(h*(y0+2*y1+y2),2))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 1, 4, 1)', solve(*(0, 1, 4, 1)), '8/3')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '6')
check('fixture 3: (1, 0, 1, 2)', solve(*(1, 0, 1, 2)), '4/3')
check('fixture 4: (0, 0, 0, 1)', solve(*(0, 0, 0, 1)), '0')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (0, 1, 4, 1)38/3Failed
fixture 2: (3, 3, 3, 1)66Passed
fixture 3: (1, 0, 1, 2)24/3Failed
fixture 4: (0, 0, 0, 1)00Passed

SHA-256 / 5b958920e0f71fc77305018938c18efe57e9fe8150610dc9b48e4b8a3473c8f5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(y0, y1, y2, h):
    return str(Fraction(h*(y0+y1+y2),3))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 1, 4, 1)', solve(*(0, 1, 4, 1)), '8/3')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '6')
check('fixture 3: (1, 0, 1, 2)', solve(*(1, 0, 1, 2)), '4/3')
check('fixture 4: (0, 0, 0, 1)', solve(*(0, 0, 0, 1)), '0')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (0, 1, 4, 1)5/38/3Failed
fixture 2: (3, 3, 3, 1)36Failed
fixture 3: (1, 0, 1, 2)4/34/3Passed
fixture 4: (0, 0, 0, 1)00Passed

SHA-256 / 9a6e652a8d1a89304d558ff4a0dc3107a50e3d96c3991729fd4d86158a8ac576

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(y0, y1, y2, h):
    return str(Fraction(h*(y0+4*y1+y2),3))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 1, 4, 1)', solve(*(0, 1, 4, 1)), '8/3')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '6')
check('fixture 3: (1, 0, 1, 2)', solve(*(1, 0, 1, 2)), '4/3')
check('fixture 4: (0, 0, 0, 1)', solve(*(0, 0, 0, 1)), '0')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: (0, 1, 4, 1)8/38/3Passed
fixture 2: (3, 3, 3, 1)66Passed
fixture 3: (1, 0, 1, 2)4/34/3Passed
fixture 4: (0, 0, 0, 1)00Passed

SHA-256 / cf3dd67673d4fb316893ecd6f14cd326772504e992ec3986a9fb083c8b9cf3df

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:01.210990+00:00.

Case digest / 798b3bac5c4f7ed6824fb261191698b8a0b9e5edc59f019b7186f43bad688a3c