Derivatives of Trigonometric Functions

The derivatives of the six trigonometric functions follow from two fundamental limits and the Quotient Rule. The three "co-" functions (cosine, cotangent, cosecant) always carry a minus sign in their derivatives.

Function Derivative
sin x cos x
cos x sin x
tan x sec 2 x = 1 + tan 2 x
cot x csc 2 x = ( 1 + cot 2 x )
sec x sec x tan x
csc x csc x cot x

Prerequisites

Before computing these derivatives, recall:

\lim_{x\to0}\frac{\sin x}{x}=1\tag{a}\lim_{x\to0}\frac{\cos x-1}{x}=0\tag{b}

Proof of (b):

\begin{aligned} \lim_{x\to0}\frac{\cos x-1}{x}&=\lim_{x\to0}\frac{2\sin^2(x/2)}{x}=\lim_{x\to0}\frac{\sin(x/2)}{x/2}\cdot\sin\frac{x}{2}=1\times0=0 \end{aligned}

Also recall the angle-addition formulas:

sin ( A + B ) = sin A cos B + cos A sin B cos ( A + B ) = cos A cos B sin A sin B

Derivative of y = sin x

\begin{aligned} \frac{dy}{dx}&=\lim_{h\to0}\frac{\sin(x+h)-\sin x}{h}\\ &=\lim_{h\to0}\frac{\sin x\cos h+\cos x\sin h-\sin x}{h}\\ &=\sin x\cdot\lim_{h\to0}\frac{\cos h-1}{h}+\cos x\cdot\lim_{h\to0}\frac{\sin h}{h}\\ &=\sin x\cdot0+\cos x\cdot1=\cos x \end{aligned}\frac{d}{dx}\sin x=\cos x\tag{c}

Derivative of y = cos x

Method (a): limit definition.

\begin{aligned} \frac{dy}{dx}&=\lim_{h\to0}\frac{\cos x\cos h-\sin x\sin h-\cos x}{h}\\ &=\cos x\cdot\lim_{h\to0}\frac{\cos h-1}{h}-\sin x\cdot\lim_{h\to0}\frac{\sin h}{h}\\ &=\cos x\cdot0-\sin x\cdot1=-\sin x \end{aligned}

Method (b): using the Chain Rule and cos x = sin ( π / 2 x ) :

d d x cos x = ( cos u ) ( 1 ) | u = π / 2 x = cos ( π / 2 x ) = sin x \frac{d}{dx}\cos x=-\sin x\tag{d}
  • Both sin x and cos x are differentiable everywhere.
  • You must memorize the derivatives of sine and cosine.

Derivative of y = tan x

Write tan x = sin x cos x and apply the Quotient Rule:

\begin{aligned} \frac{d}{dx}\tan x&=\frac{\cos x\cdot\cos x-(-\sin x)\cdot\sin x}{\cos^2 x}=\frac{\cos^2 x+\sin^2 x}{\cos^2 x}=\frac{1}{\cos^2 x}=\sec^2 x \end{aligned}

Because 1 / cos 2 x = ( sin 2 x + cos 2 x ) / cos 2 x = tan 2 x + 1 :

d d x tan x = sec 2 x = 1 + tan 2 x

Derivative of y = cot x

\begin{aligned} \frac{d}{dx}\cot x&=\frac{d}{dx}\frac{\cos x}{\sin x}=\frac{-\sin x\cdot\sin x-\cos x\cdot\cos x}{\sin^2 x}=-\frac{1}{\sin^2 x}=-\csc^2 x \end{aligned}

Because 1 / sin 2 x = ( sin 2 x + cos 2 x ) / sin 2 x = 1 + cot 2 x :

d d x cot x = csc 2 x = ( 1 + cot 2 x )

Derivative of y = sec x

\begin{aligned} \frac{d}{dx}\sec x&=\frac{d}{dx}\frac{1}{\cos x}=\frac{0\cdot\cos x-(-\sin x)\cdot1}{\cos^2 x}=\frac{\sin x}{\cos^2 x}=\tan x\sec x \end{aligned} d d x sec x = tan x sec x

Derivative of y = csc x

\begin{aligned} \frac{d}{dx}\csc x&=\frac{d}{dx}\frac{1}{\sin x}=\frac{-\cos x}{\sin^2 x}=-\cot x\csc x \end{aligned} d d x csc x = cot x csc x

The three "co-" functions (cosine, cotangent, cosecant) have minus signs in front of their derivatives.

Worked Examples

Differentiate: (a) y = sin a x , (b) y = cos a x , (c) y = tan a x .

Solution (a) Let u = a x . Then y = sin u and by the Chain Rule: d y d x = cos u a = a cos a x (b) Similarly, d y d x = sin u a = a sin a x . (c) d y d x = a ( 1 + tan 2 a x ) = a sec 2 ( a x ) .

Differentiate y = sin 2 x .

Solution **Method (a):** Write y = u 2 with u = sin x : d y d x = 2 u cos x = 2 sin x cos x **Method (b):** Write y = 1 2 ( 1 cos 2 x ) : d y d x = 1 2 ( 2 sin 2 x ) = sin 2 x Both are the same since sin 2 x = 2 sin x cos x .

Differentiate y = sin 2 x .

Solution Let y = u 2 , u = sin v , v = x . Then: d y d x = 2 u cos v 1 2 x = ( 2 sin x ) ( cos x ) 1 2 x = sin ( 2 x ) 2 x

If z = cos ( sin 3 x 2 ) , find d z / d x .

Solution Note cos ( sin 3 x 2 ) = cos ( ( sin ( x 2 ) ) 3 ) . Let z = cos u , u = t 3 , t = sin w , w = x 2 : d z d x = ( sin u ) ( 3 t 2 ) ( cos w ) ( 2 x ) Substituting back: d z d x = 6 x ( cos x 2 ) ( sin 2 x 2 ) sin ( sin 3 x 2 )

Frequently Asked Questions

Why does the derivative of cosine have a minus sign? The cosine function is decreasing on ( 0 , π ) where sine is positive, so its derivative must be negative on that interval. This matches d d x cos x = sin x . Geometrically, the tangent line to y = cos x has negative slope when sin x > 0 .

Do these derivatives require x to be in radians? Yes. The limit lim x 0 ( sin x ) / x = 1 holds only when x is in radians. If x is in degrees, extra conversion factors appear, making the formulas much messier.

How can I remember whether (\sec x)' involves tan x or cot x ? Remember the pairing: secant goes with tangent (both involve cosine in the denominator), and cosecant goes with cotangent (both involve sine). Both derivatives also include a copy of the original function: (\sec x)'=\sec x\tan x and (\csc x)'=-\csc x\cot x.