Samples for haverage.m, ver. 2.1. If version 2.1 of haverage.m is used, the examples of K. Yagasaki and T. Ichikawa, Higher-order averaging for periodically forced, weakly nonlinear systems, International Journal of Bifurcation and Chaos, 9 (1999), 519--531 should be changed as follows: Section 5.1 <theta,{i,1,5}] n2=2;m0=5; haverage[f,barf,{u[1],v[1]},theta,omega,n2,m0] Section 5.2 <3*theta,{i,1,4}] haverage[f,barf,{u[1],v[1]},theta,omega/3,2,4] (If you already typed "<2*theta,{i,1,2}] haverage[f,barf,{u[1],v[1],u[2],v[2]},theta,omega/2,4,2]