Chain rule for single variable functions: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
</div> | </div> | ||
We can have any number of functions nested within another. The rule still holds and the name comes from the fact that we have a chain of operations, a chain of derivatives. | We can have any number of functions nested within another. The rule still holds and the name comes from the fact that we have a chain of operations, a chain of derivatives. I think that the most common mistake with the chain rule is to derive the nested function twice, like this <math>g'(x)f'(g'(x))</math>. One way to avoid this common mistake is to remember that we have a product of derivatives, not a composition of derivatives. | ||
==Graphical reasoning for the chain rule== | |||
I don't know about textbooks that show a graphical interpretation for the chain rule. Let's consider <math>f(x) = 3x</math> and <math>g(x) = x^2</math>. The graph of the former is a straight line and the constant factor is the angular coefficient, greater meaning a stepper inclination. The latter is a parabola. The first has a constant rate of change, the second does not. | |||
[[file]] | |||
The graph of <math>g(f(x)) = (3x)^2</math> has a greater rate of change than the graph of <math>g(x) = x^2</math>. Think about this: if we choose <math>x = 2</math> the rates of change are, at that point and for each function, <math>f'(2) = 6</math> and <math>g'(2) = 4</math>. For the composite function we have <math>g'(f(x)) = f'(2)g'(f(2)) = 6 \cdot 2 \cdot 3 = 36</math>. I did this simple example with positive numbers but the chain rule holds for negative numbers and for more complicated functions. | |||
'''Note:''' in this specific case we could have used the product rule. This only happened because the example was a composition of two polynomial functions. |
Revision as of 02:22, 13 March 2022
The chain rule is, intuitively, a product of two derivatives. Suppose that we have a person walking at a speed of 1 m/s. Now suppose we have a train moving at 20 m/s in the same direction as the person. The train is obviously 20x faster than the walking person, if we are measuring in respect to the static ground. Now imagine that the person is walking at 1 m/s while inside the train moving at 20 m/s. What's the speed of the person? We have a physics problem here, because it really depends on whether we want the speed in respect to the ground or to the train.
From the point of view of mathematics we have a composite function to describe the previously mentioned motion. Because the speed of the person is a ratio space / time and for each unit of it, it compounds with the motion of the train. In other words, we have a product of ratios. That's precisely the idea of the chain rule when written with the Leibniz's notation:
[math]\displaystyle{ \frac{dy}{dx} = \frac{dy}{du} \frac{du}{dx} }[/math]
The definition of a function states that we have one variable that depends upon another. In the case of composite functions, the value of one function depends on the value of the other function. Extending it to rates of change and the rate of change of one function depends on the rate of change of the other function. That's why we have that [math]\displaystyle{ h(x) = f(g(x)) }[/math]:
[math]\displaystyle{ h'(x) = g'(x) \cdot f'(g(x)) }[/math]
We can have any number of functions nested within another. The rule still holds and the name comes from the fact that we have a chain of operations, a chain of derivatives. I think that the most common mistake with the chain rule is to derive the nested function twice, like this [math]\displaystyle{ g'(x)f'(g'(x)) }[/math]. One way to avoid this common mistake is to remember that we have a product of derivatives, not a composition of derivatives.
Graphical reasoning for the chain rule
I don't know about textbooks that show a graphical interpretation for the chain rule. Let's consider [math]\displaystyle{ f(x) = 3x }[/math] and [math]\displaystyle{ g(x) = x^2 }[/math]. The graph of the former is a straight line and the constant factor is the angular coefficient, greater meaning a stepper inclination. The latter is a parabola. The first has a constant rate of change, the second does not.
The graph of [math]\displaystyle{ g(f(x)) = (3x)^2 }[/math] has a greater rate of change than the graph of [math]\displaystyle{ g(x) = x^2 }[/math]. Think about this: if we choose [math]\displaystyle{ x = 2 }[/math] the rates of change are, at that point and for each function, [math]\displaystyle{ f'(2) = 6 }[/math] and [math]\displaystyle{ g'(2) = 4 }[/math]. For the composite function we have [math]\displaystyle{ g'(f(x)) = f'(2)g'(f(2)) = 6 \cdot 2 \cdot 3 = 36 }[/math]. I did this simple example with positive numbers but the chain rule holds for negative numbers and for more complicated functions.
Note: in this specific case we could have used the product rule. This only happened because the example was a composition of two polynomial functions.