# 5. DEMO  accuracies of the integrals and derivatives

# Here you can see what sort of error the funtcion integr and diff have.
# If the value of this funcion are accurate, the funtions x and xint,
# or v and vder are same.
# Change the third parameter of the function run or the fourth parameter
# of the function print to see how the error changes.

func x,v;
aux xint,vder;
const omega;

x'=v;
v'=-omega*omega*x;

xint=integr(0,v);
vder=diff(0,x);

endmodel;

x=0;
v=6.2831185307;

omega=1;

run(0,3,0.1,x,xint,v,vder);
print(list,0,3,0.1,x,xint,v,vder);


