Make a calculation reproducible
Name variables with units, keep inputs separate, and test against simple cases with known answers. A program that runs without errors can still implement the wrong equation.
Opening Lilerno
Chapter 08 · Guided self-study
Intro + external course studyBuild and validate a small engineering calculation.
Build the idea
An original introduction, worked example and practice, followed by a curated reading sequence. The external courses supply deeper teaching and problem sets.
This guide is an orientation, not a complete university module. Practical work needs suitable facilities, safety review and supervision.
Start with these prerequisites
Shared science foundations
A numerical result is a model plus an algorithm plus input data. Learn to expose and test all three before trusting the output.
Module lens
A numerical method becomes evidence when refinement can be compared with an exact or independently checked result.
Name variables with units, keep inputs separate, and test against simple cases with known answers. A program that runs without errors can still implement the wrong equation.
Numerical integration replaces a continuous curve with approximations. Compare multiple step sizes and an analytic solution when available. Convergence of one quantity does not verify boundary conditions or the underlying physics.
See the relationship
Change one quantity, watch the graph respond, then explain the result in your own words.
Predict → change → explain
Double the number of intervals. How does the integration error change?
Axes: x → f(x). Bounds may rescale when inputs change.
Integral ≈ 0.375; absolute error = 0.04167.
Composite trapezoidal integration of f(x) = x² on [0,1]. Dimensionless analytic reference = 1/3.
Original Lilerno illustration. Inputs are illustrative; this is not experimental evidence or a design rating.
| Series | x | f(x) |
|---|---|---|
| Exact curve | 0 | 0 |
| Exact curve | 0.0125 | 0.0001563 |
| Exact curve | 0.025 | 0.000625 |
| Exact curve | 0.0375 | 0.001406 |
| Exact curve | 0.05 | 0.0025 |
| Exact curve | 0.0625 | 0.003906 |
| Exact curve | 0.075 | 0.005625 |
| Exact curve | 0.0875 | 0.007656 |
| Exact curve | 0.1 | 0.01 |
| Exact curve | 0.1125 | 0.01266 |
| Exact curve | 0.125 | 0.01563 |
| Exact curve | 0.1375 | 0.01891 |
| Exact curve | 0.15 | 0.0225 |
| Exact curve | 0.1625 | 0.02641 |
| Exact curve | 0.175 | 0.03062 |
| Exact curve | 0.1875 | 0.03516 |
| Exact curve | 0.2 | 0.04 |
| Exact curve | 0.2125 | 0.04516 |
| Exact curve | 0.225 | 0.05063 |
| Exact curve | 0.2375 | 0.05641 |
| Exact curve | 0.25 | 0.0625 |
| Exact curve | 0.2625 | 0.06891 |
| Exact curve | 0.275 | 0.07563 |
| Exact curve | 0.2875 | 0.08266 |
| Exact curve | 0.3 | 0.09 |
| Exact curve | 0.3125 | 0.09766 |
| Exact curve | 0.325 | 0.1056 |
| Exact curve | 0.3375 | 0.1139 |
| Exact curve | 0.35 | 0.1225 |
| Exact curve | 0.3625 | 0.1314 |
| Exact curve | 0.375 | 0.1406 |
| Exact curve | 0.3875 | 0.1502 |
| Exact curve | 0.4 | 0.16 |
| Exact curve | 0.4125 | 0.1702 |
| Exact curve | 0.425 | 0.1806 |
| Exact curve | 0.4375 | 0.1914 |
| Exact curve | 0.45 | 0.2025 |
| Exact curve | 0.4625 | 0.2139 |
| Exact curve | 0.475 | 0.2256 |
| Exact curve | 0.4875 | 0.2377 |
| Exact curve | 0.5 | 0.25 |
| Exact curve | 0.5125 | 0.2627 |
| Exact curve | 0.525 | 0.2756 |
| Exact curve | 0.5375 | 0.2889 |
| Exact curve | 0.55 | 0.3025 |
| Exact curve | 0.5625 | 0.3164 |
| Exact curve | 0.575 | 0.3306 |
| Exact curve | 0.5875 | 0.3452 |
| Exact curve | 0.6 | 0.36 |
| Exact curve | 0.6125 | 0.3752 |
| Exact curve | 0.625 | 0.3906 |
| Exact curve | 0.6375 | 0.4064 |
| Exact curve | 0.65 | 0.4225 |
| Exact curve | 0.6625 | 0.4389 |
| Exact curve | 0.675 | 0.4556 |
| Exact curve | 0.6875 | 0.4727 |
| Exact curve | 0.7 | 0.49 |
| Exact curve | 0.7125 | 0.5077 |
| Exact curve | 0.725 | 0.5256 |
| Exact curve | 0.7375 | 0.5439 |
| Exact curve | 0.75 | 0.5625 |
| Exact curve | 0.7625 | 0.5814 |
| Exact curve | 0.775 | 0.6006 |
| Exact curve | 0.7875 | 0.6202 |
| Exact curve | 0.8 | 0.64 |
| Exact curve | 0.8125 | 0.6602 |
| Exact curve | 0.825 | 0.6806 |
| Exact curve | 0.8375 | 0.7014 |
| Exact curve | 0.85 | 0.7225 |
| Exact curve | 0.8625 | 0.7439 |
| Exact curve | 0.875 | 0.7656 |
| Exact curve | 0.8875 | 0.7877 |
| Exact curve | 0.9 | 0.81 |
| Exact curve | 0.9125 | 0.8327 |
| Exact curve | 0.925 | 0.8556 |
| Exact curve | 0.9375 | 0.8789 |
| Exact curve | 0.95 | 0.9025 |
| Exact curve | 0.9625 | 0.9264 |
| Exact curve | 0.975 | 0.9506 |
| Exact curve | 0.9875 | 0.9752 |
| Exact curve | 1 | 1 |
| Trapezoids | 0 | 0 |
| Trapezoids | 0.5 | 0.25 |
| Trapezoids | 1 | 1 |
Save your place when you finish reading.
Original Lilerno example
Approximate the integral of f(x) = x² from 0 to 1 with one trapezoid.
Evaluate f(0) = 0 and f(1) = 1.
Width × average endpoint height = 1 × (0 + 1)/2 = 0.5.
Compare with the exact integral 1/3.
The absolute error is 1/6; subdivide before claiming accuracy.
Test the model
Open learning, traceable sources
Work in this order. These links open the publisher’s material; free access does not always permit republication.
MIT OpenCourseWare · Fall 2014
Start with: Programming, integration, root finding and numerical error
Follow the numerical methods materials. The source uses MATLAB; reimplement simple exercises in a language you already have rather than installing a large stack.
Recall, then record
Close the explanation and answer these in your own words. Return tomorrow, then again later in the week.
What is your reference answer?
Does convergence prove the model?
Which inputs carry units?
Tabulate an integral approximation at 1, 2, 4 and 8 intervals. Record the algorithm and compare with an exact result.
Self-reported tasks, not an assessment of mastery or university credit. Reading a page does not complete a chapter.
Loading local record…
Open learning, traceable sources
Original Lilerno lessons and diagrams, supported by these references. Free access does not always permit republication. Links open the publisher’s material.
Programming, numerical solutions, linear algebra, and probability. Source assignments use MATLAB.
CC BY-NC-SA, except marked exceptions; external study only.
Open source ↗Rights / publisher record ↗