Establish that for all z. Use the definition of cos z as the sum of a power series
It is easy to understand it the way Soroban showed you, by doing it to the first few terms.
The clue is that these series converge absolutely, which means you can differentiate term-wise.
Now when we differentiate, the first (constant) term becomes zero, so we start counting at k = 1: