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

Applying the chain rule graphically 3 (old)

Sal solves an old problem where the graphs of functions f and g are given, and he evaluate the derivative of [g(f(x))]² at a point. Created by Sal Khan.

Want to join the conversation?

  • spunky sam blue style avatar for user Mr. Grossi
    No teacher or professor has ever been able to explain this to me! I've always heard that you can't treat differentials like numbers, but it always seems to work out that way (ex./ Derivation of Euler's Formula, the chain rule, implicit differentiation, etc.). What's the deal with that? Why shouldn't we think of them as "fractions" if we always end up treating them that way?
    (22 votes)
    Default Khan Academy avatar avatar for user
    • starky seedling style avatar for user Alma Ionescu
      You can't treat derivatives as true fractions because some of the terms are fixed and some of them are variable and you risk mixing them up. For example the derivative of log base b of x is the derivative of ln(x)/ln(b) (from logarithm properties, change of base formula). If you don't treat this as a derivative but as a fraction, you obtain the result b/x, because you'll take each derivative separately - as in deriv. of ln(x)=1/x and deriv. of ln(b)=1/b; (1/x)/(1/b)=b/x, which is wrong. Looking at Sal's example here (https://www.khanacademy.org/math/differential-calculus/taking-derivatives/chain_rule/v/derivative-of-log-with-arbitrary-base) you'll see that he takes out of the derivative the 1/ln(b), which is a constant term and the result is totally different, 1/(ln(b))x. The point here is that the ln(x) will vary with x, while the ln(b) has one and only one value.

      Also to treat them as fractions would mean to miss a part of the derivative. For example, the deriv of e^cos(x), treated as a simple fraction would be just e^cos(x) because you would simplify the second part, which is incorrect. This derivative is e^cos(x) multiplied by the derivative of cos(x). Ths second part would be eliminated by simplification if you would treat derivatives as fractions.
      (15 votes)
  • leaf green style avatar for user Umar khan
    for along time i have been facing a problem in understanding the term something respect to something
    if anybody can help I'll be pleased
    (3 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Enn
      The derivative of y(or any other variable) with respect to x(or any other variable) is the rate of change of the value of the variable 'y' with a extremely small change in the value of the variable 'x' or dy/dx
      The rate of change of distance with reference to time is called distance.
      The rate of change of y can be found with any other variable other than x such as a which will represent the change in 'y' with a change in 'a'
      (14 votes)
  • leaf green style avatar for user charles.moxley
    In which scenario would the derivative of a function be its negative?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • hopper cool style avatar for user MatthewMurray711
    Can someone explain why the derivative of (sin(3x))^2 = 3sin(6x)?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Lucas César
      Not trying to be mean with redthumb, but he did a small mistake when he put that:
      6•sin(2u) = 2•sin(u)•cos(u)
      Just by comparing to the double-angle identity formula right above it we can see that the equation is wrong, thus leading to the incorrect result:
      [3•sin(6•x)] = sin(3•x)•cos(3•x)
      which is just the same as stating that:
      sin(6•x) = (1 / 3)•sin(3•x)•cos(3•x)
      which contradicts the double-angle identity formula.
      Now what I'd do to apply that formula and get to the 3•sin(6x) answer is, after finding that:
      d/dx(sin^2(3x)) = 6sin(3x)cos(3x)
      sin(2θ) = 2sin(θ)cos(θ)
      3x = θ
      So now we have as a result:
      6sin(θ)cos(θ)
      Manipulating the DAI formula we get:
      sin(θ)cos(θ) = sin(2θ) / 2
      Substituting this in our result we have:
      6sin(θ)cos(θ) = 6(sin(2θ) / 2) = (6 / 2)sin(2θ) = 3sin(2θ)
      θ = 3x, so finally:
      3sin(2•3x) = 3sin(6x)
      Summarizing:
      d/dx[sin²(3x)] = 6sin(3x)cos(3x) = 6[sin(2•3x) / 2] = 3sin(6x)
      (1 vote)
  • piceratops seed style avatar for user cliffplaysdrums
    What would g-prime of 5 have been? Since the slope of the line changes at that exact point.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user kenneth culture
    what about the exponent 2 of the G(x)?? i think it won't lead the G'(5) to 0.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user Nik Stathatos
      @ you can see the fully expanded application of the chain rule on G(x). G'(x)= a product, and since one of the factors equals 0, the whole thing surely equals 0. Other than that, if the input on G(x) is constant, squaring it gives back a constant as well. When we graph G(x)=C on some interval, the slope of it is 0, and thus G'(x)=0 as well.
      (1 vote)
  • old spice man green style avatar for user VIVEK RAO ANAND
    What is the physical meaning of differentiating a function with respect to other function and how can we physically feel it and interpret graphically?
    Like we can physically feel that what does differentiating a function with respect to x means (like we can graphically interpret; first principle of derivative).
    Please help me with an understandable solution...
    Thank You!
    (1 vote)
    Default Khan Academy avatar avatar for user
    • starky seedling style avatar for user Alma Ionescu
      It's like peeling layers from an onion. You start with a degree 3 (cubic) onion and peel off the first layer in such a way that inside you find a second degree (square) onion. From the 3 dimensional onion you started with, after peeling off the first layer, you will obtain a bi-dimensional onion (the photo of the onion). Derivatives take things "one level down"; integrals, which are inverses of derivatives, take things "one level up". So if you start with the photo of an onion, by integrating it, you'll find the whole onion.
      There is a difference between derivatives and differentials. Derivatives are taken for one variable while differentials are taken (somewhat circularly) with respect to all the variables. The derivative of an onion with respect to one variable will be the photo of the onion from one side. The differential of the onion can generate 2 views, one from side and one from (for example) the top of the onion. Of course, this can be generalized to an arbitrary number of dimensions, each with its own variable. The higher the degree of the onion (the higher dimensional the onion is), the more views you can generate by differentiating it.
      (4 votes)
  • blobby green style avatar for user yoojinium
    without using the triple derivative, would this process be right?
    using the power rule and the chain rule at the same time,, basically.
    G'(x)= 2(g(f(x))) * g'(f(x))* f'(x) ?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops sapling style avatar for user Krutik Desai
    What can we use instead of f(x),g(x),h(x) and F(x),G(x),H(x)? Because we will need more function notations for differentiating a composition of more that 6 functions?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Yamanqui García Rosales
      You can use whatever symbol you want to designate your functions. So for starters you have all the letters in the alphabet (excluding those you design as variables), if you need more you can use greek letters, and if you need still more you can either decide to designate functions by a combination of letter and numbers (for example f₁(x), f₂(x), f₃(x)) or use abstract symbols or drawings to represent the functions.
      (2 votes)
  • male robot johnny style avatar for user Dandy Cheng
    How do I use the dy/dx notation? When I differentiate an expression, when should I use d/du and d/dx?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Ben Terzich
      The "dy/dx" notation is used here to show the steps. When you differentiate using the chain rule, you won't need to write out the notation.
      There are cases where you will use the dy/dx notation in the process of differentiation, but those will come later; namely implicit differentiation, where you will differentiate, then solve for dy/dx.
      (2 votes)

Video transcript

Consider the functions f and g with the graphs shown below. If capital G of x is equal to g of f of x whole thing squared, what is the value of G prime, capital G prime, of 5? And I encourage you to now pause this video and try to solve it on your own. So let's try to think through this somewhat complicated-looking function definition right over here. So we have capital G of x. And actually, let me write it this way. Let me write it this way, I'll do it in yellow. We have capital G of x is equal to this quantity squared. What we're squaring is g of f of x. g of f of x is what we're squaring. Or another way to write G of x, If h of x were to be equal to x squared, we could write G of x is equal to h of this business, h of g of f of x. Let me just copy and paste that so I don't have to keep switching colors. So copy and paste, there we go. So this is another way of writing G of x, where whatever g of f of x, we input then to h of x, which is really just squaring it. So there's a couple of ways that we can write out the derivative of capital G with respect to x. And you could imagine this is going to involve the chain rule. But I like to write it out, just to clarify in my head what's going on and to make sure that it actually makes some sense. So one thing that we could write, we could write the derivative of G with respect-- I'll mix notations a little bit-- but I'll write the derivative of G of x with respect to x is equal to the derivative of this whole thing. So let me copy and paste it, copy and paste. It's equal to this derivative of this whole thing with respect to what's inside of that whole thing. So if you wanted to treat g of f of x as a variable, so with respect to that. So copy and paste. So it's going to be the derivative of this whole thing with respect to g of f of x times the derivative of g of f of x with respect to f of x, with respect to-- I'll just copy and paste this part, whoops-- with respect to f of x. And I like to write this out. It feels good. It looks like these are rational expressions with differentials. It's really a notation more than to be taken literally. But it feels good, or at least in my mind it's a little bit more intuitive why all of this works out. So with respect to f of x times the derivative of-- and I'm using non-standard notation here, but it helps me really conceptualize this-- times the derivative of f of x with respect to x. Or another way we could write this is G prime of x is equal to h prime of g of f of x, h prime of-- actually, let me do it here-- h prime of this. So copy and paste, h prime of that, times g prime of f of x, times g prime of this. So copy and then paste. So times g prime of that. Put some parentheses there. Times f prime of x. And I like writing it this way, because you notice if these were-- and once again, this is more notation, but it gives a sense of what's going on. If you did view these as fractions, that would cancel with that. That would cancel with that. You're taking the derivative of everything with respect to x, which is exactly what you wanted to do. And let me put some parentheses here so it makes a little bit clearer what's going on. But this thing, in my brain, I like to translate that as, well, that's just h prime of g of f of x. This is g prime of f of x. This is f prime of x. And going from this to try to answer your question, the question that they're asking us actually isn't too bad. So we want to know, what's G prime of 5? So everywhere we see an x, let's change it to a 5. So we're going to say, we need to figure out what G prime of 5 is. G prime of 5 is equal to-- and actually, let me just copy and paste this whole thing. So copy and paste. And so let me, everywhere where I see an x, I'm going to replace it with a 5. So let me get rid of that. Let me get rid of that. And let me get rid of that. And so I have a 5, a 5, and a 5. So what is f of 5? f of 5 is equal to negative 1. So this right over here simplifies to negative 1. This right over here simplifies to negative 1. And what's f prime of negative 5? Well, that's the slope of the tangent line at this point right over here. And we see that the derivative, or the slope, of the tangent line here is 0. So this right over here is going to be equal to 0. Now that's really interesting. So we could keep trying to, well, what's g of negative 1? What's g prime of negative 1? You could see g of negative 1, g of negative 1 we see is negative 1. g prime of negative 1 is the slope here, which is also negative 1. Then we could calculate h prime of these values, et cetera, et cetera. But we don't even have to do that. Because this is the product of three things, and one of these things right over here is a 0. So 0 times anything times anything is going to be equal to 0. Another way of thinking about it is, f of x is isn't changing when x is equal to 5. If f of x isn't changing when x is equal to 5, then the input into the g isn't going to be changing. So the g function isn't going to be-- in the composition g of f of x-- isn't going to be changing. And so h of g of f of x isn't going to be changing. So g of x isn't going to be changing. And so the derivative of capital G of x at x equals 5 is going to be equal to 0.