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

Derivative of logₐx (for any positive base a≠1)

AP.CALC:
FUN‑3 (EU)
,
FUN‑3.C (LO)
,
FUN‑3.C.1 (EK)
Sal finds the derivative of logₐx (for any positive base a≠1) using the derivative of ln(x) and the logarithm change of base rule. He then differentiates log₇x and -3log_π(x).

Want to join the conversation?

  • duskpin ultimate style avatar for user Pramit Bandyopadhyay
    At where is the proof for this log concept? in which lesson was it covered?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • starky tree style avatar for user M
    At why don't we use the product rule for g(x) = -3 * log pi (x) or why is'nt -3 = 0 when grabbing the derivative of a constant
    (4 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user joe.schiaffino
      You also could use the product rule, but because the derivative of a constant is 0, the first term "u'(x)*v(x)" in your result would disappear and you would be left with "u(x)*v'(x)" which is what we are doing anyway based on our differentiation rules.
      (13 votes)
  • leafers seedling style avatar for user Isabel Munoz
    When you take the derivative of log a (x), how do you know that 1/lna is a constant? Why isn't lnx a constant.
    (10 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Jeremias Júnior
    why the constant gets out of the d/dx ? for exemple d/dx[15 * log(x)] => 15 * d/dx[log(x)]
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops tree style avatar for user Robert
    Why can he move the 1/ln(x) out of the derivative operator?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Archit Joshi
    is, xln(a) = ln(a^x)
    (4 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Fibromyalgia Phil
    What if instead of having a logarithm in the form log b (x), you have to differentiate a logarithm in the form log x (a) (where x is the variable which is to be differentiated with respect to and a is a constant). I was told by my Calculus teacher that this isn't really a thing, but I'm interested in how it would be done anyways. Is there a way to do this?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user kubleeka
      By the change of base formula for logarithms, we can write logᵪa as ln(a)/ln(x). Now this is just an application of chain rule, with ln(a)/x as the outer function. So the derivative is -ln(a)/((ln(x))²)·(1/x).

      Alternatively, we can use implicit differentiation: given y=logᵪ(a), we write x^y=a.
      The left-hand side is e^(ln(x^y)), or e^(y·ln(x)). Differentiating both sides now gives e^(y·ln(x))·[y'ln(x)+y/x]=0.
      The exponential is never 0, so we can divide it out to get y'ln(x)+y/x=0
      y'ln(x)=-y/x
      y'=-y/(x·ln(x))
      Replace y from the original equation and get -logᵪ(a)/(x·ln(x)). Rewriting the numerator with change of base formula gives the same result as from the first method.

      I don't know why your teacher told you this isn't a thing; it's a perfectly well-defined function.
      (6 votes)
  • male robot hal style avatar for user Advaii Srivastava
    even log(a)/log(b) equals to loga(b). During the exercise, I got a problem where 7^x, and log(7)7^x was an incorrect choice. Why does only Ln work and not Log_10, even though they both do the same thing?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user croi
    at why can't we just use the quotient rule for ln(x)/ln(a)
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user williamemerick10
    Isn't there also another rule that you can apply? If it was log (base3)(x) it would be the derivative of x divided by x times that natural log of the base?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • primosaur ultimate style avatar for user No
      I believe you are correct. I think the rule you are talking about is called the chain rule (correct me if you think I am misunderstanding). However, the derivative of x is one, which would make it 1/(x*ln(x)), which is exactly what was derived in the video.

      I hope this has helped
      (1 vote)

Video transcript

- [Voiceover] We know from previous videos, that the derivative with respect to X of the natural log of X, is equal to 1 over X. What I want to do in this video is use that knowledge that we've seen in other videos to figure out what the derivative with respect to X is of a logarithm of an arbitrary base. So I'm just gonna call that log, base A of X. So how do we figure this out? Well, the key thing is, is what you might be familiar with from your algebra or your pre calculus classes, which is having a change of base. So if I have some, I'll do it over here, log, base A of B, and I wanted to change it to a different base, let's say I wanna change it to base C, this is the same thing as log, base C of B divided by log, base C of A. Log, base C of B, divided by log, base C of A. This is a really useful thing if you've never seen it before, you now have just seen it, this change of base, and we prove it in other videos on Khan Academy. But it's really useful because, for example, your calculator has a log button. The log on your calculator is log, base 10. So if you press 100 into your calculator and press log, you will get a 2 there. So whenever you just see log of 100, it's implicitly base 10, and you also have a button for natural log, which is log, base E. Natural log of X is equal to log, base E of X. But sometimes, you wanna find all sorts of different base logarithms and this is how you do it. So if you're using your calculator and you wanted to find what log, base 3 of 8 is, you would say, you would type in your calculator log of 8 and log of 3. Or, let me write it this way, and log of 3 where both of these are implicitly base 10, and you'd get the same value if you did natural log of 8 divided by natural log of 3. Which you might also have on your calculator. And what we're gonna do in this video is leverage the natural log because we know what the derivative of the natural log is. So this derivative is the same thing as the derivative with respect to X of. Well log, base A of X, can be rewritten as natural log of X over natural log of A. And now natural log of A, that's just a number. I could rewrite this as, let me write it this way. One over natural log of A times natural log of X. And what's the derivative of that? We could just take the constant out. One over natural log of A, that's just a number. So we're gonna get 1 over the natural log of A times the derivative with respect to X of natural log of X. Of natural log of X. Which we already know is 1 over X. So this thing right over here, is 1 over X. So what we get is 1 over natural log of A times 1 over X. Which we could write as, 1 over natural log of A times X. Which is a really useful thing to know. So now, we could take all sorts of derivatives. So if I were to tell you F of X is equal to log, base 7 of X well now we can say well F prime of X is going to be 1 over the natural log of 7 times X. If we had a constant out front, if we had for example, G of X. G of X is equal to negative 3 times log, base, I know. Log, base pi. Pi is a number. Log, base pi of X, well G prime of X would be equal to 1 over, oh. Let me be careful, I have this constant out here. So it'd be negative 3 over, it's just that negative 3, over the natural log of pi. This is the natural log of this number. Times X. So hopefully, that gives you a hang of things.