I want to model the motion of a particle using a set of 2nd order equations the the equation is
d2x/dt2 = 1 + dy/dt + dz/dt
d2y/dt2 = 1 + dx/dt + dz/dt
d2z/dt2 = 1 + dx/dt + dy/dt
vector V
is (dx/dt dy/dt dz/dt)
, X
is (x y z)
,
V = [0 0 0]
, X = [0 0 0]
initially
I implemented this into C code for one of the ODEs below CODE;
double X_function(double a[], double t, double at[],double b[],double c[]) {
//double yt, zt;
at[0] = a[0];
at[1] = 1 + b[0] + c[0];
double F = at[1];
return F;
}
i need help understanding how to use R-K in such a case