expand trig cos(k x) sin(x)