ode1: Solve for first order ODEs

Description Usage Arguments Details Value

View source: R/ode1.R

Description

One dimensional first order ODE solver using either RK4 or an Euler scheme..

Usage

1
ode1(f, y0, t0 = 0, tn = 1, n = 1000, engine = "RK4")

Arguments

f

the function of t and y in the explicit ODE y'=f(t,y)

y0

the initial value

t0

the initial value input

tn

the terminal value input

n

the number of sub-intervals to use, defaults to 1000

engine

the type of scheme to use, defaults to RK4.

Details

f must be a function of time and the state variable y. The engine must either be "RK4" or "Euler"

Value

data.frame of the time grid and solution grid


shill1729/odeSolveR documentation built on March 31, 2021, 10:52 a.m.