First lets start with a right-angled triangle where one of the angles is y. Lets say the adjacent side is of length x and that the hypotenuse is of length 1:
Using the triangle above, we can say:
We already know that the derivative of x with respect to x is 1:
Since x = cos(y):
Using the chain rule:
And we already know what sin(y) is equal to (look above):