R TUTORIAL, part 1.3: Euler's methods

It would be very nice if discrete models provide calculated solutions to differential (ordinary and partial) equations exactly, but of course they do not. In fact in general they could not, even in principle, since the solution depends on an infinite amount of initial data. Instead, the best we can hope for is that the errors introduced by discretization will be small when those initial data are resonably well-behaved.

In this chapter, we discuss some simple numerical method applicable to first order ordinary differential equations in normal form subject to the prescribed initial condition:

\[ y' = f(x,y), \qquad y(x_0 ) = y_0 . \]

Numerical solution using deSolve

Note that another package, bvpSolve provides methods to solve boundary value problems.

 

  1. Schiesser, W.E., An Introductory Comparison of Matlab and R, Lehigh University, Bethlehem, USA.
  2. Soetaert, K, Cash, J., Mazzia, F., Solving Differential Equations in R, 2012, Springer, Heidelberg New York Dordrecht London