We know how to find the derivative of any power of x, like x2 or x3. But functions like sinx,ex and lnx aren't powers of x, so the power rule can't tell us their derivatives.
To find the derivative of sinx, let's look at the slopes of its tangent lines, starting at x=0, where the slope is easiest to find. There we can use a limit from the Squeeze Theorem:
h→0limhsinh=1,sinh≈h
Find the derivative of sinx from the slopes of its graph
Text solution
The slope at x=0For small h,sinh≈h, so stepping right by h raises sinx by about h.
slope at 0=1
The slope at x=πStepping right by h from π lowers sinx by about h.
sin(π+h)=−sinh≈−h→slope −1
The other three pointsAt the maximum x=2π and the minimum x=23π, the tangent line is horizontal, so the slope is 0. At x=2π, the graph repeats, so the slope is 1 again.
Plotting the slope of sinx at every x traces the graph of cosx.
dxdsinx=cosx
For the derivative of cosx, we don't have to trace its slopes from scratch. The graph of cosx is just the graph of sinx shifted left by 2π, so its tangent lines are shifted too.
Find the derivative of cosx by shifting the graph of sinx
Text solution
Shift the slopes tooShifting a curve to the left moves each tangent line with it, keeping the same slope. So the graph of the slopes of cosx is the graph of the slopes of sinx, which is cosx, shifted left by 2π. That gives −sinx.
Check the minus signOn 0<x<π,cosx decreases from 1 to −1, so its slope is negative. But sinx is positive there, so the derivative has to be −sinx.
dxdcosx=−sinx
Each derivative shifts the graph left by another 2π, so after four of them we're back at sinx.
sinxd/dxcosxd/dx−sinxd/dx−cosxd/dxsinx
sinxd/dxcosxd/dx−sinxd/dx−cosxd/dxsinx
What graphs do we get when we plot the slopes of sine and cosine?
Slopes of sine and cosine
2
Derivatives of the other four trig functions
We already have the derivatives of sinx and cosx. But what about tanx,secx,cotx, and cscx?
Every one of these four functions is a fraction made of sinx and cosx. So we don't need any new limits. We can find all four derivatives with the quotient rule and the identity sin2x+cos2x=1.
tanx: the top becomes 1The two minuses make +sin2x, so the top is cos2x+sin2x.
(cosxsinx)′=cos2xcos2x+sin2x=cos2x1=sec2x
secx: split the cos2xThe derivative of 1 is 0, which leaves sinx over cos2x. Splitting cos2x into cosx⋅cosx writes it with trig functions we know.
cos2xsinx=cosx1⋅cosxsinx=secxtanx
cotx and cscx: the same stepsFor cotx, the minus comes from the derivative of cosx. For cscx, it comes from the subtraction in the quotient rule.
(sinxcosx)′=−sin2x1=−csc2x
(sinx1)′=−sin2xcosx=−cscxcotx
Here are all six derivatives in co-function pairs. Every "co" function (cosx,cotx, and cscx) has a minus sign in its derivative, so once you know the derivatives of sinx,tanx, and secx, you can swap each function for its co-function and add a minus sign to get the other three.
We know the derivative of x2 is 2x. But what if x is in the exponent instead?
The power rule only works when the base is x and the exponent is a constant, so the derivative of 2x is not x⋅2x−1. Instead, we go back to the definition of the derivative, and the exponent rule 2x+h=2x⋅2h lets us factor 2x out:
2x+h=2x⋅2h
h2x+h−2x=h2x⋅2h−2x=2x⋅h2h−1
h2x+h−2x=h2x⋅2h−2x=2x⋅h2h−1
Differentiate 2x and find the base e where the slope at 0 is 1
Text solution
The fraction is the slope at 0h2h−1 has no x in it, and at x=0 it's the whole difference quotient. So its limit is the slope of 2x at 0, and every slope is the height times that number.
slope of 2x at x=2x⋅h→0limh2h−1
Estimate itWe can't plug in h=0, but a tiny h gives a close value.
0.00120.001−1≈0.693
slope≈0.693⋅2x
For base 3, the slope at 0 is about 1.10. So somewhere between 2 and 3 there's a base whose slope at 0 is exactly 1, and that base is the number e≈2.718.
Because the slope of ex at 0 is 1, its derivative is just ex⋅1, which is ex.
dxdex=ex
So for ex, the slope equals the height at every point. At (0,1) the slope is 1, and near 0 the curve stays close to its tangent line, which we'll use in the next section:
tangent at (0,1):y=1+x
eu≈1+unear u=0
How does the tangent slope compare with the height on each exponential graph?
Height and slope of an exponential
Now let's find where the curve y=xex has a horizontal tangent. A horizontal tangent means the slope is 0, so we look for where y′=0.
Find the point where y=xex has a horizontal tangent
Text solution
Product ruleThe derivative of x is 1, and the derivative of ex is ex. Then factor out ex.
y′=1⋅ex+x⋅ex=(x+1)ex
ex is never 0For the product to be 0, one factor must be 0, and ex is positive for every x.
x+1=0→x=−1
The pointPlug x=−1 back into y=xex to get the y-coordinate.
y=−1⋅e−1=−e1→(−1,−e1)
4
The derivative of bx
Earlier we found that the slope of 2x at x is 2x times its slope at 0, and we measured that slope at 0 to be about 0.693. But where does that number come from?
To find out, let's connect 2x to ex, whose slope near 0 we already know. The natural log undoes ex, so 2=eln2, and we can write 2h as a power of e:
2=eln2→2h=(eln2)h=ehln2
2=eln2→2h=(eln2)h=ehln2
Find the slope of 2x at 0 and the derivative of bx
h→0limh2h−1≈0.693=?
dxdbx=?
Text solution
Use the tangent line of euNear 0,eu≈1+u. As h goes to 0, so does u=hln2.
2h=ehln2≈1+hln2
The 1s and the hs cancel
h2h−1≈hhln2=ln2,h→0limh2h−1=ln2≈0.693
Any baseThe slope at x is the height times the slope at 0. For any base b>0, writing b=elnb makes the slope at 0 equal to lnb.
So the derivative of an exponential is the function times the natural log of its base:
dxd2x=2xln2
For any base b>0
dxdbx=bxlnb
When the base is e,lne=1, so the derivative of ex is ex⋅1=ex, just as we found before.
Be careful about where x is. The power rule is for x in the base with a constant exponent, and bxlnb is for a constant base with x in the exponent.
x in the base
dxdx2=2x
x in the exponent
dxd2x=2xln2
The number e is a constant, about 2.718. So for xe,x is in the base and the power rule gives exe−1. And e2 is just a constant number, so its derivative is 0.
5
The derivative of lnx
We know that the derivative of ex is ex, but what about its inverse, lnx?
The graph of lnx is the graph of ex reflected across the line y=x. Reflecting swaps the coordinates of every point, so (a,b) becomes (b,a).
(1,e) on y=ex→(e,1) on y=lnx
(1,e) on y=ex→(e,1) on y=lnx
Each tangent line reflects with its point. For example, the point (ln2,2) on y=ex has slope 2: a run of 1 gives a rise of 2. Reflected, the run and the rise swap, so the slope of lnx at x=2 is 21:
(ln2,2) on y=ex:slope=12=2
(2,ln2) on y=lnx:slope=21
Find the derivative of lnx and logbx
Text solution
Any positive xThe point (lnx,x) on y=ex has slope x, so its reflection (x,lnx) has run x and rise 1.
dxdlnx=x1
Other basesThe change-of-base formula writes log2x as lnx over ln2, and ln21 is a constant we just keep.
log2x=ln2lnx→dxdlog2x=xln21
So the derivative of lnx is x1.
dxdlnx=x1
At x=0.1, the slope of lnx is 0.11=10, so the curve has a large slope near 0. At x=10, the slope is 101=0.1, so the slope decreases as x gets large.
For a logarithm with any base b, the change-of-base formula gives:
dxdlogbx=xlnb1
When you have the log of a product, quotient, or power, split it with log laws before differentiating.
ln(ab)=lna+lnb,lnba=lna−lnb,ln(an)=nlna
ln(ab)lnbaln(an)=lna+lnb=lna−lnb=nlna
For ln(5x), splitting gives ln5+lnx. The ln5 is a constant, so its derivative is 0.
The graph of ln(5x) is just the graph of lnx shifted up by ln5. Shifting a graph straight up doesn't change its slope anywhere, so the tangents at x=2 are parallel and both have slope 21.
Every co-function (cosx,cotx, and cscx) has a minus sign in its derivative, while sinx,tanx, and secx don't. When you find the derivative of tanx or cotx with the quotient rule, the numerator simplifies using sin2x+cos2x=1.
Why the derivative of cosx has a minus sign
Between 0 and π,cosx is decreasing, so its slope is negative. Since sinx is positive on 0<x<π, the derivative can't be sinx. It has to be −sinx.
Solving equations with ex
(x+1)ex=0→x=−1
Because ex>0 for every x,ex is never 0. An equation like g(x)ex=0 has solutions only where g(x)=0.
Base versus exponent
dxdex=ex
dxdbx=bxlnb
3x→3xln3,x3→3x2
xe→exe−1,e2→0
When x is in the exponent and the base is a positive constant b, the derivative is bxlnb. When x is in the base and the exponent is a constant number, use the power rule. Since e≈2.718 is a constant number, xe uses the power rule, and e2 is a constant whose derivative is 0.
Logarithms and log laws
dxdlnx=x1
dxdlogbx=xlnb1
ln(5x)=ln5+lnx→x1
Use the log laws to split apart products, quotients, or powers inside a logarithm before taking the derivative. For ln(5x), splitting gives ln5+lnx. The constant ln5 differentiates to 0, so the derivative is x1, not x5.
6
Practice
Enter exact values.
1
Find dxd(4cosx−3cotx+5ex).
What are the derivatives of cosx and cotx? Remember to multiply the derivative of cotx by −3.
If you got 4sinx+3csc2x+5ex Check the derivative of cosx. The derivative of cosx has a minus sign.
If you got −4sinx−3csc2x+5ex Check the sign on the second term. The derivative of cotx is −csc2x, so multiplying by −3 gives a positive term.
Both cosx and cotx are co-functions, so each derivative gets a minus sign.
(cosx)′=−sinx,(cotx)′=−csc2x
Differentiate term by term, and watch the two minus signs on the second term.
Replace cos2x+sin2x with 1, then cancel the common factor of 1+cosx.
(1+cosx)2cosx+1=1+cosx1
6
Let f(x)=log3x+3x. Find f′(1).
Use the rule for each base-3 function. Where does ln3 go in the derivative of log3x, and where does it go in the derivative of 3x?
If you got 1+3ln3 Check the derivative of log3x. For base 3, the derivative has ln3 in the denominator.If you got ln31+1 In 3x,x is in the exponent. Use the rule for bx, not the power rule.
For log3x, the ln3 goes in the denominator, but for 3x, we multiply by ln3.
f′(x)=xln31+3xln3
Plug in x=1.
f′(1)=ln31+3ln3
7
Find every x in [0,2π] where f(x)=exsinx has a horizontal tangent.
Use the product rule to find f′(x), then factor out ex. Can ex ever equal 0?
After setting sinx+cosx=0, you get tanx=−1. What angles in [0,2π] have tanx=−1?
If you got x=43π only Tangent is negative in two quadrants between 0 and 2π. Check the fourth quadrant too.
Find f′(x) using the product rule, and factor out ex.
f′(x)=exsinx+excosx=ex(sinx+cosx)
ex is always positive, so set sinx+cosx=0 and divide by cosx.
ex>0→sinx+cosx=0→tanx=−1
On [0,2π],tanx=−1 in the second and fourth quadrants, at reference angle 4π.
x=43π,x=47π
8
Find the equation of the line through the origin that is tangent to y=lnx.Challenge
The origin is not on the curve. Write the tangent line at an unknown point of tangency (a,lna), then plug in (0,0) to find a.
If you got y=x−1 That is the tangent line at (1,0), which has y-intercept −1 and does not pass through the origin.
Tangent line at an unknown pointThe derivative of lnx is x1, so the tangent line at an unknown point of tangency (a,lna) has slope a1.
tangent at (a,lna):y=lna+a1(x−a)
Find the point of tangencyThe line passes through (0,0), so plug in x=0 and y=0 to solve for a.
(0,0):0=lna−1→a=e
Write the linePlug a=e back into the tangent line equation and simplify.