systeme={u'[t]==v[t],v'[t]==-u[t],u[0]==1,v[0]==0}
tmax=100*Pi
solution=NDSolve[systeme,{u,v},{t,0,tmax},Method->{"ExplicitRungeKutta",DifferenceOrder->4,EmbeddedDifferenceOrder->5},
                        NormFunction->Infinity,AccuracyGoal->4,PrecisionGoal->10,MaxSteps->Infinity,StartingStepSize->0.01]
Plot[u[t]-Cos[t]/.solution,{t,0,tmax}]
tmax=10000*Pi
solution=NDSolve[systeme,{u,v},{t,0,tmax},Method->{"ExplicitRungeKutta",DifferenceOrder->6,EmbeddedDifferenceOrder->7},
                        NormFunction->Infinity,AccuracyGoal->4,PrecisionGoal->10,MaxSteps->Infinity,StartingStepSize->0.01]
Plot[u[t]-Cos[t]/.solution,{t,0,tmax}]
