C
C     ..................................................................
C
C        SUBROUTINE QHFE
C
C        PURPOSE
C           TO COMPUTE THE VECTOR OF INTEGRAL VALUES FOR A GIVEN
C           EQUIDISTANT TABLE OF FUNCTION AND DERIVATIVE VALUES.
C
C        USAGE
C           CALL QHFE (H,Y,DERY,Z,NDIM)
C
C        DESCRIPTION OF PARAMETERS
C           H      - THE INCREMENT OF ARGUMENT VALUES.
C           Y      - THE INPUT VECTOR OF FUNCTION VALUES.
C           DERY   - THE INPUT VECTOR OF DERIVATIVE VALUES.
C           Z      - THE RESULTING VECTOR OF INTEGRAL VALUES. Z MAY BE
C                    IDENTICAL WITH Y OR DERY.
C           NDIM   - THE DIMENSION OF VECTORS Y,DERY,Z.
C
C        REMARKS
C           NO ACTION IN CASE NDIM LESS THAN 1.
C
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C           NONE
C
C        METHOD
C           BEGINNING WITH Z(1)=0, EVALUATION OF VECTOR Z IS DONE BY
C           MEANS OF HERMITEAN FOURTH ORDER INTEGRATION FORMULA.
C           FOR REFERENCE, SEE
C           (1) F.B.HILDEBRAND, INTRODUCTION TO NUMERICAL ANALYSIS,
C               MCGRAW-HILL, NEW YORK/TORONTO/LONDON, 1956, PP.314-319.
C           (2) R.ZURMUEHL, PRAKTISCHE MATHEMATIK FUER INGENIEURE UND
C               PHYSIKER, SPRINGER, BERLIN/GOETTINGEN/HEIDELBERG, 1963,
C               PP.227-230.
C
C     ..................................................................
C
      SUBROUTINE QHFE(H,Y,DERY,Z,NDIM)
C
C
      DIMENSION Y(1),DERY(1),Z(1)
C
      SUM2=0.
      IF(NDIM-1)4,3,1
    1 HH=.5*H
      HS=.1666667*H
C
C     INTEGRATION LOOP
      DO 2 I=2,NDIM
      SUM1=SUM2
      SUM2=SUM2+HH*((Y(I)+Y(I-1))+HS*(DERY(I-1)-DERY(I)))
    2 Z(I-1)=SUM1
    3 Z(NDIM)=SUM2
    4 RETURN
      END
