 	SUBROUTINE EXT(XX,YY,F,N)
C
C	
C
C   ******************************************************************
C   SUBROUTINE  "EXT"  (CALLED FROM  SUBROUTINE  "MERS")  PERFORMS THE
C   FUNCTION EVALUATIONS  REQUIRED IN THE NUMERICAL INTEGRATION OF THE
C   SET  OF  DIFFERENTIAL EQUATIONS.  "XX" CONTAINS  THE VALUE OF  THE  
C   INDEPENDENT  VARIABLE,  ARRAY  "YY"  THE DEPENDENT VARIABLES.  THE 
C   FUNCTION VALUES ARE STORED IN ARRAY "F".
C   ******************************************************************
C
C
	IMPLICIT REAL*8 (A-H,O-Z)		
C
	DIMENSION YY(N),F(N)
C
C 10
C  --------------------------------------------
C  FUNCTION EVALUATIONS FOR WHITE-DWARF PROBLEM (here N=2)
C  --------------------------------------------
C
C     DEFINE Y1=THETA, Y2 = V = D THETA/D S AND X = S
C
C  THEN
C     D THETA/DS = V  = f(1)
C     D V/ds = f(2)
C
C  BECOME
C     D Y1/DX = Y2 = F(1)
C     D Y2/DX = F(X,Y1,Y2) = F(2)
C
C
	F(1)=YY(2)
C
	U=YY(1)**(2./3.)
	V=1./SQRT(1.+U)
	V3=V*V*V
	V5=V3*V*V
	U12=SQRT(U)
C
	B=5./3.*V/U12-1./3.*U12*V3
	C=-5./9.*V/U12/YY(1)-2./3.*V3*U12/YY(1)+1./3.*V5
C
	F(2)=-2.*YY(2)/XX-C/B*YY(2)*YY(2)-YY(1)/B
C
10000	CONTINUE
	RETURN
	END
