When to Use the Composite Function/Chain Rule for Derivatives

Ah, the composite function rule/chain rule. (Wikipedia) (Mathematics for Economists).

When would you want to use the composite function/chain rule? (Note: I’m no math expert, so take this all with a grain of salt). Well, if you have a function that’s a function of another function, i.e. a composite function, sometimes the easiest way to find the derivative of the composite function is to use the composite function rule/chain rule.

From Wikipedia:

In mathematics, a composite function, formed by the composition of one function on another, represents the application of the former to the result of the application of the latter to the argument of the composite. The functions f: XY and g: YZ can be composed by first applying f to an argument x and then applying g to the result. Thus one obtains a function g o f: XZ defined by (g o f)(x) = g(f(x)) for all x in X. The notation g o f is read as “g circle f“, or “g composed with f“, “g following f“, or just “g of f“.

It may be helfpul to think about what a function is. Functions are generally formulas that you apply to some input, and which “map” the input to some output. The “value” of the output, the dependent variable, is usually named some variable like y, and the name of the function is usually something like f or g; the input, the independent variable, is usually named some variable like x, inside parentheses next to the name of the function, like f(x). From the http://www.math.csusb.edu/ website:

A function (or map) is a rule or correspondence that associates each element of a set X called the domain with a unique element of another set Y called the codomain. We typically give the rule a name such as a letter like f or g (or any letter of your choice) or a name agreed upon by convention like sine or log or square root.

Now, functions can be very simple, such as y=f(x)=x, in which case the function basically doesn’t do anything but map x back to itself. You can have more complicated functions such as y=f(x)=x^3 + 2x + 5, a polynomial, which does quite a few things to the input x before outputting the output value y.

Functions are interesting because basically anything in a mathematical expression can be called a function. Take y=x^3 + 2x + 5 for example. You could say x^3 is a function which maps x to some variable z, and you could name the function g(x). You could say 2x is a function which maps x to some variable u, and you could name the function h(x). You could even say 5 is a function which maps x to the constant 5 each time and name the function i(x) and the name the constant c. You can write 5 as a function of x here if you want to, c=5 * x^0=5*1=5. So pretty much anything in a math expression can be called a function, even constants.

So what about composition of functions? This is another area where I think you can basically find a function to be a composition of functions whenever you want–but there are only certain circumstances in which it matters enough for you to think about using the composite function rule.

One example of a situation in which you have a noticeable composite function is when instead of a lone x or some other independent variable within the parentheses of the function notation, you have other things going on, such as y=f(5x) instead of just y=f(x). In this case, the 5x within the parentheses is a whole other function, you could name the function g for example, and name the output of the function g(x) a dependent variable such as u, and then you would have u=g(x)=5x. Then since y=f(5x), and 5x=u, y is a function of u, a function of the function g(x), and also a function of x, since u is a function of x. In this case we have the composite function y=f(u)=f(g(x))=f(5x).

Now, here’s how to use the composite function rule/chain rule (see Wikipedia and Mathematics for Economists). To find dy/dx, you can first find dy/du then multiply that times du/dx. What if y=f(x)=u^2 and u=g(x)=5x? Then y=f(u)=f(g(x). By the power rule, dy/du would be 2u. Then, where u=g(x)=5x, du/dx would equal 5. By the composite function rule, the derivative dy/dx = dy/du * du/dx = 2u * 5 = 2*5x *5 =50x. This is why I said that there are some cases in which you want to use the composite function rule and in other cases you won’t need to think about it: in this case it might have been simpler to distribute the power of 2 in the beginning, so if we had y= (5x)^2, then y=25x^2, and using the power rule then dy/dx=50x, which is what we got by using the composite function rule above. So sometimes you can simplify first or figure the problem out without explicitly using the composite function/chain rule, and other times it’s easier to start out by using the composite function/chain rule.

When you are multiplying or dividing terms with the variable you are differentiating with respect to, when you are multiplying different functions (see the above about how just about anything can be called a function), in order to differentiate the resulting function, a function which is a product or quotient of two other functions, you can use the product and quotient rules. Once again, you only need to use these rules when it would be easier than multiplying out or dividing out the functions, or when the functions can’t be simplified any further. For example, if you had y=5x^2 * 3x^3 you might as well just multiply this out and then take the derivative of the result. You could have 5x^2 * 3x^3=15x^5, then use the power rule to get dy/dx=75x^4. or you could use the product rule to get the same result, but it would take more effort. You could even use the product rule on y=f(x)=5x, since 5=5*x^0, and here y =5*x^0 * x, in case you were wondering; there are many functions where there’s no point in using the product rule. But if the functions you start with are complicated enough, it can be simpler and easier to use the product rule to begin with instead of multiplying out the functions then taking the derivative of the product. (See product and quotient rules, Wikipedia and Mathematics for Economists). And to sum up, when the output of one function is the input into another function, then you use the composite function rule/chain rule to find the derivative. (See composite function rule/chain rule, Wikipedia and Mathematics for Economists).

Also see: A Closer Look at the Basics of Functions and Derivatives

One Response

  1. Yep! Sounds pretty right on to me!

Leave a Reply