dfdt: Right Side of a first order ODE

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/dfdt.R

Description

Gives the value of the right side of a first order Ordinary Differential Equation Used in frunge (Numeric resolution using Runge-Kutta 4 metthod)

Usage

1
	dfdt(t, y, param)

Arguments

t

time, independent variable

y

values of the unknown function at t

param

numeric vector : the set of parameters defining the function

Details

the unique expression composing the body of dfdt is intended as the right side of the first order differential equation :

dy/dt = dfdt(t,y,param)

The function body has to be written by the user.
param must take the form c(param1,param2,param3). if the initial value (y0) is used as a parameter (for model fitting for instance), it must be the last in the list and not used in dfdt.

Value

a single float numeric value : the derivative of the unknown function at time t.

Note

When used as argument for frunge, the initial condition y0 may be used as a parameter subject to fitting by nls, for instance. In this condition, y0 must appear as the last parameter in param and must not be used nor modified in dfdt

Author(s)

Jean-Sebastien Pierre
[email protected]

References

Any textbook in mathematics

See Also

frunge, nls

Examples

1
2
3
## Solves and draws the logistic function using default dfdt as provided in the package	

	frunge(t=10, param=c(r=0.1,k=100), y0=3, Dfdt = dfdt, dt = 0.01, graph = TRUE)

nlsrk documentation built on June 24, 2017, 1:02 a.m.