Well, in your title it appears that you know you have to take an integral...
[math]s(t) = \int 1,2 ~ cos( 2 \pi t ) ~ dt[/math]
The thing you need to check is how often the pendulum changes direction. One way to take care of that is to use
[math]d(t) = \int \left | 1,2 ~ cos( 2 \pi t) \right | ~dt[/math]
Without seeing what you have done that's the best I can do to get you started.
-Dan