#include #include #include #include #define Max 1000000 #define N 10 double x[N],v[N]; // state of the system //double xg[N][Max][2],vg[N][Max][2]; //graphical representation of time-evolution double dt=0.01,g=1,k=1,m=1,x0[N],v0[N]; int ItNo=1; int r=10; double fact=2; void FF(double F[N],double x[N]){ F[0]= -g -k*(x[0])+k*(x[0+1]-x[0]); for (int i=1; i