The electric field $$E_x$$ and its time derivative are continuous at time $t = 0$. Show that $$k = k^,$$
if for $t < 0$
$$E_x = E_0 \cos(kz-wt)$$
and if for $t > 0$
$$E_x = E_1 \cos(k^,z-wt) + E_2 \cos(k^,z-wt).$$
I tried doing this by setting the electric field at $t < 0$ equal to that at $t > 0$ when $t$ is equal to zero and doing the same for the time derivative but I get a whole number of trigonometric functions that will not disappear. Any advice would be appreciated.