If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

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

AP.CALC:
FUN‑3 (EU)
,
FUN‑3.C (LO)
,
FUN‑3.C.1 (EK)
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?

  • piceratops ultimate style avatar for user averynash
    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?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Fai
      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) )
      (1 vote)
  • duskpin sapling style avatar for user Cezanne Romero
    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!
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user cossine
      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).
      (3 votes)
  • mr pink red style avatar for user qudsia1999
    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?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user sarah
    Can someone please link the video Sal mentions about 'scaling the whole expression by lnx' ?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user tantan
    how is it composite function?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • stelly orange style avatar for user Lucas
    What if the log base is smaller than e? Since that could make the derivative minus, even though the function may not be.
    (1 vote)
    Default Khan Academy avatar avatar for user
  • aqualine sapling style avatar for user Batchimeg D
    @ shouldn't there be an x after ln4
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user mkusta73
    y=(cos(x))^x use logarithmic differentiation and find y'
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Kyle Patrick Elliott
    What about functions like logbase4(x^2+1)^3 or logbase2(2x-4)^1/3? How would we find the derivative of them?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user cossine
      (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.
      (1 vote)
  • blobby green style avatar for user wmstairs23
    What is the derivative of y = log x / (log (x) - 5) ?
    (1 vote)
    Default Khan Academy avatar avatar for user

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.