/************************* Program 3.B ****************************/ /* */ /************************************************************************/ /* Please Note: */ /* */ /* (1) This computer program is written by Tao Pang in conjunction with */ /* his book, "An Introduction to Computational Physics," published */ /* by Cambridge University Press in 1997. */ /* */ /* (2) No warranties, express or implied, are made for this program. */ /* */ /************************************************************************/ #include #include void nmrv2 (n,h,q,s,u) /* The Numerov algorithm for the equation u"(x)+q(x)u(x)=s(x) as given in Eqs. (3.82)-(3.85) in the book. Copyright (c) Tao Pang 1997. */ int n; double h; double q[],s[],u[]; { int i; double g,c0,c1,c2,di,ut; g = h*h/12; for (i = 1; i