Main content

## Calculus 1

### Course: Calculus 1 > Unit 3

Lesson 2: More chain rule practice- Derivative of aˣ (for any positive base a)
- Derivative of logₐx (for any positive base a≠1)
- Derivatives of aˣ and logₐx
- Worked example: Derivative of 7^(x²-x) using the chain rule
- Worked example: Derivative of log₄(x²+x) using the chain rule
- Worked example: Derivative of sec(3π/2-x) using the chain rule
- Worked example: Derivative of ∜(x³+4x²+7) using the chain rule
- Chain rule capstone
- Proving the chain rule
- Derivative rules review

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Worked example: Derivative of log₄(x²+x) using the chain rule

Sal differentiates the logarithmic function log₄(x²+x) using our knowledge of the derivative of logₐ(x) and the chain rule.

## Want to join the conversation?

- Hi, I don't quite understand how log base 4 of x is equal to 1/(ln4 * x). Could someone please explain this in more detail than he did in the video?(4 votes)
- In the video, he is talking about the differentiation of a logarithm with a different base. It is done like this:

You have:

y=log(base 4)(x)

Apply the change of base rule for logarithms:

y= log(base e)(x) / log(base e)(4)

I'll re-write so you can see it clearer (rewriting log(base e) as ln):

y=ln(x)/ln(4)

y= 1/ln(4) * ln(x)

Differentiate now:

dy/dx = 1/ln(4) * 1/x (since 1/ln(4) is just a constant)

dy/dx = 1/(xln(4) )(15 votes)

- Can someone please link the video Sal mentions about 'scaling the whole expression by lnx' ?(4 votes)
- I didn't hear anything about scaling by
`ln(x)`

— are you talking about what Sal says around1:13? There he is talking about scaling by`ln(a)`

, where a is the base of the "unnatural" log ...

If so, I think he's just referring to the previous video:

https://www.khanacademy.org/math/ap-calculus-ab/ab-derivatives-advanced/ab-diff-log/v/logarithmic-functions-differentiation-intro(3 votes)

- I'm super confused here

why wouldn't the answer be ln((x^2)+x)/ln(4)?

