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 √(3x²-x) using the chain rule

AP.CALC:
FUN‑3 (EU)
,
FUN‑3.C (LO)
,
FUN‑3.C.1 (EK)
f(x)=√(3x²-x) is a composition of the functions √x and 3x²-x, and therefore we can differentiate it using the chain rule. Created by Sal Khan.

Want to join the conversation?

  • orange juice squid orange style avatar for user FishHead
    Does he ever explain why exactly we multiply the derivatives?

    I'm having a hard time conceptualizing why this works and it's making implicit differentiation that much harder to understand since it's basically an extension of the chain rule. The whole fraction cancelling pseudo-explanation (d(*)*/d(*) * d*/dx = d(*)*/dx) unfortunately isn't good enough for my brain who's a stickler for understanding everything inside and out before accepting it.
    (183 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Mehrdad Ghods
      To understand chain rule think about definition of derivative as rate of change. d[f(g(x)]/d[x] basically means rate of change of f(g(x)) regarding rate of change of x, and to calculate this we need to know two values:
      1- How much f(g(x)) changes while g(x) changes = d[f(g(x))]/d[g(x)]
      2- How much g(x) changes while x changes = d[g(x)]/d[x]
      to calculate rate of change of f(g(x)) in regard to rate of change of x, you just need to multiply these two values together because x changes f(x) and g(x) changes f(g(x)) (it should be obvious thinking about definition of a function in mathematics).

      About fraction cancelling, as you mentioned it is a pseudo-explanation and speaking mathematics dg/df*df/dx is not like c/b*b/a = c/a so you can't cancel out nominator and denominator. (df/dx is not a division of df by dx)

      Finally, here is a rigorous proof of the chain rule that might be helpful:
      http://math.rice.edu/~cjd/chainrule.pdf
      (138 votes)
  • leaf green style avatar for user Younmin Bae
    I have a hard time understanding that the the square root of x is equal to x raised to 1/2. Can anyone show me a proof that square root of x=x^1/2? Also, if square roof of x=x^1/2, what would x^-1/2 be?

    Thanks!
    (21 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Enn
      Nice question !
      A square root just gives a number that when multiplied with itself gives the number the square root is being found of. Like √4 = 2 As 4= 2*2
      Let's take x^1/2 * x^1/2. The product rule of exponents is :
      x^a * x^b = x^(a + b)
      So by this x^1/2 * x^1/2 = x^( 1/2+1/2)= x^1 = x
      Also now what is the square root of x ? As we saw above the square root is a number when multiplied with itself gives the number whose square root is being found. x^1/2 when multiplied by itself gives x like 2 gives 4. So √x= x^1/2
      (46 votes)
  • blobby green style avatar for user Cameron Ishee
    For the example in the video: Is there really no way to simplify the final answer?
    (8 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Creeksider
      You could rewrite it as a fraction, (6x-1)/2(sqrt(3x^2-x)), but that's just an alternate form of the same thing rather than a true simplification. Sometimes the answer to a problem like this is messy. You should be prepared for messy answers when applying the product rule, the quotient rule and the chain rule.
      (20 votes)
  • blobby green style avatar for user Marcus
    At , excactly why do we multiply with the derivative of g(x)? Is there any intuition here, or perhaps any proof one can watch? :-)
    (7 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user Ethan Dlugie
      Unfortunately, I don't think that Khan Academy has a proof for chain rule.
      I personally have not seen a proof of the chain rule. The reasoning that I use comes from the ideas function transformations.
      We have the function f(x). When I do f(2x), that squeezes the graph in the horizontal direction by a factor of 2. My reasoning is that at a point, f(g(x)) will have the normal slope f'(g(x)), but it needs a multiplier because g(x) is instantaneously stretching or compressing in the x direction which will decrease or increase, respectively, the slope of the tangent line. This is accounted for by multiplying by g(x). That may or may not help you. I have found that I have some unusual ways of thinking about math.
      Paul's Online Math notes happens to have a proof of the chain rule. I have not read it myself, but I put a link here so that you may enrich your learning if you so choose.
      http://tutorial.math.lamar.edu/Classes/CalcI/DerivativeProofs.aspx#Extras_DerPf_ChainRule
      (12 votes)
  • blobby green style avatar for user Aditi Prasad
    I'm having a hard time understanding where f(x) and g(x) come from. From -, how did you find that f(x) is the sqrt. of x and g(x) is 3x^2-x?
    (8 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Sid
      He takes them directly from the expression he is planning to differentiate. The square root is the outer function, 3x^2 - x is the inner function.

      The x in the definition of f(x) is not the same as the x in the definition of g(x). They are independent functions that he combines into f(g(x)).

      I guess you could say that f(g(x)) = √g(x) = √(3x^2 - x) and also
      f(g(x)) = f(3x^2 - x) = √(3x^2 - x)
      (10 votes)
  • ohnoes default style avatar for user Cyan Wind
    I was trying to understand the difference(s) between d/dx and f'(x) through some vids but totally made me out of space. Can I rewrite d/dx [f(g(x))] = f'(g(x)) * g'(x) as d/dx [f(g(x))] = d/d[g(x)] [f(g(x))] * d/dx [g(x)]? Why do you have to use d/dx and f prime in a same math expression?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Shubham Sawaikar
    How do you prove that chain rule is always true?I mean,you can verify it by taking examples,but how do you prove it?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Kevin Laing O'connor
    if i was given this question, how would i know straight away the difference between whats f(x) and g(x) by just looking at the square root of (3x^2 - x) ? at
    (3 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user jimstanley49
      This takes some practice with function composition. Often you can work your way from the outside in. Consider this quiz problem.
      f(x) = sin^4(e^(x^2)) can be expressed as f(x) = a(b(c(d(x)))), find a, b, c, and d. Check your answer by recomposing the function according to your chosen a, b, c, and d.
      a(x) = x^4
      b(x) = sin(x)
      c(x) = e^x (I almost wrote this as x^2 on the quiz)
      d(x) = x^2 (And this one was almost e^x)
      Recomposing the function saved me from mixing c and d.
      c(d(x)) = e^(x^2))
      b(c(d(x))) = sin(e^(x^2)))
      a(b(c(d(x)))) = (sin(e^(x^2)))^4 or sin^4(e^(x^2))
      This is a place where prerequisites become VERY important. The chain rule is a biggie, if you can't decompose functions it will trip you up all through calculus.
      (4 votes)
  • male robot hal style avatar for user Matthew Dai
    When Sal applies the power rule to f(x), wouldn't it become 1/2*x^(-3/2) instead of 1/2*x^(-1/2) because the power rule does state that you subtract one from the exponent?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • old spice man green style avatar for user newbarker
      The exponent at the start is 1/2 (i.e. the square root written in exponent form), so what is 1/2 after you subtract one?

      1/2 - 1
      = 1/2 - 2/2 (I've just rewritten 1 as 2/2)
      = (1-2)/2 (denominator is common so we can add/subtract numerators)
      = -1/2
      (3 votes)
  • male robot hal style avatar for user Naks Saxena
    d/dx[sqrt(3x^2-x)]= 1/2[sqrt(3x^2-x)].............since d/dx[sqrt(x)] = 1/2(sqrtx)
    m I missing something? isnt this right?
    Plz explain.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf red style avatar for user Jarek Hunger
      You are missing the chain rule. Here is how you would find that derivative...
      d/dx(sqrt(3x^2-x)) can be seen as d/dx(f(g(x))
      where f(x) = sqrt(x) and g(x) = 3x^2-x
      The chain-rule says that the derivative is: f'(g(x))*g'(x)
      We already know f(x) and g(x); so we just need to figure out f'(x) and g'(x)
      f"(x) = 1/sqrt(x) ; and ; g'(x) = 6x-1
      Therefore d/dx(sqrt(3x^2-x)) = [1/sqrt(3x^2-x)*(6x-1)]
      Which can be simplified to... (6x-1)/(sqrt(3x^2-x))

      Hope that helps! :)
      (3 votes)

Video transcript

What I want to do in this video is start with the abstract-- actually, let me call it formula for the chain rule, and then learn to apply it in the concrete setting. So let's start off with some function, some expression that could be expressed as the composition of two functions. So it can be expressed as f of g of x. So it's a function that can be expressed as a composition or expression that can be expressed as a composition of two functions. Let me get that same color. I want the colors to be accurate. And my goal is to take the derivative of this business, the derivative with respect to x. And what the chain rule tells us is that this is going to be equal to the derivative of the outer function with respect to the inner function. And we can write that as f prime of not x, but f prime of g of x, of the inner function. f prime of g of x times the derivative of the inner function with respect to x. Now this might seem all very abstract and math-y. How do you actually apply it? Well, let's try it with a real example. Let's say we were trying to take the derivative of the square root of 3x squared minus x. So how could we define an f and a g so this really is the composition of f of x and g of x? Well, we could define f of x. If we defined f of x as being equal to the square root of x, and if we defined g of x as being equal to 3x squared minus x, then what is f of g of x? Well, f of g of x is going to be equal to-- I'm going to try to keep all the colors accurate, hopefully it'll help for the understanding. f of g of x is equal to-- where everywhere you see the x, you replace with the g of x-- the principal root of g of x, which is equal to the principal root of-- we defined g of x right over here-- 3x squared minus x. So this thing right over here is exactly f of g of x if we define f of x in this way and g of x in this way. Fair enough. So let's apply the chain rule. What is f prime of g of x going to be equal to, the derivative of f with respect to g? Well, what's f prime of x? f prime of x is equal to-- this is the same thing as x to the 1/2 power, so we can just apply the power rule. So it's going to be 1/2 times x to the-- and then we just take 1 away from the exponent, 1/2 minus 1 is negative 1/2. And so what is f prime of g of x? Well, wherever in the derivative we saw an x, we can replace it with a g of x. So it's going to be 1/2 times-- instead of an x to the negative 1/2, we can write a g of x to the 1/2. And this is just going to be equal to-- let me write it right over here. It's going to be equal to 1/2 times all of this business to the negative 1/2 power. So 3x squared minus x, which is exactly what we need to solve right over here. f prime of g of x is equal to this. So this part right over here I will-- let me square it off in green. What we're trying to solve right over here, f prime of g of x, we've just figured out is exactly this thing right over here. So the derivative of f of the outer function with respect to the inner function. So let me write it. It is equal to 1/2 times g of x to the negative 1/2, times 3x squared minus x. This is exactly this based on how we've defined f of x and how we've defined g of x. Conceptually, if you're just looking at this, the derivative of the outer thing, you're taking something to the 1/2 power. So the derivative of that whole thing with respect to your something is going to be 1/2 times that something to the negative 1/2 power. That's essentially what we're saying. But now we have to take the derivative of our something with respect to x. And that's more straightforward. g prime of x-- we just use the power rule for each of these terms-- is equal to 6x to the first, or just 6x minus 1. So this part right over here is just going to be 6x minus 1. Just to be clear, this right over here is this right over here and we're multiplying. And we're done. We have just applied the power rule. So just to review, it's the derivative of the outer function with respect to the inner. So instead of having 1/2x to the negative 1/2, it's 1/2 g of x to the negative 1/2, times the derivative of the inner function with respect to x, times the derivative of g with respect to x, which is right over there.