In a previous article, email@example.com (Michael Kolios) says:
>I would like to numerically integrate something that looks like: > >int( theta * cos(nr) * dr, r=0..1) > >where I know theta(x) and r(x) and thus theta as a function of r is >given parametrically by the mentioned two functions. > >The problem is that the "n" in the cosine term of the integrand becomes >very large in this finite interval and thus to evaluate this I use >special fortran routines that handle oscillatory integrals (e.g. dqawoe >from slatec). Invariably, all of these routines require I specify the >function (theta) non-parametrically.
So don't use them. If nr > 2pi, then nr = Q*2pi + R, 0<=R<2pi, Q integer; cos(nr) = cos(Q*2pi + R) = cos(Q*2pi)cos(R) - sin(Q2pi)sin(R) = cos(R). Find R = Remainder(nr,2pi) and apply cosine to R.