(I'm using the "log base a times b=log base c times b / log base c times a" that he showed us earlier)

or if not that then 2x+1/ln(4)x

(taking derivatives of both and multiplying them together)

Could someone tell me which rules to use and when to use them?

thx so much!(3 votes)- log_4 (x^2 + x) d/dx = ln(x^2+x)/ln(4) d/dx

let u = x^2 + x

=> y = ln(u)/ln(4)

=> dy/du = 1/(u*ln(4))

du/dx = 2x + 1

dy/du * du/dx = dy/dx

=> 1/(u*ln(4)) * (2x + 1) = (2x + 1)/(u*ln(4))

Substitute u = x^2 + x gives

(2x + 1) / (u * ln(4) ) = (2x+1) / ((x^2+x) * ln(4))

So you first you apply the log law that gives ln((x^2)+x)/ln(4). Then you just apply chain rule.

When apply chain rule on ln(f(x)) to differentiate that becomes

f'(x)/ f(x). So ln(f(x)) d/dx = f'(x)/f(x).(5 votes)

- Hi, I attempted to differentiate the log function by splitting composite function into two logs equations and differentiating them and then added the final two differentiated log equations and got 3/xln4. Why did this technique not work?(3 votes)
- It's not clear the steps that you took in this differentiation. Please be more specific.(4 votes)

- how is it composite function?(2 votes)
- The outer function is a logarithmic function and the inner function is a quadratic function. After all, log(x) is very different from log(ax^2+bx+c).(3 votes)

- What if the log base is smaller than e? Since that could make the derivative minus, even though the function may not be.(2 votes)
- That's no trouble. log₂(x²+x)=ln(x²+x)/ln(2), which is still positive. log(a) is negative only if a<1, and logarithms with bases less than 1 are undefined.(3 votes)

- @3:08shouldn't there be an x after ln4(1 vote)
- for v(x) it would, but this is v(u(x)). The x in v(x) is replaced with u(x)(4 votes)

- What about functions like logbase4(x^2+1)^3 or logbase2(2x-4)^1/3? How would we find the derivative of them?(2 votes)
- (log_4 (x^2+1)^3 ) d/dx =

(log_e (x^2+1)^3 / log_e 4) d/dx

Since log_e 4 is just constant you can just factor it out.

To find the derivative of log_e (x^2+1)^3 use chain rule. You will often find many cases like expoential, trigonmetric, logarithmic, inverse trigonometric expressions in which you need to use chain rule so can find the derivative so you need to be comfortable with it.

Next substitute u= (x^2 + 1)^3, meaning du/dx = 6x(x^2 + 1)^3. Again you can you can use chain rule for the derivative of (x^2 + 1)^3 by substituting another variable or just taking the derivative of the inside and outside. And similarly since log_e u = y => dy/du = 1/u.

dy/du * du/dx = 1/u *6x(x^2 + 1)^3 = dy/dx. Obviously you need by log_e 4 for the actual derivative and the du cancels out in the multiplication as you`re dividing du by itself lim_u->0 u / lim_u->0 u where du = lim_u->0 u.(2 votes)

- What is the derivative of y = log x / (log (x) - 5) ?(2 votes)
- You can use the quotient rule. y'=(d/dx[log(x)] * (log(x) - 5) - d/dx[log(x) - 5] * log(x)) / (log(x)-5)^2 = -5/(ln(10)x(log(x) - 5)^2)(2 votes)

- y=(cos(x))^x use logarithmic differentiation and find y'(2 votes)

## Video transcript

- [Voiceover] Let's say that Y is equal to log base four of X squared plus X. What is the derivative of Y with respect to X going to be equal to? Now you might recognize immediately that this is a composite function. We're taking the log
base four, not just of X, but we're taking that
of another expression that involves X. So we could say we could say this thing in blue that's U of X. Let me do that in blue. So this thing in blue that is U of X. U of X is equal to X squared plus X. And it's gonna be useful later on to know what U prime of X is. So that's gonna be I'm just gonna use the power rule here so two X plus one I brought that two out front and decremented the exponent. Derivative with respect to X of X is one. And we can say the log base four of this stuff well we could call that a function V. We can say V of well if we said V of X this would be log base four of X. And then we've shown in other videos that V prime of X is, we're gonna be very
similar that if this was log base E, or natural log, except we're going to scale it. So it's going to be one over one over log base four. Sorry, one over the natural log. The natural log of four times X. If this was V of X, if V of X was just natural log of X, our
derivative would be one over X. But since it's log base four and this comes straight
out of the change of base formulas that you might have seen. And we have a video where we show this. But we just scale it in the denominator with this natural log of four. You think of scaling the whole expression by one over the natural log of four. But we can now use this
information because Y this Y can be viewed as V of V of. Remember, V is the log
base four of something. But it's not V of X. We don't have just an X here. We have the whole expression that defines U of X. We have U of X right there. And let me draw a little line here so that we don't get
those two sides confused. And so we know from the chain rule the derivative Y with respect to X. This is going to be this is going to be the derivative of V with respect to U. Or we could call that V prime. V prime of U of X. V prime of U of X. Let me do the U of X in blue. V prime of U of X times U prime of X. Well, what is V prime of U of X? We know what V prime of X is. If we want to know what V prime of U of X we would just replace wherever we see an X with a U of X. So, this is going to be equal to V prime of U X, U of X. And you just do is you take the derivative of the green function with
respect to the blue function. So it's going to be one over the natural log of four. The natural log of four. Times, instead of putting an X there it would be times U of X. Times U of X. And of course, that whole thing times U prime of X. And so, and I'm doing
more steps just hopefully so it's clearer what I'm doing here. So this is one over the natural log of four. U of X is X squared plus X. So X squared plus X. And then we're gonna multiply that times U prime of X. So times two X plus one. And so we can just rewrite this as two X plus one over over over the natural log of four. The natural log of four times X squared plus X. Times X squared plus X. And we're done, and we could distribute this natural log of four if we found that interesting. But, we have just found
the derivative of Y with respect to X.