Skip to main content

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

f(E)=fr(E−Er)2+Γ2/4.f(E)=\frac{f_r}{(E-E_r)^2+\Gamma^2/4}.

Now the goal is to actually fit this formula to the data: find the values of ErE_r (resonance energy), frf_r (peak height), and Γ\Gamma (width) that minimize χ2\chi^2. Because f(E)f(E) is not linear in these three parameters, the χ2\chi^2-minimization conditions ∂χ2/∂am=0\partial\chi^2/\partial a_m=0 from 6.6 become nonlinear simultaneous equations — the closed-form linear-regression formulas no longer apply.

Rewriting the theory in fit-parameter notation​

Relabel a1=fra_1=f_r, a2=Era_2=E_r, a3=Γ2/4a_3=\Gamma^{2}/4 and x=Ex=E. The model, its three partials ∂g/∂am\partial g/\partial a_m, and the nonlinear residuals f1=f2=f3=0f_1=f_2=f_3=0 follow — pick each equation among lookalikes.

Stationarity of χ2\chi^{2} still means ∂χ2/∂am=0\partial\chi^{2}/\partial a_m=0; 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 a\mathbf a, build the Jacobian by forward differences, and update a←a+Δa\mathbf a\leftarrow\mathbf a+\Delta\mathbf a. Pick each equation among lookalikes.

  • Starting guesses matter. Because fr,Er,Γf_r,E_r,\Gamma 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 χ2\chi^2.
  • 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 Δa\Delta\mathbf a per step) and better initial guesses both help.
Quiz

Nonlinear least-squares fit

1 / 4

Why 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.

Next: 6.8b Nonlinear least-squares labs.