Lesson 2.6 · Differentiation: Definition and Basic Rules
Derivatives of sine, cosine, eˣ and ln x
Polynomials aren't the only functions that model the world. Tides, sound waves and seasonal temperatures are periodic; populations and investments grow exponentially; the pH scale and decibels are logarithmic. This lesson gives the derivatives of the four most important non-polynomial functions: sinx, cosx, ex and lnx.
Sine and cosine
Look at the graph of y=sinx and think about its slope at each point. At x=0 it rises steeply, with slope 1. At x=2π it levels off at the top, with slope 0. At x=π it falls, with slope −1. Plot those slopes and you trace out the cosine curve.
y = sin x and y = cos x. Wherever sin x is steepest, cos x is at its highest or lowest point; wherever sin x levels off, cos x is 0.Open in grapher →
The definition confirms it. Using the identity sin(x+h)=sinxcosh+cosxsinh,
hsin(x+h)−sinx=sinx⋅hcosh−1+cosx⋅hsinh
You met the two special limits in Unit 1: h→0limhsinh=1 and h→0limhcosh−1=0. So the whole expression approaches sinx⋅0+cosx⋅1=cosx. A similar calculation works for cosine.
Derivatives of sine and cosine
dxd[sinx]=cosx,dxd[cosx]=−sinx
Here x is measured in radians. The formulas are false in degrees.
The minus sign on the derivative of cosine makes sense from the graph: just after x=0, cosx is decreasing while sinx is positive.
The exponential function ex
Every exponential function bx has a derivative proportional to itself. The number e≈2.71828 is the one base where the constant of proportionality is exactly 1: it is defined so that
h→0limheh−1=1
With that, the definition of the derivative gives
dxd[ex]=h→0limhex+h−ex=ex⋅h→0limheh−1=ex
So ex is its own derivative: at every point, the slope of y=ex equals its height.
The natural logarithm lnx
The graph of y=lnx is the reflection of y=ex across the line y=x. Reflecting swaps rise and run, so a slope of m on ex becomes a slope of m1 on lnx. At the point (x,lnx), the matching point on ex has height x and therefore slope x, so the slope of lnx is x1. (Unit 3 proves this carefully.)
Derivatives of eˣ and ln x
dxd[ex]=ex,dxd[lnx]=x1(x>0)
All four new rules combine with the sum, difference and constant multiple rules exactly like powers of x do.
Worked example: Mixing the rules
Differentiate (a) f(x)=3sinx−2cosx and (b) g(x)=4ex−lnx+x2.
(a) f′(x)=3cosx−2(−sinx)=3cosx+2sinx.
(b) g′(x)=4ex−x1+2x.
Worked example: A tangent line to eˣ
Find the tangent line to y=ex at x=0.
The point is (0,e0)=(0,1) and the slope is e0=1. The tangent line is y−1=1(x−0), or y=x+1.
This is the definition of f′(2π) for f(x)=cosx. Since f′(x)=−sinx, the limit equals
−sin2π=−1
Common mistake
Signs on the trig derivatives are the most common slip. Only the cosine derivative gets a minus sign: dxd[cosx]=−sinx, but dxd[sinx]=+cosx. Also, ex is not a power function: dxd[ex]=xex−1.
Tip
Differentiating sine four times brings you back where you started: sinx→cosx→−sinx→−cosx→sinx. If you forget a sign, picture the graphs and check the slope at x=0.
Practice
Practice 1
Find f′(x) for f(x)=5cosx+sinx.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 2
Find f′(x) for f(x)=2ex−3lnx.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 3
Let f(x)=x3−4sinx. Find f′(0).
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 4
Find the slope of the tangent line to y=lnx at x=5.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 5
Find an equation of the tangent line to y=sinx at x=π.
Enter an expression, e.g. 3x^2 - 2x + 1
Practice 6
h→0limhcos(3π+h)−21 is
Practice 7
Find the value of x where f(x)=ex−2x has a horizontal tangent line.
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Practice 8
How many values of x in the interval 0≤x≤2π give a horizontal tangent line to f(x)=sinx+cosx?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.