Derivatives of sine, cosine and tangent · Mathematics… | StemPy Lab
Course 20.2·Lesson 2 of 3
Derivatives of sine, cosine and tangent
From the definition, dxdsinx=cosx
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
derive the derivatives of sinx, cosx and tanx from the definition;
use the results to find slopes and horizontal tangents;
state the derivatives of ex and lnx and where they come from.
Why sine needs the standard limits
The derivative of xn came from a factorisation. Sine has no such factorisation. Instead we use the addition formula and the standard limits of the first course. All angles are in radians.
The derivative of sine
Let f(x)=sinx. Then
hsin(x+h)−sinx
=hsinxcosh+cosxsinh−sinx.
Split this into two parts:
=cosx⋅hsinh−sinx⋅h1−cosh.
As h→0 we have hsinh→1. Also h1−cosh=h⋅h21−cosh→0×21=0. So
dxdsinx=cosx.
Two graphs one above the other, with the same x axis from -2 pi to 2 pi. The upper graph is y = sin x in blue, with three short orange tangent lines drawn at x = -pi over 2, 0 and pi over 2. Their slopes are 0, 1 and 0. The lower graph is y = cos x in green, with red points at the same three x values at heights 0, 1 and 0, showing that the height of cosine equals the slope of sine.
The picture shows why this is reasonable. Where the sine curve rises fastest, at x=0, the slope is 1, which is cos0. At the top of the wave, x=2π, the tangent is flat, and cos2π=0.
The derivative of cosine
In the same way,
hcos(x+h)−cosx=−cosx⋅h1−cosh−sinx⋅hsinh.
As h→0 the first part tends to 0 and the second tends to −sinx.
So dxdcosx=−sinx. The minus sign is the one to remember: just after x=0 the cosine curve falls.
The derivative of tangent
For f(x)=tanx use tan(x+h)−tanx=cos(x+h)cosxsin((x+h)−x)=cos(x+h)cosxsinh. Then
htan(x+h)−tanx=hsinh⋅cos(x+h)cosx1.
As h→0 this tends to cos2x1=sec2x.
So dxdtanx=sec2x. It is always positive: the tangent curve is rising wherever it is defined.
Exponential and logarithm
The standard limits of the first course give two more results at once.
hex+h−ex=ex⋅heh−1→ex. So dxdex=ex, the function that equals its own derivative.
hln(x+h)−lnx=hln(1+xh)=x1⋅h/xln(1+xh)→x1. So dxdlnx=x1 for x>0.
Also dxdax=axlna, because hah−1→lna.
A table to keep
f(x)
f′(x)
sinx
cosx
cosx
−sinx
tanx
sec2x
ex
ex
lnx
x1
The derivatives of secx, cscx and cotx come from the quotient rule in the next lesson.
A worked example
Find where the tangent to y=sinx has slope 21 for 0<x<2π.
The slope is cosx. We need cosx=21.
In the interval, cosx=21 at x=3π.
The point is (3π,23).
Another: the tangent to y=cosx is horizontal where −sinx=0, which is at x=0,±π,±2π,…
Practise with new numbers
Try it in Python
The program compares the difference quotient with the formula for sinx, cosx and tanx at x=0.7. It also prints h1−cosh for smaller and smaller h.
Common mistakes
Degrees. The formulas dxdsinx=cosx and so on are true for x in radians only.
Losing the minus sign for cosine.dxdcosx=−sinx.
Writing dxdtanx=secx. The square is part of the answer: sec2x.
Confusing dxdex with xex−1. The power rule does not apply to ex, because the variable is in the exponent.
Remember these
(sinx)′=cosx, (cosx)′=−sinx, (tanx)′=sec2x, with x in radians.
(ex)′=ex, (lnx)′=x1, (ax)′=axlna.
The proofs use hsinh→1 and h1−cosh→0.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the slope of the tangent to y=sinx at x=3π.
Find the slope of y=tanx at x=4π.
Differentiate y=3sinx−2cosx.
At which values of x in [0,2π] is the tangent to y=sinx horizontal?
Why does the proof for sinx need h1−cosh→0?
Find the slope of y=lnx at x=4.
References
OpenStax, Calculus Volume 1, Chapter 3, section 3.5 on the derivatives of trigonometric functions.
NCERT, Mathematics Textbook for Class XI, Chapter 12, the derivatives of sinx and cosx from the definition.
Enroll free in Derivatives from First Principles to the Product Rule
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.