ccccccccccccccccccccccccc     Program 3.B     ccccccccccccccccccccccccccc
c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c                                                                       c
c Please Note:                                                          c
c                                                                       c
c (1) This computer program is written by Tao Pang in conjunction with  c
c     his book, "An Introduction to Computational Physics," published   c
c     by Cambridge University Press in 1997.                            c
c                                                                       c
c (2) No warranties, express or implied, are made for this program.     c
c                                                                       c
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c
      SUBROUTINE NMRV2 (N,H,Q,S,U)
C
C The Numerov algorithm for the equation u"(x)+q(x)u(x)=s(x)
C as given in Eqs. (3.82)-(3.85) in the book.
C Copyright (c) Tao Pang 1997.
C
      INTEGER I,N
      REAL H,G,C0,C1,C2,D,UTMP,Q(N),S(N),U(N)
C
      G = H*H/12.0
C
      DO      100  I = 2, N-1
        C0     = 1.0+G*Q(I-1)
        C1     = 2.0-10.0*G*Q(I)
        C2     = 1.0+G*Q(I+1)
        D      = G*(S(I+1)+S(I-1)+10.0*S(I))
        UTMP   = C1*U(I)-C0*U(I-1)+D
        U(I+1) = UTMP/C2
  100 CONTINUE
      RETURN
      END
