Computational Physics

(Rick Simeone) #1
References 603

A.5 Starting from Newton’s interpolation formula, derive the Gauss interpolation formula
to order three:


xi+t=xi+tδxi+ 1 / 2 +
t(t− 1 )
2!
δ^2 xi+
t(t^2 − 1 )
3!
δ^3 xi+ 1 / 2 +···

A.6 (a) Show explicitly that equating the time derivative(ψin+^1 −ψin)/tto the average
value of the Hamiltonian acting onψin+^1 and onψni(seeEqs. (A.67),(A.68)),
yields the Crank–Nicholson algorithm.
(i) Show that the operator
1 −^12 itH
1 +^12 itH
is a second order approximation intto exp(−itH).
A.7 [C] Consider Poisson’s equation for two opposite point charges on a square of linear
sizeLh(seeFigure A.4). We takeLto be a multiple of 4. The charges are placed at
positionsr 1 /4,1/ 4 =Lh( 1 /4, 1/ 4 )andr 3 /4,3/ 4 =Lh( 3 /4, 3/ 4 ), so that the charge
distribution is given as
ρ(r)=δ(r−r 1 /4,1/ 4 )−δ(r−r 3 /4,3/ 4 ).
We discretise Poisson’s equation on anL×Lgrid with periodic boundary conditions,
and with grid constanth. The Laplace operator is given in discretised form in
Appendix A7.2 (‘Boundary value problems’) and the discretised charge distribution
is given in terms of Kronecker deltas:
ρ(i,j)=(δi,L/ 4 δj,L/ 4 −δi,3L/ 4 δj,3L/ 4 )/h^2.
As the Laplace operator and the charge distribution both contain a pre-factor 1/h^2 ,
this drops out of the equation.
(a) [C] Solve Poisson’s equation(A.88)for this charge distribution using the
Gauss–Seidel iteration method.
(b) [C] Apply the multigrid method using the prolongation and discretisation
mappings described inAppendix A7.2(‘Multigrid methods’) to solve the same
problem.
(c) [C] Compare the performance (measured as a time to arrive at the solution within
some accuracy) for the methods in (a) and (b). Check in particular that the number
of multigrid steps needed to obtain convergence is more or less independent ofL.


References


[1] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery,Numerical Recipes, 2nd edn.
Cambridge, Cambridge University Press, 1992.
[2] R. W. Hamming,Numerical Methods for Scientists and Engineers. International Series in Pure
and Applied Mathematics, New York, McGraw-Hill, 1973.
[3] G. E. Forsythe, M. A. Malcolm, and C. B. Moler,Computer Methods for Mathematical
Computations. Englewood Cliffs, NJ, Prentice-Hall, 1977.
Free download pdf