Computational Physics - Department of Physics
3.4 Modules in Fortran 89 proton_particle_descript INTEGER, DIMENSION(:), POINTER, PUBLIC :: itzp END TYPE proton_sp_orbit To in ...
90 3 Numerical differentiation and interpolation 3.5 How to make Figures with Gnuplot. We end this chapter with a practical guid ...
3.5 How to make Figures with Gnuplot 91 set terminal pslatex set output "derivative.tex" set xrange [-15:0] set yrange [-10:8] s ...
92 3 Numerical differentiation and interpolation 3.6 Exercises. 3.1.We want you to compute the first derivative of f(x) =tan−^1 ...
3.6 Exercises 93 3.6.Write a C++ class which sets up various approximations to thederivatives and repeat exercise 3.1 using this ...
...
Chapter 4 Non-linear Equations AbstractIn physics we often encounter the problem of determining theroot of a function f(x). Espe ...
96 4 Non-linear Equations and u(r) =Bexp(− √ 2 m|E|r/h ̄) r>a, (4.6) whereAandBare constants. Using the continuity requiremen ...
4.2 Iterative Methods 97 numerics. Through an iterative search of the solution, the hope is that we can approach, within a given ...
98 4 Non-linear Equations 4.3 Bisection This is an extremely simple method to code. The philosophy can best be explained by choo ...
4.4 Newton-Raphson’s Method 99 |s−xn| |s| ≤ 10 −^12. (4.20) It suffices in our case to studys≥ 50 , which results in |s−xn| 50 ≤ ...
100 4 Non-linear Equations equations of the type shown in Eq. (4.8) where it is rather easy to evaluate the derivative. If you c ...
4.4 Newton-Raphson’s Method 101 -5 0 5 10 15 20 0 2 4 6 8 10 f(x) x f(x) =x− 2 cos(x) c=x 1 c=x 2 Fig. 4.2Example of a case wher ...
102 4 Non-linear Equations together with range reduction , is used in the intrisic computational function which computes square ...
4.5 The Secant Method 103 cout <<"Error in function newtonraphson:"<< endl; cout <<"Too many iterations!"<& ...
104 4 Non-linear Equations -100 -50 0 50 100 0 1 2 3 4 5 f(E)[MeV] |E|[MeV] f(E) Eq. () Fig. 4.3Plot off(E)Eq. (4.8) as function ...
4.5 The Secant Method 105 The search for the solutionsproceeds in much of the same fashion as for the bisection method, namely a ...
106 4 Non-linear Equations Broyden also suggested using the Sherman-Morrison formulato update directly the inverse of the Jacobi ...
4.6 Exercises 107 u(r) =Asin(kr) r<a, and u(r) =Bexp(−βr) r>a, whereAandBare constants. We have also defined k= √ m(V 0 −| ...
...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf