Reading history

Derivatives of Trigonometric Functions

6 min read 1 views

Prove that the derivative of sin x is cos x, find the derivatives of cos, tan, sec, cosec and cot, and apply them with the chain rule and to SHM.

Waves, pendulums, alternating current and the seasons all follow trigonometric functions, so their derivatives appear everywhere in science and engineering. In this lesson you will prove that the derivative of sin x is cos x straight from the definition, see why the derivative of cos x has a minus sign, and use the quotient rule to find the derivatives of tan, sec, cosec and cot. Then you will combine them with the chain, product and quotient rules in worked examples.

In this lesson you will learn

  • A first-principles proof that (sin x)′ = cos x
  • Why (cos x)′ = −sin x, with a graph to check it
  • The derivatives of tan x, sec x, cosec x and cot x
  • Trigonometric derivatives with the chain rule, such as sin(5x) and cos²x
  • Velocity and acceleration in simple harmonic motion

You should know the special limits sin x / x and (1 − cos x)/x, the chain rule and the compound angle formulas. Angles are in radians throughout.

The Derivative of sin x

Use the definition and the formula sin(A + B) = sin A cos B + cos A sin B:

(sin x)′ = lim [sin(x + h) − sin x] / h
           h→0
         = lim [sin x cos h + cos x sin h − sin x] / h
         = lim [ sin x · (cos h − 1)/h  +  cos x · (sin h)/h ]
         = sin x · 0  +  cos x · 1
         = cos x

The two special limits from the earlier lesson do all the work: (cos h − 1)/h → 0 and sin h / h → 1. Because those limits are only true in radians, this result is only true in radians too.

Checking With the Graphs

xyy = sin x, with tangent linesslope 1slope 0slope −1slope 0slope 1xyy = cos x: its heights match those slopesπ/2π3π/22π

Look at the slope of the sine curve. At x = 0 it rises most steeply, with slope 1, and cos 0 = 1. At x = π/2 the sine curve is at its peak and flat, slope 0, and cos(π/2) = 0. At x = π it falls most steeply, slope −1, and cos π = −1. The slope of sin x traces out exactly the cosine curve.

The same check explains the minus sign for cosine. Just after x = 0 the cosine curve starts to fall, so its slope is negative, while sin x is positive there. So the slope of cos x is −sin x.

(cos x)′ = −sin x

The Other Four Functions

Write each one in terms of sin and cos and use the quotient rule:

tan x = sin x / cos x
(tan x)′ = (cos x · cos x − sin x · (−sin x)) / cos²x
         = (cos²x + sin²x) / cos²x
         = 1 / cos²x = sec²x

sec x = 1 / cos x
(sec x)′ = (0 · cos x − 1 · (−sin x)) / cos²x = sin x / cos²x = sec x tan x
f(x)f′(x)
sin xcos x
cos x−sin x
tan xsec²x
sec xsec x tan x
cosec x−cosec x cot x
cot x−cosec²x

A pattern to help you remember

The three “co” functions (cos, cosec, cot) all have a minus sign in their derivatives. Each one mirrors its partner: sin → cos becomes cos → −sin, tan → sec² becomes cot → −cosec², and sec → sec tan becomes cosec → −cosec cot.

With the Chain Rule

d/dx sin(5x)      = cos(5x) · 5               = 5 cos 5x
d/dx cos(x² + 1)  = −sin(x² + 1) · 2x         = −2x sin(x² + 1)
d/dx tan(3x − 2)  = sec²(3x − 2) · 3          = 3 sec²(3x − 2)
d/dx cos²x        = 2 cos x · (−sin x)        = −sin 2x
d/dx √(sin x)     = ½(sin x)^(−1/2) · cos x   = cos x / (2√(sin x))

In general: d/dx sin(ax + b) = a cos(ax + b), and similarly for the others. The number in front of x always comes out as a factor.

With the Product and Quotient Rules

y = x² cos x
dy/dx = 2x cos x + x²(−sin x) = 2x cos x − x² sin x

y = sin x / x
dy/dx = (x cos x − sin x) / x²

Application: Simple Harmonic Motion

A mass on a spring moves with position x(t) = 5 cos(2t) cm, where t is in seconds.

velocity      v = dx/dt = −10 sin(2t)  cm/s
acceleration  a = dv/dt = −20 cos(2t)  cm/s²  = −4x

At t = π/4:  x = 5 cos(π/2) = 0,  v = −10 sin(π/2) = −10 cm/s
The mass passes the centre at its top speed, 10 cm/s, moving in the negative direction.

The result a = −4x says the acceleration always points back towards the centre and is proportional to the distance. That is the definition of simple harmonic motion, and the chain rule produced it in two lines.

Common Mistakes

  1. Forgetting the minus sign for cos, cosec and cot.
  2. Using degrees. d/dx sin x = cos x only in radians.
  3. Dropping the inside derivative. d/dx sin(5x) = 5 cos(5x), not cos(5x).
  4. Writing (tan x)′ = sec x. It is sec²x.
  5. Confusing cos²x with cos(x²). Their derivatives are −sin 2x and −2x sin(x²).

Practice Exercises

Exercise 1. Differentiate y = 3 sin(4x) − 2 cos x.

Show answer

dy/dx = 12 cos(4x) + 2 sin x.

Exercise 2. Differentiate y = x tan x.

Show answer

Product rule: dy/dx = tan x + x sec²x.

Exercise 3. Find the equation of the tangent to y = sin x at x = π.

Show answer

The point is (π, 0) and the slope is cos π = −1. Tangent: y = −(x − π), so y = π − x.

Frequently Asked Questions

Why is the derivative of sin x equal to cos x?

Using the definition of the derivative and the formula for sin(x + h), the expression splits into sin x times (cos h – 1)/h plus cos x times (sin h)/h. As h approaches zero these limits are 0 and 1, which leaves cos x. The proof needs x in radians.

What is the derivative of tan x?

The derivative of tan x is sec squared x, which equals 1 over cos squared x. You can prove it by writing tan x as sin x over cos x and using the quotient rule together with sin squared plus cos squared equals 1.

Summary

  • (sin x)′ = cos x and (cos x)′ = −sin x, in radians.
  • (tan x)′ = sec²x, (sec x)′ = sec x tan x; the “co” functions add a minus sign.
  • With the chain rule, d/dx sin(ax + b) = a cos(ax + b).
  • The slope of the sine curve is the cosine curve; graphs make a quick check.
  • In simple harmonic motion, differentiating twice gives a = −ω²x.

Next: Derivatives of Exponential and Logarithmic Functions.

Lessons are also marked complete when you click Next.

Leave a Reply

Your email address will not be published. Required fields are marked *