We know how to differentiate a power when the exponent is a constant number, and an exponential when the base is a constant number.
Constant exponent
dxdx3=3x2
Constant base
dxd3x=3xln3
But in xx,x is in both the base and the exponent, so neither one is constant. Does either rule still work?
Find the derivative of xx
Text solution
Take the natural log of both sidesThe log rule brings the exponent x down in front, so the right side becomes a product.
ln(ab)=blna
lny=xlnx
Differentiate both sidesOn the left, y is a function of x, so the chain rule gives yy′. On the right, we use the product rule.
yy′=lnx+x⋅x1=lnx+1
Multiply by yThen put xx back in for y. At x=2, the slope is 4(ln2+1)=4ln2+4.
y′=y(lnx+1)=xx(lnx+1)
Taking the natural log of both sides before differentiating is called logarithmic differentiation. Notice what the answer looks like when we distribute. It's what the exponential rule and the power rule each gave on their own, added together.
y′=xx(lnx+1)=xxlnx+xx
Exponential rule guess
xxlnx
Power rule guess
x⋅xx−1=xx
The xxlnx part is the change through the exponent, with the base held fixed, and the xx part is the change through the base, with the exponent held fixed. Each rule gives only part of the slope. Hold the base or the exponent at 2 yourself, and see how the two parts add up to the slope of the tangent line.
We can also write xx as eln(xx)=exlnx. Differentiating exlnx uses the chain rule on the same product xlnx, and gives the same derivative, xx(lnx+1).
2
A function in the base
Now let's try a function where the base isn't just x, like (x2+1)x, and find its slope at x=1.
dxd(x2+1)x=?
We have x in the base and x in the exponent, so we use the exact same strategy as xx. Call it y, and take the natural log of both sides. That brings the exponent x down in front, and we get lny=xln(x2+1).
The only new piece is taking the derivative of ln(x2+1). We use the chain rule with u=x2+1. Since the derivative of x2+1 is 2x, the derivative of ln(x2+1) is x2+12x.
dxdln(x2+1)=x2+12x
The chain rule for ln u
dxdlnu=uu′
Now we differentiate both sides, using the product rule on the right, and multiply by y.
To find the slope at x=1, plug in x=1. The base is 12+1=2, so y=21=2, and the bracket gives ln2+1.
Slope at x = 1
x=1:y=2
ln2+22y′(1)=ln2+1=2(1+ln2)=2+2ln2
So the slope of the curve at x=1 is 2+2ln2.
3
Splitting products and quotients with logs
Taking logs also helps when there's nothing in an exponent. Take y=(x+1)2x3x2+3. The quotient rule works, but the numerator needs the product rule, and inside that, x2+3 needs the chain rule. That gets messy very fast.
y′=(x+1)4(x3x2+3)′(x+1)2−x3x2+3⋅2(x+1)
y′=(x+1)41[(x3x2+3)′(x+1)2−x3x2+3⋅2(x+1)]
Instead, we can take the natural log of both sides first. The log laws turn multiplication into addition, division into subtraction, and exponents into multipliers out front.
Log laws and fractional powers
ln(ab)=lna+lnb
lnba=lna−lnb
ln(ak)=klna
u=u21
Find y′ and y′(1) for y=(x+1)2x3x2+3
y=(x+1)2x3x2+3
y′=?y′(1)=?
Text solution
One log term for each factorFactors on top are added, the factor underneath is subtracted, and each exponent comes out front. ln(x2+3) is the log of a sum, so it stays whole.
lny=3lnx+21ln(x2+3)−2ln(x+1)
Differentiate each termEach log term gives the derivative of its inside over its inside. In the middle term, the 2x cancels with the 21 to leave x.
yy′=x3+x2+3x−x+12
Multiply by y, then plug in x=1At x=1,y=41⋅2=21 and the bracket is 3+41−1=49.
y′=(x+1)2x3x2+3(x3+x2+3x−x+12)
y′(1)=21⋅49=89
The pattern works for any number of factors. Each factor uk in the numerator adds kuu′ to yy′, and each factor uk in the denominator subtracts kuu′.
In the numerator
ln(uk)=klnu→kuu′
In the denominator
lnuk1=−klnu→−kuu′
For a single quotient like x−1x+1, though, the quotient rule is quicker. Logs pay off when several factors, powers or roots are multiplied and divided together.
4
Differentiating a sum of terms
What if xx is one term of a sum, like xx+x3+3x? It's tempting to take the natural log of the whole thing. But there's no log rule for a sum, so the log can't split across the plus signs, the same reason ln(x2+3) stayed whole.
ln(xx+x3+3x)=ln(xx)+ln(x3)+ln(3x)
ln(xx+x3+3x)=ln(xx)+ln(x3)+ln(3x)
Find the derivative of xx+x3+3x
dxd(xx+x3+3x)=?
Text solution
Differentiate term by termThe derivative of a sum is the sum of the derivatives, so each term is its own problem.
dxd(xx+x3+3x)=dxdxx+dxdx3+dxd3x
Choose each rule by where x isIn x3,x is only in the base, and in 3x,x is only in the exponent. Only xx needs logs, and we found its derivative in section 1.
Side by side, the three rules and the sum they add up to:
Power rule
dxdx3=3x2
Exponential rule
dxd3x=3xln3
Logarithmic differentiation
dxdxx=xx(lnx+1)
dxd(xx+x3+3x)=xx(lnx+1)+3x2+3xln3
A term with no x at all, like 33 or ee, is a constant, so its derivative is 0. And e and π are constant numbers just like 3. For xe, the power rule gives exe−1, and for ex, the derivative is ex.
Summary
Which rule to use
Power rule
dxdx3=3x2
Exponential rule
dxd3x=3xln3
Constant
dxd33=0
Logarithmic differentiation
xx:lny=xlnx
Power rule
dxdxe=exe−1
Where x is in the term tells you which rule to use. When x is only in the base, use the power rule. When x is only in the exponent, use the exponential rule. If there's no x at all, the derivative is 0. Letters like e and π are constant numbers, so xe uses the power rule.
When x is in both the base and the exponent, neither rule works on its own, so take the natural log of both sides first.
Logarithmic differentiation for xx
lnyyy′y′=xlnx=lnx+1=xx(lnx+1)=xxlnx+xx
Taking the natural log of both sides brings the exponent down as a factor. Differentiating both sides gives yy′ on the left from the chain rule, and the product rule gives lnx+1 on the right. Multiply both sides by y, then put xx back in place of y.
The derivative is the sum of the power rule's answer and the exponential rule's answer.
Products, quotients, and powers
Expanding with log rules
ylny=(x+1)2x3x2+3=3lnx+21ln(x2+3)−2ln(x+1)
ylny=(x+1)2x3x2+3=3lnx+21ln(x2+3)−2ln(x+1)
Differentiating each factor
uk→kuu′
When a function is built from several factors multiplied and divided together, taking the natural log turns products into sums, quotients into differences, and powers into multipliers out front.
Each factor uk in the numerator contributes +kuu′ to yy′, and each factor in the denominator contributes −kuu′. Then multiply the whole sum by y to get y′.
Logs don't split a sum
ln(xx+x3)=ln(xx)+ln(x3)
ln(xx+x3)=ln(xx)+ln(x3)
The natural log can't split across a sum, so taking the log of a sum doesn't bring exponents down.
For a sum, differentiate term by term, using the rule that fits where x is in each term. Use logarithmic differentiation only on the terms that have x in both the base and the exponent.
5
Practice
Enter exact values. Leave ln2,e and π in your answers.
1
Let y=xsinx. Find y′(2π).
We have yy′=cosxlnx+xsinx. To find y′, what do we multiply it by?
If you got π2π2 is the value of yy′ at x=2π. Don't forget to multiply by y.
x appears in both the base and the exponent, so we take the natural log of both sides to bring sinx down to the front.
lny=ln(xsinx)=sinxlnx
Differentiate both sides with respect to x, using the product rule on the right.
yy′=cosxlnx+sinx⋅x1
At x=2π, we have sin2π=1, so y=2π. In yy′,cos2π=0, so the first term goes away.
x=2π:y=(2π)1=2π
yy′=0⋅ln2π+1⋅π2=π2
Now multiply yy′ by y to get y′(2π).
y′(2π)=2π⋅π2=1
2
Let y=(x2+1)2(x+1)3x+3. Find y′(1).
Taking the natural log gives lny=3ln(x+1)+21ln(x+3)−2ln(x2+1). What is the derivative of each term with respect to x?
If you got 25 Check the derivative of ln(x2+1). The chain rule gives x2+12x, not x2+11.If you got −83−83 is the value of yy′ at x=1. Multiply by y(1) to find y′(1).
Take the natural logTaking the natural log turns products into sums and brings exponents down in front, and we subtract the logs of factors in the denominator.
lny=3ln(x+1)+21ln(x+3)−2ln(x2+1)
Differentiate each termDifferentiate both sides with respect to x, using the chain rule on ln(x2+1).
yy′=x+13+2(x+3)1−2⋅x2+12x
yy′=x+13+2(x+3)1−x2+14x
Evaluate at x=1Plug in x=1 to find y and yy′.
x=1:y=2223⋅2=4
yy′=23+81−2=−83
Multiply yy′ by y to get y′(1).
y′(1)=4⋅(−83)=−23
3
Find the slope of the tangent line to the curve xy=yx at the point (2,4). (Challenge)
In ylnx, both y and lnx depend on x. What does the product rule give for dxd(ylnx)?
If you got 4−4ln2 Check the derivative of ylnx. By the product rule, it includes a y′lnx term.
First check that (2,4) lies on the curve.
24=16=42
Take the natural logTake the natural log of both sides to bring the exponents down.
ln(xy)=ln(yx)→ylnx=xlny
Differentiate implicitlyDifferentiate both sides with respect to x, using the product rule on each side and treating y as a function of x.
y′lnx+y⋅x1=1⋅lny+x⋅yy′
Plug in x=2 and y=4 before solving for y′, and rewrite ln4 as 2ln2.
(2,4):y′ln2+2=ln4+2y′=2ln2+2y′
Group the y′ terms on one side and solve for y′.
y′(ln2−21)=2ln2−2
y′=ln2−212ln2−2=2ln2−14ln2−4
Since ln2 is between 21 and 1, the numerator 4ln2−4 is negative and the denominator 2ln2−1 is positive, so the slope is negative.