practicecalculus
Trigonometric derivatives

Derivative of cos x: Formula, Proof and Examples

The derivative of cos x is -sin x. See the limit proof, a quick proof from sin x, the chain rule for cos(u) and worked examples like cos(5x).

Trigonometric derivatives Updated 2 min read

At a glance

\frac{d}{dx}\,\cos x = -\sin x
Derivative
-\sin x for every real x
Chain rule form
\dfrac{d}{dx}\cos u = -\sin u \cdot u'
Second derivative
-\cos x
Units
x must be in radians
Integral version
\int \cos x\,dx = \sin x + C
On this page
  1. Graph of cos x and its derivative
  2. Proof from the limit definition
  3. A quicker proof using sin x
  4. The chain rule version: derivative of cos(u)
  5. Worked examples
  6. How to remember the sign
  7. Common mistakes

The derivative of \cos x is -\sin x. Cosine starts at its peak at x = 0 and heads down, so its slope for small positive x is negative, matching -\sin x < 0.

\frac{d}{dx}\,\cos x = -\sin x

Graph of cos x and its derivative

Graph of y = cos x and its derivative y = -sin x
Where \cos x falls, -\sin x is below the axis. At the peak x = 0 the slope is 0, and at x = \frac{\pi}{2} the slope is -1.

Proof from the limit definition

The angle sum formula gives \cos(x + h) = \cos x\cos h - \sin x\sin h. So

\frac{\cos(x + h) - \cos x}{h} = \cos x\cdot\frac{\cos h - 1}{h} - \sin x\cdot\frac{\sin h}{h}

With \frac{\cos h - 1}{h} \to 0 and \frac{\sin h}{h} \to 1:

\frac{d}{dx}\cos x = \cos x\cdot 0 - \sin x\cdot 1 = -\sin x

A quicker proof using sin x

Write \cos x = \sin\left(\frac{\pi}{2} - x\right). Then by the chain rule and the derivative of sin x:

\frac{d}{dx}\cos x = \cos\left(\frac{\pi}{2} - x\right)\cdot(-1) = -\sin x

using \cos\left(\frac{\pi}{2} - x\right) = \sin x. The -1 from the inside is where the minus sign comes from.

The chain rule version: derivative of cos(u)

\frac{d}{dx}\,\cos u = -\sin u\cdot u'
Function Inside u Derivative
\cos(5x) 5x -5\sin(5x)
\cos(x^3) x^3 -3x^2\sin(x^3)
\cos(1 - x) 1 - x \sin(1 - x)
\cos(\ln x) \ln x -\frac{\sin(\ln x)}{x}

In the third row two minus signs cancel.

Worked examples

Example 1: a product. \frac{d}{dx}\left(e^x\cos x\right) = e^x\cos x - e^x\sin x = e^x(\cos x - \sin x), by the product rule.

Example 2: a quotient. \frac{d}{dx}\frac{\cos x}{x} = \frac{-x\sin x - \cos x}{x^2}, by the quotient rule.

Example 3: motion. A spring's position is s(t) = 4\cos(2t). Its velocity is v(t) = -8\sin(2t) and its acceleration is a(t) = -16\cos(2t) = -4s(t). Acceleration always points back toward the center.

Example 4: a horizontal tangent. \frac{d}{dx}(x + 2\cos x) = 1 - 2\sin x. It equals 0 when \sin x = \frac{1}{2}, so at x = \frac{\pi}{6} and x = \frac{5\pi}{6} in [0, 2\pi).

How to remember the sign

Picture the unit circle. Cosine is the horizontal coordinate. As the angle grows from 0, the point moves up and to the left, so the horizontal coordinate shrinks. A shrinking quantity has a negative rate of change, which is why the derivative is -\sin x and not +\sin x.

Common mistakes

  1. Dropping the minus sign. This is the most common trig derivative error. Remember: "co" functions get a minus.
  2. Double minus confusion. \frac{d}{dx}(-\cos x) = \sin x, positive.
  3. Forgetting u'. \frac{d}{dx}\cos(4x) = -4\sin(4x), not -\sin(4x).

The reverse is on the integral of cos x page. The cosine function page covers its graph and key values.

Practice it now

Sine, cosine and tangent

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of cos x?

The derivative of \cos x is -\sin x.

What is the derivative of cos(2x)?

By the chain rule, -\sin(2x) \cdot 2 = -2\sin(2x).

Why is the derivative of cos x negative?

Just right of x = 0, cosine starts to fall from its peak while sine is positive. A falling curve has a negative slope, so the derivative must be -\sin x, not \sin x.

What is the derivative of cos²x?

It is 2\cos x \cdot(-\sin x) = -2\sin x\cos x = -\sin 2x.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.