(4) If for all real numbers $x$, $\sin ^{k} x \cdot \sin k x+\cos ^{k} x \cdot \cos k x=\cos ^{k} 2 x$, then $k$ is ( ).
(A) 6
(B) 5
(C) 4
(D) 3
(4) Let $f(x)=\sin ^{k} x \cdot \sin k x+\cos ^{k} x \cdot \cos k x-\cos ^{k} 2 x$, then by the problem statement, for any $x, f(x)$ is always 0. If we take $x=\frac{\pi}{2}$, we get $\sin \frac{k \pi}{2}=(-1)^{k}$, so among the options, only $k=3$ satisfies the condition. Therefore, the answer is D.