6.8b Nonlinear least-squares labs
Source: Lab ideas from Computational Physics (Landau, Páez, Bordeianu), §6.8. Rewritten as original drills. Continues 6.8 Nonlinear fit to a resonance.
Build the pieces of a Breit-Wigner nonlinear fit one at a time: residuals, a finite-difference Jacobian entry, and a Newton-Raphson correction step. Stubs fail until filled in.
Fixed data
Table 6.1: E = [0,25,50,75,100,125,150,175,200], sigma = [10.6,16.0,45.0,83.5,52.8,19.9,10.8,8.25,4.7] (used as here, ).
Formula refresh
Warm up: pick the matching equation among lookalikes (same walk as the theory lesson).
Labs
Activity: Residual f1 at a guess
Implement and the residual
over the fixed Table 6.1 data.
Input: a1 a2 a3. Print with 6 decimals.