Calculate integrate cos(3x) dx