The derivative of y = cosf(x) is dy/dx = -f’(x)sinf(x).

The derivative of y = sinf(x) is dy/dx = -f’(x)cosf(x).

Just remember that cosx goes to –sinx and sinx goes to cosx. Let’s take a look at some examples of differentiating cos and sin.

**Example 1**

Find dy/dx if y = cos(4x-2).

First write down f(x) and differentiate this function to give f'(x) (This goes at the front of your answer)

Here f(x) is 4x-2 so f’(x) is 4. Also the derivative of cos is –sin.

So your answer is dy/dx = -4sin(4x-2)

**Example 2**

Find dy/dx if y = sin(3x+5).

Again write down f(x) and differentiate this function to give f’(x) (This goes at the front of your answer)

Here f(x) is 3x+5 so f’(x) is 3. Also the derivative of sin is cos.

So your answer is dy/dx = 3cos(3x+5)

**Example 3**

Find dy/dx if y = cos8x³

Again write down f(x) and differentiate this function to give f’(x) (This goes at the front of your answer)

Here f(x) is 8x³ so f’(x) is 24x². Also the derivative of cos is –sin.

So your answer is dy/dx = -24x²sin(8x³)

**Example 4**

Find dy/dx if y = sin(9x⁴).

Again write down f(x) and differentiate this function to give f’(x) (This goes at the front of your answer)

Here f(x) is 9x⁴ so f’(x) is 36x³. Also the derivative of sin is cos.

So your answer is dy/dx = 36x³cos(9x⁴)

**Summary **

Make sure you remember that when you differentiate cosx it goes to **negative** sinx. Don’t get this mixed up with the derivative of sinx which goes to positive cosx. Don’t get yourself confused – remember the difference between the two.