What is the chain rule in differentiation?

The chain rule is a fundamental concept in Calculus used to differentiate composite functions Composite functions are functions that result from applying one function to the output of another function.. It allows us to find the derivative of a function composed of two or more functions. By understanding the chain rule, we can efficiently analyze and differentiate complex expressions, enabling us to solve a wide range of problems in calculus and beyond.

The chain rule finds extensive application in the fields of deep learning, machine learning, and Artificial Intelligence. It is commonly used to handle regression problems and helps in the process of backward propagation in neural networks.

Rules of differentiation
Rules of differentiation

You can see here for more details of other differentiation rules.

Chain rule mathematically

The chain rule states that the derivative of a composite function y=f(g(x))y=f(g(x)) is equal to the derivative of the outer function ff with respect to its inner variable u=g(x)u=g(x), multiplied by the derivative of the inner function gg with respect to xx. It allows us to find the rate of change of a composite function by breaking it down into simpler parts and differentiating each part separately.

Examples of the chain rule

Let's apply the chain rule to find the derivative of a composite function.

Example 1

Question: Consider the function f(x)=sin(3x2+2x)f(x) = \sin(3x^2 + 2x). Find dfdx\frac{{df}}{{dx}} using the chain rule.

Answer: To use the chain rule, we treat sin(3x2+2x)\sin(3x^2 + 2x) as the outer function ff, and the expression (3x2+2x)( 3x^2 + 2x ) as the inner functionuu.

Find the derivative of the outer function f(u)f(u) with respect to uu:

Next, find the derivative of the inner function u(x)u(x) with respect to xx :

Now, apply the chain rule formula:

So, the derivative of f(x)=sin(3x2+2x)f(x) = \sin(3x^2 + 2x) with respect to xx is dfdx=cos(3x2+2x)(6x+2)\frac{{df}}{{dx}} = \cos(3x^2 + 2x) \cdot (6x + 2)

Example 2

Question: Consider the function f(x)=e2x3+x2f(x) = e^{2x^3 + x^2}. Find dfdx\frac{{df}}{{dx}} using the chain rule.

Answer: To use the chain rule, we treat e2x3+x2 e^{2x^3 + x^2} as the outer function ff), and the expression 2x3+x2 2x^3 + x^2 as the inner function u u .

Find the derivative of the outer function f(u)f(u) with respect to uu:

Next, find the derivative of the inner function u(x)u(x) with respect to xx :

Now, apply the chain rule formula:

So, the derivative of f(x)=e2x3+x2f(x) = e^{2x^3 + x^2} with respect to x x is dfdx=e2x3+x2(6x2+2x) \frac{{df}}{{dx}} = e^{2x^3 + x^2} \cdot (6x^2 + 2x) .

Quiz

Now that you know the chain rule in differentiation, you can challenge yourself with a quiz.

Chain rule in differentiation

Q

Differentiation the function f(x)=2x3+xf(x)= \sqrt{2x^{3}+x}

A)

f(x)=6x2+122x3+xf'(x) = \frac{{6x^2 + 1}}{{2\sqrt{2x^3 + x}}}

B)

f(x)=6x2+1f'(x) = \sqrt{6x^{2}+1}

C)

f(x)=6x2+12x3+xf'(x) = \frac{6x^{2}+1}{\sqrt{2x^3 + x}}

Applications

The chain rule holds significance in calculus and diverse mathematical domains for multiple reasons. Here are a few of its applications:

  • Calculating rate of change: The chain rule is essential for determining how a change in one variable affects the overall function. It helps us understand the rate of change of the composite function with respect to the underlying variables.

  • Backpropagation in machine learning: In deep learning and neural networks, the chain rule plays a crucial role in backpropagation, which is a key algorithm for training the models. It helps compute the gradients needed to update the model's parameters during the learning process.

  • Handling complex functions: The chain rule allows us to break down complex functions into their constituent parts and calculate their derivatives separately.

Conclusion

The chain rule is a powerful tool in Calculus, allowing us to differentiate composite functions efficiently. Its application simplifies complex problems, providing a fundamental framework for understanding rates of change in interconnected systems.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved