      SUBROUTINE INITAL
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      COMMON/T/      T,  NSTOP,  NORUN
     +      /Y/   Y(2)
     +      /F/  YT(2)
     +      /C/A(-1:1)
C...
C...  COEFFICIENTS (REAL EIGENVALUES)
      A(-1)=1.0D0
      A( 0)=3.0D0
      A( 1)=1.0D0
C...
C...  INITIAL CONDITIONS
      Y(1)=0.0D0
      Y(2)=0.0D0
C...
C...  INITIAL DERIVATIVES
      CALL DERV
      RETURN
      END
      SUBROUTINE DERV
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      COMMON/T/      T,  NSTOP,  NORUN
     +      /Y/   Y(2)
     +      /F/  YT(2)
     +      /C/A(-1:1)
C...
C...  INTEGRAL TERM
      YT(2)=Y(1)
C...
C...  DERIVATIVE TERM
      YT(1)=(1.0D0/A(1))*(1.0D0-A(0)*Y(1)-A(-1)*Y(2))
      RETURN
      END
      SUBROUTINE PRINT(NI,NO)
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      COMMON/T/      T,  NSTOP,  NORUN
     +      /Y/   Y(2)
     +      /F/  YT(2)
     +      /C/A(-1:1)
C...
C...  MONITOR CALCULATION
      WRITE(*,*)T
C...
C...  HEADING FOR THE SOLUTION
      IF(T.LT.0.01D0)THEN
         WRITE(NO,3)
3        FORMAT(6X,'T',8X,'Y1',7X,'Y1A',3X,'DIFF Y1',
     +                 8X,'Y2',7X,'Y2A',3X,'DIFF Y2',/)
      END IF
C...
C...  ANALYTICAL SOLUTION
      DIS=A(0)**2-4.0D0*A(1)*A(-1)
      IF(DIS.GT.0.0D0)THEN
C...
C...  REAL EIGENVALUES
         R1=(-A(0)+DSQRT(DIS))/(2.0D0*A(1))
         R2=(-A(0)-DSQRT(DIS))/(2.0D0*A(1))
         Y1A=(1.0D0/A(1))*((1.0D0/(R1-R2))*DEXP(R1*T)
     +                    +(1.0D0/(R2-R1))*DEXP(R2*T))
         Y2A=(1.0D0/A(1))*(( 1.0D0/(R1*(R1-R2)))*(DEXP(R1*T)-1.0D0)
     +                   + ( 1.0D0/(R2*(R2-R1)))*(DEXP(R2*T)-1.0D0))
      ELSE
C...
C...     REPEATED, COMPLEX EIGENVALUES NOT PROGRAMMED
         WRITE(NO,2)DIS
2        FORMAT(' DIS = ',E12.4,' (NOT POSITIVE)')
         STOP
      END IF
C...
C...
C...  DIFFERENCE BETWEEN NUMERICAL AND ANALYTICAL SOLUTIONS
      DIFF1=Y(1)-Y1A
      DIFF2=Y(2)-Y2A
C...
C...  PRINT NUMERICAL, ANALYTICAL SOLUTIONS, AND THE DIFFERENCE
      WRITE(NO,1)T,Y(1),Y1A,DIFF1,
     +             Y(2),Y2A,DIFF2
1     FORMAT(F7.3,6F10.5)
      RETURN
      END
