        Program ODE1
c-------------------------------------------------------------
c Driver program for programs: euler1d.f, euler1m.f, rk4_1d
c Initial value problem for 1st-order ODE
c-------------------------------------------------------------
      Real*8 dx, x0, t0, xi, ti, xf, tf, tmax, esol
      Integer*4 i
      External dx
      open (unit=7,file="ode1d.dat")
c* initial conditions
      x0 = 1.00
      t0 = 1.00
c* "time" step and max time
      dt =   0.01
      tmax = 2.00

      xi = x0
      ti = t0
      do while(ti.le.tmax)
         write (7,100) ti, xi
         tf = ti + dt
c* call ONE of programs
c         call euler1d(dx,ti,xi,tf,xf)
c         call euler1m(dx,ti,xi,tf,xf)
         call  rk4_1d(dx,ti,xi,tf,xf)

         ti = tf
         xi = xf
      end do
100   format(2e12.4)
      stop
      end

      Function dx(t,x)
c----------------------------------------------
c dx(t,x)- function dx/dt in first order ODE
c---------------------------------------------
      Real*8 dx, x, t
c* function from the textbook K&G
      dx = (-1.0)*x/t
      return
      end