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
- 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
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.
Graph of cos x and its derivative
Proof from the limit definition
The angle sum formula gives \cos(x + h) = \cos x\cos h - \sin x\sin h. So
With \frac{\cos h - 1}{h} \to 0 and \frac{\sin h}{h} \to 1:
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:
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)
| 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
- Dropping the minus sign. This is the most common trig derivative error. Remember: "co" functions get a minus.
- Double minus confusion. \frac{d}{dx}(-\cos x) = \sin x, positive.
- 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