      SUBROUTINE CPTBH(M,H1,H2,EGVL,FNORM,EGVR,MX)
C
C     THIS SUBROUTINE COMPUTES AN ESTIMATE OF THE EIGEN VALUES EGVR IN
C     REGION J+1 (DEPTH=H2) BASED ON THE EIGEN VALUES IN REGION J
C     (DEPTH=H1).
C     IT USES THE PERTURBATION METHOD ON PG. 228 IN PRINC. AND TECH.
C     OF APPLIED MATH BY B. FRIEDMAN
C
      IMPLICIT REAL*8 (A-H,O-Z)
      COMPLEX*16 EGVL(MX),FNORM(MX),EGVR(MX)
      COMPLEX*16 ALPHA,BETA,CCDS,CSDS,CISP
      COMPLEX*16 CDSRT,ONE,CI,U,V,W,B,Z
C
      COMMON /BLKEVN/ HB,CW,CB,FKW,FKB,ROHW,ROHB,ATEN
C
      ONE=DCMPLX(1.0D0,0.0D0)
      CI=DCMPLX(0.0D0,1.0D0)
C
      IF(H1 .EQ. H2) GO TO 600
C
      DO 500 I=1,M
C
      ALPHA=CDSRT(FKW**2+FKB**2*(EGVL(I)-ONE))
      BETA=CDSRT(FKB**2*(EGVL(I)+CI*ATEN))
C
      IF(H1 .GT. H2) GO TO 200
C
C     THIS IS THE DOWN SLOPE CASE
C
      V=DCMPLX(1.-(FKW/FKB)**2,ATEN)/(FNORM(I)*ROHB)
      W=FKB**4*CDSIN(ALPHA*H1)**2/ALPHA**2
      U=CCDS(H1,H1,BETA)-CCDS(H2,H1,BETA)*CSDS(H2,H1,BETA)
      U=U/(2.*BETA)
      B=BETA*(HB-H1)
      IF(DIMAG(B) .GT. 44.0D0) GO TO 100
      Z=.5*(H2-H1)/CDSIN(BETA*(H1-HB))**2
      GO TO 150
C 
  100 CONTINUE
      Z=DCMPLX(0.0D0,0.0D0)
C
  150 CONTINUE
      EGVR(I)=EGVL(I)+V*W*(U+Z)
C
      GO TO 500
C
  200 CONTINUE
C
C     THIS IS THE UPSLOPE CASE
C
      U=CISP(ALPHA,H2,ALPHA,H2)-CISP(ALPHA,H1,ALPHA,H1)
      V=DCMPLX(1.-(FKW/FKB)**2,ATEN)/(FNORM(I)*ROHW)
      W=FKB**4/(ALPHA**2)
C
      EGVR(I)=EGVL(I)+U*V*W
C
  500 CONTINUE
      GO TO 800
C
  600 CONTINUE
      DO 700 I=1,M
      EGVR(I)=EGVL(I)
  700 CONTINUE
C
  800 CONTINUE     
C
      RETURN
      END
