Steply

Derivative of 2sin x - 4cos x

Step by step, with the reason for every step · Derivatives of sin, cos, e and ln · Calculus

Step by step

The question

Question: find the derivative of f(x) = 2 sin x − 4 cos x.

f(x) = 2 sin x − 4 cos x

1 The rules

The derivative of sin x is cos x.

sin x → cos x

The derivative of cos x is −sin x.

Mind the minus!

cos x → −sin x

2 Each term

Use the rule on each term.

A number in front just waits, and multiplies.

f′(x) = 2 × cos x − 4 × (−sin x)

Careful!

The derivative of cos x is minus sin x.

Do not lose the minus.

Careful: not cos x → sin x ✗

Minus times minus is plus.

− × − = +

3 Tidy up

So f′(x) = 2 cos x + 4 sin x.

= 2 cos x + 4 sin x

4 Check

Let's check: the derivative is the slope.

At x = 1, the rule gives 4.4465, with a calculator in radians.

f′(1) = 2 cos 1 + 4 sin 1 ≈ 4.4465

Now the slope between two very close points: x = 1 and x = 1.001.

A calculator gives about 4.45.

Very close to 4.4465.

Right!

f(1.001) − f(1)0.001 ≈ 4.45

Let's look back.

First: the rules.

Then: each term.

Then: tidy up.

Last: check.

Answer
= 2 cos x + 4 sin x

Your turn

Try this one yourself, then check:

f(x) = 8 sin x − 2 cos x
Show the answer
f′(x) = 8 cos x + 2 sin x

More from Derivatives of sin, cos, e and ln

The whole lesson: Derivatives of sin, cos, e and ln →