The derivative of ex is ex, and the derivative of lnx is 1/x for x>0. With x in radians, the derivative of sinx is cosx and the derivative of cosxis −sinx. Each follows from the limit definition, and each combines with the sum, product and chain rules.
Find the slope of 2x at x=0 with a small step, h=0.001. The secant slope is (20.001−1)/0.001≈0.6934. At x=3 the same step gives about 5.547, which is 8×0.6934. The slope at x=3 is the slope at 0 times the height there, 23=8.
Every exponential behaves this way. The slope of bx is bx times its slope at 0. The table shows the slope at 0 for three bases. For base 2 it is below 1, and for base 3 it is above 1. Between them is a base whose slope at 0 is exactly 1. That base is e≈2.71828, and the graph of ex has a slope equal to its height everywhere.
The sine has a pattern of its own. Its secant slopes at x=0,π/3,π/2 and π, with the same step, are about 1,0.4996,−0.0005and −1. Those are the values of cosx at the same points, 1,0.5,0and −1.
0.00120.001−1≈0.6934
The slope of bx at x=0, estimated by (bh−1)/h with h=0.001
Base b
(bh−1)/h
lnb
2
0.6934
0.6931
e≈2.71828
1.0005
1
3
1.0992
1.0986
The rule
Five derivatives to know
Each formula holds wherever its function is defined, with x in radians for the sine and cosine. Here e≈2.71828 is Euler’s number, lnx is the natural logarithm, the logarithm to base e, and b is any positive base other than 1.
The exponential ex is its own derivative. Another base b picks up the constant factor lnb. The logarithm’s derivative is 1/x, defined only for x>0. The sine’s derivative is the cosine, and the cosine’s is minus the sine.
The tangent, secant, cosecant and cotangent are quotients of the sine and cosine, so the quotient rule gives their derivatives. The quotient rule lesson works tanx through to sec2x. The three whose names start with “co” carry a minus sign.
Derivatives of the other trigonometric functions
f(x)
f′(x)
tanx
sec2x
secx
secxtanx
cscx
−cscxcotx
cotx
−csc2x
Why it works
Why each formula holds
For ex, the difference quotient factors. Since ex+h=ex⋅eh, the quotient [ex+h−ex]/h equals ex⋅(eh−1)/h. The factor (eh−1)/h does not depend on x, and for base e it tends to 1, as the table showed. The same factoring gives bx times (bh−1)/h for any base. Writing bh as ehlnb shows that this factor tends to lnb. Put k=hlnb. Then (bh−1)/h=lnb⋅(ek−1)/k, and k shrinks to 0 with h, so the second factor tends to 1.
For lnx, use the fact that it undoes ex. The graph of lnx is the graph of ex reflected in the line y=x, and a reflection swaps rise and run, so it turns a slope m into 1/m. The point (x,lnx) on the logarithm mirrors the point (lnx,x) on the exponential, where the slope equals the height, x. The slope of lnx there is therefore 1/x.
For sinx, the addition formula turns sin(x+h) into sinxcosh+cosxsinh. The difference quotient becomes sinx⋅(cosh−1)/h+cosx⋅(sinh)/h. As h shrinks to 0,(sinh)/h tends to 1 and (cosh−1)/h tends to 0, which leaves cosx. The same steps on cos(x+h)give −sinx.
hsin(x+h)−sinx=sinxhcosh−1+cosxhsinh→cosx
hsin(x+h)−sinx=sinxhcosh−1+cosxhsinh→cosx
Secant slopes of sinx with h=0.001, beside cosx
x
Secant slope of sinx
cosx
0
1.0000
1
π/3
0.4996
0.5
π/2
−0.0005
0
π
−1.0000
−1
The method
The method in four steps
Name the family of each term before you differentiate it, because the family decides the formula. A variable in the exponent means an exponential. A variable in the base under a fixed exponent means a power. The table works through f(x)=4cosx−2x and its slope at x=0.
f′(x)=−4sinx−2xln2
Differentiating f(x)=4cosx−2x
Step
What to do
For f(x)=4cosx−2x
1
Name the family of each term
a multiple of the cosine, and an exponential with base 2
2
Say where the formulas hold
every x, with x in radians
3
Differentiate term by term
f′(x)=−4sinx−2xln2
4
Substitute a value for a slope
f′(0)=0−ln2≈−0.693
Inside a product, quotient or chain
These formulas are building blocks for the rules that come next in the course. A product such as exsinx needs the product rule, and a quotient such as (lnx)/x needs the quotient rule. A function of a function, such as sin(x2), needs the chain rule.
Two patterns need nothing new. Write e3x as (e3)x, an exponential with base e3. Its derivative is (e3)x times ln(e3), which is 3e3x, and in the same way ekx has derivative kekx. A logarithm can often be simplified first. For x>0,ln(5x)=ln5+lnx, whose derivative is 1/x, because ln5 is a constant. The matching pattern for sin(kx), whose derivative is kcos(kx), waits for the chain rule.
dxde3x=dxd(e3)x=(e3)xlne3=3e3x
dxde3x=dxd(e3)x=(e3)xlne3=3e3x
Where it breaks
Where it breaks
The trigonometric formulas need radians. Measured in degrees, the slope of the sine at 0 is π/180≈0.01745, not 1, because a degree is a much smaller step than a radian. Every derivative picks up that factor, so the derivative of sinx° is (π/180)cosx°.
The logarithm needs x>0, and on that domain its derivative is 1/x. For negative x,ln∣x∣=ln(−x) has the same derivative, 1/x. Neither formula says anything at x=0.
The exponential rule and the power rule look alike and are not. In x3 the base varies and the exponent is fixed, so the derivative is 3x2. In 3x the exponent varies, so the derivative is 3xln3. The power rule on 3x would give x⋅3x−1, which is wrong. For xx, where both vary, neither rule applies as it stands.
dxdx3=3x2dxd3x=3xln3
dxdx3=3x2dxd3x=3xln3
Check your answer
Check your answer
Each of the five formulas can be tested with a secant, a graph or a sign.
Test the formula on a secant. With h=0.001, the secant slope of lnx at x=2 is about 0.4999, against 1/2. Any formula here can be tested the same way, with the calculator set to radians.
Read the graph. The graph of ex climbs faster as it rises, so its slope grows with its height. The graph of lnx climbs ever more slowly, and 1/x shrinks. The sine rises where the cosine is positive and falls where it is negative.
Check the sign on a cosine. Just after x=0 the cosine falls while sinx is positive, which is why its derivative is −sinx.
To have Chalk check the work, write the function on the first row of a Math box as f(x)=… and the derivative below it as f′(x)=…. A value such as f′(1)≈8.856 or f′(1)=4+4ln4 can follow. A slip such as sinx for the derivative of cosx reads ✗ with “Not the derivative of row 1.”
A value of a power with an irrational exponent is checked too, such as f′(1)=2e for ex+xe.
At x=2,2x and x2 both equal 4. Which one is rising faster there?
x2. Its slope is 2x=4. The slope of 2x is 2xln2=4ln2≈2.77, because a base other than e carries the factor lnb, and ln2<1. Expecting the exponential to win skips that factor. It does win later. At x=4 both equal 16, and the slopes are about 11.1and 8.
Where e comes from, and where these lead
The number e can be defined by the slope condition, as the base whose exponential has slope 1at 0. It is also the limit of (1+1/n)n as n grows, 2.71828…. Compound interest makes that concrete. One dollar at 100% interest, compounded n times a year, grows to (1+1/n)n dollars, and compounding ever more often approaches e dollars.
The derivatives of sinx cycle through cosx,−sinxand −cosx, then back to sinx. That is why the sine and cosine solve f′′=−f, the equation of a spring and of a pendulum swinging through small angles.
Read backwards, every formula here is an antiderivative. The antiderivative of 1/x is ln∣x∣+C, which fills the one gap in the power rule for antiderivatives, the exponent −1.
e=n→∞lim(1+n1)n≈2.71828
Common mistakes
Using the power rule on ex. The exponential is not a power of x, so its derivative is ex itself, not x⋅ex−1. The variable sits in the exponent.
Working in degrees. With x in degrees, the derivative of sinx is (π/180)cosx, so the standard formulas are off by a factor of about 57 unless x is in radians.
Getting the sign of the cosine’s derivative wrong. The derivative of cosxis −sinx, not sinx, because the cosine falls just after x=0, where sinx is positive.
Forgetting the factor inside e. The derivative of e2x is 2e2x, not e2x, because e2x is (e2)x and ln(e2)=2. The exponent changes twice as fast as x. Inside lna constant factor drops out, since ln5x=ln5+lnx has derivative 1/x.
Dropping lnb for another base. The derivative of 2x is 2xln2, about 0.693⋅2x, not 2x. Only base e has the factor 1.
Key terms
Euler’s number
The irrational constant e≈2.71828, the base of natural exponentials and logarithms. The function ex is its own derivative: its slope always equals its value.
Exponential function
A function with the variable in the exponent, such as bx with a fixed base b>0,b=1. Each step of 1 in x multiplies the output by b. The natural exponential ex has base e≈2.718.
Natural logarithm
The logarithm with base e, written lnx. It undoes ex:ln(ex)=x for every x, and elnx=x for x>0.
Radian
An angle measure: arc length divided by radius. A full turn is 2π radians (360°), and calculus formulas such as (sinx)′=cosx assume radians.
Derivative
The instantaneous rate of change of a function: the limit of the average rate of change as the step shrinks to zero, when that limit exists. On a graph it is the slope of the tangent line.
Chain rule
The rule for differentiating a function inside another function: [f(g(x))]′=f′(g(x))⋅g′(x). Differentiate the outside, keeping the inside as it is, then multiply by the derivative of the inside.
Work through an example
Differentiate f(x)=3ex−2lnx+5sinx, then find the slope of its graph at x=1(x in radians).