Compare a numerical rule's estimate to the true integral and report the absolute, relative, and percentage errors: abs_err = |rule - true| rel_err = abs_err / |true| pct_err = 100 * rel_err. Example: trap=1/2, true=1/3 gives abs=1/6≈0.166667, rel=1/2=0.500000, pct=50.000000.

Example

Compute the absolute error and convert the relative error to a percent. This value is the absolute error measured against the known exact answer, not a proven upper bound, even where a step labels it an error bound.

highlighted = computed this step

Step 1 — Set up

Compare the trapezoid estimate with the true integral.

T=12I=13T= \frac{1}{2} \quad I= \frac{1}{3}

Step 2 — Trapezoid error bound

Apply the trapezoid error bound.

B=112212=16B=\frac{ 1 \cdot 1 ^{ 2 }\cdot 2 }{ 12 }= \hlmath{\frac{1}{6}}

Step 3 — Relative error

Divide absolute error by the true value.

rel=16÷13=12rel= \frac{1}{6} \div \frac{1}{3} = \hlmath{\frac{1}{2}}

Step 4 — Percent error

Convert relative error to a percent.

pct=12100=50%pct= \frac{1}{2} \cdot 100 = \hl{50} \%
integration-error The absolute error is the magnitude of the difference between the numerical estimate and the true (exact) integral. The relative error normalises by the true value. Percentage error is relative error × 100.