6.8 Nonlinear fit to a resonance
Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §6.8. Rewritten in original wording. Continues 6.6b Least-squares fitting labs. Labs: 6.8b Nonlinear least-squares labs.
When least squares stops being linear algebra
Back in 6.5 the neutron cross-section table (Table 6.1) was interpolated without ever using the theory behind it — the Breit–Wigner resonance formula
Now the goal is to actually fit this formula to the data: find the values of (resonance energy), (peak height), and (width) that minimize . Because is not linear in these three parameters, the -minimization conditions from 6.6 become nonlinear simultaneous equations — the closed-form linear-regression formulas no longer apply.
Rewriting the theory in fit-parameter notation
Relabel , , and . The model, its three partials , and the nonlinear residuals follow — pick each equation among lookalikes.
Stationarity of still means ; for Breit–Wigner that is exactly the residual system above. Walk the stationarity logic once more if you want the abstract form.
Newton-Raphson in three dimensions
Linearize the three residuals about a guess , build the Jacobian by forward differences, and update . Pick each equation among lookalikes.
Practical notes on the search
- Starting guesses matter. Because each have direct physical meaning (peak height, peak location, full width at half maximum), a rough graph of the data gives good starting values — much better than an arbitrary guess.
- Local vs. global minima. Newton-Raphson only guarantees convergence to a root, not necessarily the best one. Repeat the search from a grid of different starting guesses; if different searches converge to different minima, keep the one with the lowest .
- Ill-conditioning is common. Parameters that affect the fit weakly (or that are strongly correlated with another parameter) make the Jacobian nearly singular, producing wild, unstable correction steps. This is a real hazard of nonlinear fitting, not just a bug — backtracking (accepting only a fraction of per step) and better initial guesses both help.
Nonlinear least-squares fit
1 / 4Why can the Breit-Wigner fit not use the closed-form linear-regression formulas from 6.6?
Pick an answer to see if you are right.