solve initial value problems for ordinary differential equations
Usage
euler(f, x0, y0, h, n)
midptivp(f, x0, y0, h, n)
rungekutta4(f, x0, y0, h, n)
adamsbashforth(f, x0, y0, h, n)
Arguments
f
function to integrate
x0
the initial value of x
y0
the initial value of y
h
selected step size
n
the number of steps
Value
a data frame of x and y values
Details
The euler method implements the Euler method for solving
differential equations. The codemidptivp method solves initial
value problems using the second-order Runge-Kutta method. The
rungekutta4 method is the fourth-order Runge-Kutta method.