C
C
      PROGRAM MGAUS11
C
      IMPLICIT REAL*8(A-H,O-Z)
      EXTERNAL FUNC,FUNC1
      COMMON /COM/ AA,R2
C
      WRITE(*,1000)
      READ(*,*)R2
 1000 FORMAT(/' ENTER R2       =',\)
C
      DO 100 I=1,10
C
       WRITE(*,1010)
       READ(*,*)AA
 1010  FORMAT(' ENTER AA(R/R2) =',\)
C
       A=0.D0
       B=3.141592654D0
       CALL GAUSS1(FUNC,A,B,6,S,IER)
       CALL GAUSS1(FUNC1,A,B,6,SS,IER)
       SS=2*R2*(3.141592654D0*DLOG(R2)+SS/2.D0)
C
       R=AA*R2
       WRITE(*,*)' R, R2 =',R,R2
       S1=6.2831853D0*R2*DLOG(R)
       WRITE(*,*)' 2*PAI*R2*LOG(R) , */S =',S1,S1/S
       S2=6.2831853D0*R2*DLOG(R2)
       WRITE(*,*)' 2*PAI*R2*LOG(R2), */S =',S2,S2/S
       WRITE(*,*)' S,SS                  =',S,SS
C
  100 CONTINUE
C
      STOP
      END
C
C
C
      REAL*8 FUNCTION FUNC(X)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /COM/ AA,R2
C
C
C      SQ=DSQRT(AA*AA+1.D0+2.D0*AA*DCOS(X))
C      FUNC=DSIN(X)/SQ
C
      SQ=DSQRT(AA*AA+1.D0+2.D0*AA*DCOS(X))
      FUNC=2.D0*R2*DLOG(R2*SQ)
C
      RETURN
      END
C
C
C
      REAL*8 FUNCTION FUNC1(X)
      IMPLICIT REAL*8(A-H,O-Z)
      COMMON /COM/ AA,R2
C
      FUNC1=DLOG(AA*AA+1.D0+2.D0*AA*DCOS(X))
C
      RETURN
      END
