C
C PAGE 307: NUMERICAL MATHEMATICS AND COMPUTING, CHENEY/KINCAID, 1985
C
C FILE: TAYLOR.FOR
C
C TAYLOR SERIES METHOD (ORDER 4) FOR SOLVING AN ORDINARY DIFFERENTIAL EQUATION
C
      DATA  T,X/2*0.0/, H/7.8125E-3/
      PRINT 3,T,X
      DO 2 K=1,128
        X1 = 1.0 + X*X + T**3
        X2 = 2.0*X*X1 + 3.0*T*T
        X3 = 2.0*X*X2 + 2.0*X1*X1 + 6.0*T
        X4 = 2.0*X*X3 + 6.0*X1*X2 + 6.0
        X = X + H*(X1 + H*(X2/2.0 + H*(X3/6.0 + H*X4/24.0)))
        T = REAL(K)*H
      PRINT 3,T,X
   2  CONTINUE
   3  FORMAT(5X,F10.5,5X,E22.14)
      STOP
      END