	PROGRAM D15R4
C	Driver for ODEINT
	EXTERNAL DERIVS,RKQC
	COMMON /PATH/KMAX,KOUNT,DXSAV,X(200),Y(10,200)
	PARAMETER(NVAR=4)
	DIMENSION YSTART(NVAR)
	X1=1.0
	X2=10.0
	YSTART(1)=BESSJ0(X1)
	YSTART(2)=BESSJ1(X1)
	YSTART(3)=BESSJ(2,X1)
	YSTART(4)=BESSJ(3,X1)
	EPS=1.0E-4
	H1=0.1
	HMIN=0.0
	KMAX=100
	DXSAV=(X2-X1)/20.0
	CALL ODEINT(YSTART,NVAR,X1,X2,EPS,H1,HMIN,NOK,NBAD,DERIVS,RKQC)
	WRITE(*,'(/1X,A,T30,I3)') 'Successful steps:',NOK
	WRITE(*,'(1X,A,T30,I3)') 'Bad steps:',NBAD
	WRITE(*,'(1X,A,T30,I3)') 'Stored intermediate values:',KOUNT
	WRITE(*,'(/1X,T9,A,T20,A,T33,A)') 'X','Integral','BESSJ(3,X)'
	DO 11 I=1,KOUNT
	      	WRITE(*,'(1X,F10.4,2X,2F14.6)') X(I),Y(4,I),BESSJ(3,X(I))
11	CONTINUE
	END

	SUBROUTINE DERIVS(X,Y,DYDX)
	DIMENSION Y(1),DYDX(1)
	DYDX(1)=-Y(2)
	DYDX(2)=Y(1)-(1.0/X)*Y(2)
	DYDX(3)=Y(2)-(2.0/X)*Y(3)
	DYDX(4)=Y(3)-(3.0/X)*Y(4)
	RETURN
	END
