# Euler Method in R for the Initial Value Problem

### Friday January 15, 2016

###### •  analysis • CMNA •  initial value problems •  mathematics •  numerical analysis •  ordinary differential equations •  real analysis •  scientific computing •

During differentiation, the value of whatever vertical shift is present is lost as a result of the elimination of the constant term, which has a derivative of 0. We normally acknowledge this when integrating a function by adding a $+ C$ constant, the constant of integration, to an indefinite integral. This is sometimes a nonissue since, if finding the value of a definite integral, the constant terms cancel and the constant of integration is unnecessary.

For ordinary differential equations, them there is no convenient cancellation, leading to the initial value problem. The initial value problem provides a value of $f(x_0)$, where $x_0$ is normally 0, but is not required to be. This initial value provides sufficient information to complete the solution and find the actual value of $f(x)$ for some value of $x$. Below is an implementation of the Euler method in R.

Image by Oleg Alexandrov via Wikipedia Commons.