Derivatives of Combined Functions


Derivatives of Combined Functions

Anna
Hey Michael, you know how we've been talking about derivatives of simple functions? I was thinking about how most real-world models combine those simple functions in various ways. It makes me wonder how we tackle derivatives for those more complex combinations.

Michael
That's a great point, Anna! It's definitely the logical next step. The goal isn't just to memorize formulas, but to genuinely understand where they come from, especially when functions get layered together. It really boils down to three main ways functions combine.

Anna
Right, I remember you mentioning those! Addition, multiplication, and then what you called 'composing' them, which is essentially putting one function inside another. It's interesting how subtraction and division are just variations of those main three, making it simpler in a way.

Michael
Exactly! Subtraction is like multiplying by negative one and adding, and division is composing with one over x and then multiplying. So, if you grasp how derivatives behave with these three fundamental combination types, you can dissect any complex expression step-by-step, no matter how monstrous it looks.

Anna
So the core question is, if we know the derivative of two individual functions, how do we find the derivative of their sum, their product, or their composition? I'm guessing the sum rule is the most straightforward, right?

Michael
You got it! The sum rule is the easiest to state, though it can be a bit of a tongue twister: 'The derivative of a sum of two functions is the sum of their derivatives.' But it’s a good warm-up for the deeper thinking required for products and compositions.

Anna
Let's use an example to visualize it. If we have a function like f(x) = sin(x) + x squared, for any input, we're stacking the values of sin(x) and x squared. So if x is 0.5, we're adding the height of the sine graph and the x squared parabola at that point.

Michael
Precisely. And when we think about the derivative, we're asking how that total sum changes if we nudge x slightly, say to 0.5 + dx. The total change in height, df, will be the change from the sine graph, d(sin x), plus the change from the x squared graph, d(x squared).

Anna
And since we know the derivative of sine is cosine, d(sin x) is approximately cos(x) * dx. Similarly, because the derivative of x squared is 2x, d(x squared) is about 2x * dx. So the total change df is (cos(x) + 2x) * dx.

Michael
Exactly! When you divide df by dx, you get cos(x) + 2x. This shows the derivative of the sum is indeed the sum of the derivatives of its parts. It's intuitive once you visualize it as those tiny changes adding up.

Anna
That makes perfect sense for sums. But you hinted that products are different. I can see why graphs might not be the best for visualizing multiplication. What's a better way to think about it?

Michael
For products, it's often helpful to think in terms of area. Imagine a rectangle where the side lengths are the two functions, say sin(x) and x squared. So, f(x) = sin(x) * x squared would be the area of this adjustable box.

Anna
Okay, I'm picturing it. As x changes, both the width (sin x) and the height (x squared) of this box change. So, the area itself is constantly changing. And we want to find out how that area changes when we make a tiny nudge to x, by dx.

Michael
Exactly. A tiny nudge dx to x causes the width to change by d(sin x) and the height to change by d(x squared). This creates three new snippets of area around the original box. A thin rectangle at the bottom, one on the right, and a tiny corner piece.

Anna
Ah, like when we derived the derivative of x squared! The bottom rectangle's area would be sin(x) * d(x squared). The right rectangle's area would be x squared * d(sin x). And we can ignore that tiny corner piece because its area is proportional to dx squared, which becomes negligible.

Michael
Spot on. So, d(x squared) is about 2x * dx, and d(sin x) is about cos(x) * dx. Plugging those in, and then dividing by dx, we get the derivative of the product: sin(x) * 2x + x squared * cos(x).

Anna
So, it's the first function times the derivative of the second, plus the second function times the derivative of the first. That 'left d right, right d left' mnemonic suddenly makes a lot more sense when you visualize the changing area!

Michael
It clicks, doesn't it? The 'left d right' term is the area of that bottom rectangle, and 'right d left' is the area of the side rectangle. It's a powerful visual. Interestingly, if you multiply by a constant, like 2 * sin(x), the derivative is just 2 * cos(x), much simpler.

Anna
That simpler case makes sense, as the constant just scales the entire change. Now, what about the third type of combination: function composition, where we shove one function inside another? This one always felt a bit more abstract to me.

Michael
It can seem that way, but there's a great visualization for it too. Let's take sin(x squared) as an example. We can use three number lines: one for x, one for x squared (let's call that h), and one for sin(x squared), which is sin(h).

Anna
Okay, so x on the top line, h = x squared on the middle, and sin(h) on the bottom. As we move x, h moves according to x squared, and then sin(h) moves according to the sine function. We want to see how a tiny nudge in x affects the final sin(h).

Michael
Exactly. If we nudge x by dx, it causes a change in h, which we'll call dh. That dh then causes a change in sin(h), which is d(sin h). We know d(sin h) is approximately cos(h) * dh.

Anna
So the change on the bottom line, d(sin h), is cosine of the middle value (h) multiplied by the change in that middle value (dh). And we know that dh, which is d(x squared), is approximately 2x * dx.

Michael
Spot on. So if we substitute h back with x squared, the total change on the third line, d(sin(x squared)), is approximately cos(x squared) * (2x * dx). Divide by dx, and you have the derivative: cos(x squared) * 2x.

Anna
That's the chain rule! The derivative of the outer function (g') evaluated at the inner function (h(x)), multiplied by the derivative of the inner function (h'(x)). So, for sin(x squared), it's cos(x squared) * 2x. That visualization makes it so much clearer.

Michael
It truly does. The symbolic representation, dg/dh * dh/dx, shows how those intermediate changes 'chain' together, and how the dh's effectively cancel out. It's a genuine reflection of how those tiny nudges propagate through the layers of the function.

Anna
So, the sum rule, product rule, and chain rule. These are our three fundamental tools for taking derivatives of complex functions. It's still amazing how something that initially seems like pure memorization can be broken down into such intuitive, visual steps.

Michael
Absolutely. And while understanding where they come from is crucial, true fluency really comes from practice. There's no substitute for working through examples and building that muscle memory. It's about seeing them as natural patterns, not just arbitrary rules.

Ask anything
We've read this whole study set, so questions about it get the best answers.