Write a derivs routine of the following form appropriate for solution
of the equation
, a simple one-dimensional
ODE. Note that because the ODE is one-dimensional, there is only one
component,
=dydx[1].
void derivs_int(double x, double y[], double dydx[], int k, double f[], double r[], double dr[], int N)Output:
- dydx[1]: derivative
![]()
Input:
- x: point where
is evaluated.
- y[1]: value of y(x).
- k: array index corresponding to x, so that x=r[k].
- f[]: array of function values so that f(r[k])=f[k].
- r[], dr[], N: information describing change of variables.