Unit 2: Differentiation: Definition and Fundamental Properties
Derivatives of cos x, sin x, eˣ, and ln x
Know and use the derivatives of sin x, cos x, eˣ and ln x, see where each comes from, and spot a limit that is secretly one of these derivatives.
Topic 2.7 · 9 min read
The power rule handles xn, where the base varies and the exponent is fixed. It says nothing about sinx, about ex (where the exponent varies), or about lnx. Each of these four functions gets its derivative from the limit definition and one special limit, and the results are short: the derivative of sinx is cosx, of cosx is −sinx, of ex is ex itself, and of lnx is x1.
Sine and cosine
Start with the picture. The graph of y=sinx below has slope 1 as it crosses the origin, slope 0 at its peak at x=2π, slope −1 crossing x=π, and slope 0 again at its low point at x=23π. Those slopes, 1,0,−1,0,1, are exactly the values of cosx at the same points.
To prove it, use the angle-sum identity sin(x+h)=sinxcosh+cosxsinh in the difference quotient and group the terms by what multiplies them:
hsin(x+h)−sinx=sinx⋅hcosh−1+cosx⋅hsinh.
As h→0, sinx and cosx don't change, because they don't involve h. Two limits remain. The first, h→0limhsinh=1, comes from the squeeze theorem (topic 1.8). The second follows from it: multiplying top and bottom by cosh+1 and using cos2h−1=−sin2h,
hcosh−1=−hsinh⋅cosh+1sinh⟶−1⋅20=0.
So the difference quotient approaches sinx⋅0+cosx⋅1=cosx. The same steps with cos(x+h)=cosxcosh−sinxsinh give cosx⋅0−sinx⋅1=−sinx.
The minus sign on the cosine derivative matches the graph: on (0,π), where sinx>0, the cosine curve is falling, so its slope −sinx is negative there.
These formulas need x in radians. The limit hsinh→1 is true only when h is measured in radians; with degrees the limit is 180π, and every derivative would carry that factor. Calculus assumes radians throughout, so a calculator used for calculus must be in radian mode.
The exponential function ex
For any base b>0, the law of exponents bx+h=bxbh lets bx factor out of the difference quotient:
hbx+h−bx=bx⋅hbh−1.
The remaining fraction doesn't involve x, so its limit is a single number for each base; call it L(b). Then dxdbx=L(b)bx: every exponential function grows at a rate proportional to its own height. Small values of h estimate L(b). For b=2 the fraction is about 0.693, and for b=3 it is about 1.099. One base between 2 and 3 makes the constant exactly 1, and that base is e≈2.71828. So
h→0limheh−1=1,dxdex=ex.
The graph of y=ex therefore has slope equal to its height at every point: slope 1 at (0,1), slope e2≈7.389 at (2,e2). Since ex>0 everywhere, the slope is always positive and the function is always increasing. (Other bases have L(b)=lnb, so dxdbx=bxlnb; topic 3.1 shows why.)
Compare ex with xe. In xe the exponent is the constant e, so the power rule applies and the derivative is exe−1. In ex the variable is in the exponent, and the power rule doesn't apply at all.
The natural logarithm lnx
The natural logarithm lnx is the logarithm with base e: lnx=y means ey=x. It is defined only for x>0, and its graph is the graph of y=ex reflected across the line y=x.
That reflection gives the derivative. Take any point (a,ea) on the graph of ex; its tangent line has slope ea, meaning a rise of ea for every run of 1. Reflecting across y=x swaps every horizontal distance with a vertical one, so the reflected tangent line, which touches the graph of lnx at (ea,a), has a rise of 1 for every run of ea, a slope of ea1. At that point the x-coordinate is ea, so the slope there is x1. Topic 3.3 turns this picture into the general rule for derivatives of inverse functions.
The derivative x1 is positive for every x>0, so lnx is always increasing, and it shrinks toward 0 as x grows, so the graph keeps rising but flattens out. Near x=0 the slope is huge, matching the graph's steep drop toward its vertical asymptote.
Logarithm properties combine with these rules to handle more forms before you learn the chain rule. Because ln(5x)=ln5+lnx, its derivative is 0+x1=x1: scaling the input of ln by 5 shifts its graph up by ln5 and changes no slope. Because ln(x3)=3lnx for x>0, its derivative is x3.
Limits that are derivatives in disguise
The definition of the derivative at x=a comes in two forms:
f′(a)=h→0limhf(a+h)−f(a)=x→alimx−af(x)−f(a).
Read backward, this means some limits are derivatives you already know. Every such limit has the indeterminate form 00, so plugging in fails, but if you recognize the shape you can evaluate it with a derivative rule. To match a limit to the definition:
Find the function f and the point a: the expression being evaluated at a+h (or at x) tells you f, and the point it approaches tells you a.
Check that the term being subtracted really is f(a).
The limit equals f′(a). Differentiate f and evaluate at a.
For example, h→0limhe2+h−e2 has f(x)=ex and a=2, and the subtracted term e2 is f(2), so the limit is f′(2)=e2. And the limit x→0limxsinx=1 from topic 1.8 is itself one of these: since sin0=0, it is the derivative of sinx at 0, which is cos0=1.
Worked examples
Worked exampleExample 1: using the rules with rewriting
Find dxdy for each function.
(a) y=4cosx−3ex+6lnx
(b) y=ex+2
(c) y=ln(3x)
Show solution
(a) Apply the constant multiple and sum rules (topic 2.6) with the four new derivatives, minding the sign on cosine:
dxdy=4(−sinx)−3ex+x6=−4sinx−3ex+x6.
(b) This is not ex, but the law of exponents makes it a constant multiple of ex: ex+2=e2⋅ex. The factor e2 is a constant, so
dxdy=e2⋅ex=ex+2.
(c) Use logarithm properties to turn the quotient and root into a sum: ln(3x)=21lnx−ln3. The term ln3 is a constant, so
dxdy=21⋅x1=2x1,x>0.
In (b) and (c), rewriting with exponent or logarithm laws reduces each function to the basic forms; topic 3.1's chain rule gives the same answers.
Worked exampleExample 2: horizontal tangents and a tangent line
Let f(x)=3x+2cosx for 0≤x≤2π.
(a) Find the values of x at which the graph of f has a horizontal tangent line.
(b) Write an equation for the line tangent to the graph of f at x=0.
Show solution
(a) f′(x)=3−2sinx. A horizontal tangent needs f′(x)=0, so sinx=23. On [0,2π] the sine is 23 at x=3π and x=32π, the two angles in the first and second quadrants with reference angle 3π.
(b) The point: f(0)=0+2cos0=2. The slope: f′(0)=3−2sin0=3. The tangent line is
y=2+3x.
Worked exampleExample 3: limits as derivatives
Evaluate each limit.
(a) h→0limhsin(6π+h)−21
(b) x→elimx−elnx−1
(c) h→0limhcos(π+h)+1
Show solution
Each limit is 00 if you plug in, so look for the definition of a derivative.
(a) The function evaluated at 6π+h is sin, so f(x)=sinx and a=6π. The subtracted term is sin6π=21=f(a). The limit is f′(6π)=cos6π=23.
(b) This is the x→a form with f(x)=lnx and a=e, and the subtracted 1 is lne=f(e). The limit is f′(e)=e1.
(c) Here f(x)=cosx and a=π. Adding 1 is subtracting cosπ=−1, so the numerator is f(π+h)−f(π). The limit is f′(π)=−sinπ=0.
Step 2 matters in (c): the "+1" looks wrong until you see that it is −f(π).
Worked exampleExample 4: an exam-style free-response question
Let f(x)=lnx and g(x)=ex.
(a) The line tangent to the graph of f at x=a passes through the origin. Find a and write an equation for this tangent line.
(b) (Calculator) Find the value of x at which the lines tangent to the graphs of f and g are parallel.
Show solution
(a) Write the tangent line at a general point first, then impose the condition. At x=a the point is (a,lna) and the slope is f′(a)=a1, so the tangent line is
y=lna+a1(x−a).
It passes through (0,0) exactly when 0=lna+a1(0−a)=lna−1, so lna=1 and a=e. The line is y=1+e1(x−e), which simplifies to y=ex.
(b) Parallel tangent lines have equal slopes, so solve f′(x)=g′(x), that is, x1=ex with x>0. This equation has no algebraic solution, so solve it on a calculator (for example, find where ex−x1 crosses zero): x=0.567.
Part (b) is calculator-active because the equation mixes x with ex. On the exam, set up the equation in writing and then report the calculator's solution to three decimal places.
Where students lose points
On the exam
These four derivatives are expected from memory on both sections; no formula sheet gives them. A limit written as a difference quotient asks for f′(a); recognizing the function and the point is the whole task, and no work beyond the derivative rule is needed. On calculator-active questions, the calculator can evaluate a derivative at a point, but any equation like x1=ex should be written down before you solve it.
Check yourself
Question 1
If f(x)=sinx+cosx, what is f′(43π)?
A
0
B
−2
C
2
D
1
Show answer
B
f′(x)=cosx−sinx, and at 43π that is −22−22=−2. Choice A comes from writing the derivative of cosx as +sinx (it is also the value of f itself there).
Question 2
Evaluate h→0limhe3+h−e3.
Show answer
e3
This is the definition of the derivative of f(x)=ex at a=3, since e3=f(3). The derivative of ex is ex, so the limit is f′(3)=e3.
Question 3
What is h→0limhln(1+h)?
A
0
B
e
C
1
D
The limit does not exist.
Show answer
C
Since ln1=0, the numerator is ln(1+h)−ln1, so the limit is the derivative of lnx at x=1, which is 11=1. Choice A treats the 00 form as if the numerator's 0 settled it.
Question 4
At what point on the graph of y=lnx is the tangent line's slope equal to 2?
Show answer
(21,−ln2)
The slope is x1, and x1=2 at x=21. The y-coordinate is ln21=−ln2.