# Computational Physics

## Errata

### Errata to versions 2.0+1.0

• Equations (14.77) - (14.80): Lower limit of integration is $$-\infty$$: $$\int_{\infty}^{+\infty} \changeto \int_{-\infty}^{+\infty}$$
• Problem 4.4: Case (c) is to be worked out only numerically and not to be compared with an analytic solution.

### Errata to versions 1.0

(Fortran edition, found in the printed versions, vol. I and vol. II. Corrected in version 1.1 or higher.)
• 12 lines after Equation (3.15): $$0\le |f'(x_2)|=|2-r|<1 \changeto 0\le |f'(x_2^*)|=|2-r|<1$$
• 6 lines after Equation (3.18): $$f^{(2)}{}'(x_{4}^2)= 1 \changeto f^{(2)}{}'(x_{4}^*)= 1$$
• Page 150, line 4: $$r_c^{(2)} < r< r_c^{(3)}\approx 3.5441 \changeto r_c^{(3)} < r < r_c^{(4)} \approx 3.5441$$
• Before Equation (3.36): $$\lambda=\lim\limits_{n\to\infty}\lim\limits_{\epsilon\to 0}|\Delta x_n|/\epsilon \changeto \lambda=\lim\limits_{n\to\infty}\lim\limits_{\epsilon\to 0}\frac{1}{n}\ln |\Delta x_n|/\epsilon$$
• Equation (3.36): $$\tilde x_2 = f(\tilde x_1) = f(x_0 + \epsilon f'(x_0)) \changeto \tilde x_2 = f(\tilde x_1) = f(x_1 + \epsilon f'(x_0))$$
• Equation (3.36): $$\tilde x_3 = f(\tilde x_3) \changeto \tilde x_3 = f(\tilde x_2)$$
• Chapter 4, footnote 1:We have $$N$$ discrete time points $$t_i\equiv t_1, \ldots, t_{N-2}, t_{N-1}\equiv t_f$$ $$\changeto$$ We have $$N$$ discrete time points $$t_i\equiv t_1, \ldots, t_{N-1}, t_{N}\equiv t_f$$
• Chapter 5, section 5.1, program rk2.f90, subroutine RKSTEP: Correct bug in code:
k14=f1(t+h ,x1+h *k13,x2+h *k23,x3+h *k33,x4+h2*k43) $$\changeto$$ k14=f1(t+h ,x1+h *k13,x2+h *k23,x3+h *k33,x4+h *k43)
and similarly correct k24, k34, k44. The same corrections must be applied to the program scatter.f90.
• Equation (11.2): $$z \changeto x_{i-1}$$
• Chapter 9, p. 375, Equation (9.14), $$p_{n m} \changeto -p_{n m}$$
• Chapter 9, p. 395, code of program doublewell.f90, 5 lines from bottom: (add minus sign)
if(j.ge.1) iP(i,j) = -isqrt2*sqrt(DBLE(m+1))
• Chapter 9, p. 396, code of program doublewell.f90, first line: (remove minus sign)
if(j.le.DIM) iP(i,j) = isqrt2*sqrt(DBLE(m))
• Chapter 13, p. 518, file init.f90: Replace the lines:
if( beta < 0.0D0 ) beta = obeta $$\changeto$$if(beta < 0.0D0)call locerr('beta has not been set.')
read(f_in,'(A4,I5,A4,I5,A6,G28.17,A6,25I16)')buf,OL,buf,OL,buf,beta,buf,seeds $$\changeto$$read(f_in,'(A4,I5,A4,I5,A6,G28.17,A6,25I16)')buf,OL,buf,OL,buf,obeta,buf,seeds
• Chapter 13, p. 520: Remove the sentence: This way, if the user has not set the temperature ... temperature will be used.