I have read all the 8 illustrations, thanks for your help, your code is exactly what I want. And this time could you help me fix a cycle? My cycle doesn't work at all because I dont know how to combine the cycle with this code. Let me show you everything I have changed based on my currently need and then I will tell you the aim of cycle.
1 add a new variable L at the top
2 local omega:=x-> 1+sin( eps*x ) to local omega:=x-> 1+cos( eps*x )
3 -10..8*evalf(Pi)/eps, to -10..L*evalf(Pi)/eps, this L can control the number of periods
4 a cycle writen by myself at the bottom. because it doesn't work so I put it together at the bottom, it's more clear.
The aim of cycle is to :1 count the times of q(t) jumps up and down in the whole interval. 2 wether q(t) jumps up or down at every jump (funtunetly what I need in this part is just the the first and second time) when I change the initial condition p(0) by a small step at the order smaller than the oder of epsilon , for example epsilon = 1/50 then the step should be something like 1/100 or 1/200. I believe this explaination is not clear but when you see the cycle I believe you will understand what I mean, if you don't please let me know.
this is the new code hw2corr3.mw