Skip to main content

Chain Rule Calculator

Free Chain rule Calculator for calculus. Enter values to get step-by-step solutions with formulas and graphs. Get results you can export or share.

Share this calculator

Formula

d/dx[f(g(x))] = f'(g(x)) * g'(x)

The chain rule states that the derivative of a composite function f(g(x)) equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. This rule is essential for differentiating nested or composed functions.

Worked Examples

Example 1: Power of a Polynomial

Problem: Find the derivative of f(x) = (2x^2 + 1)^3 at x = 1 using the chain rule.

Solution: Outer: f(u) = u^3, so f'(u) = 3u^2\nInner: g(x) = 2x^2 + 1, so g'(x) = 4x\ng(1) = 2(1) + 1 = 3\nf'(g(1)) = 3(3)^2 = 27\ng'(1) = 4(1) = 4\nChain rule: dy/dx = 27 * 4 = 108

Result: dy/dx at x = 1 is 108

Example 2: Sine of an Exponential

Problem: Find the derivative of f(x) = sin(e^x) at x = 0.

Solution: Outer: f(u) = sin(u), so f'(u) = cos(u)\nInner: g(x) = e^x, so g'(x) = e^x\ng(0) = e^0 = 1\nf'(g(0)) = cos(1) = 0.5403\ng'(0) = e^0 = 1\nChain rule: dy/dx = 0.5403 * 1 = 0.5403

Result: dy/dx at x = 0 is 0.5403

Frequently Asked Questions

What is the chain rule in calculus?

The chain rule is a fundamental differentiation technique used to find the derivative of a composite function. When you have a function composed of an outer function f and an inner function g, written as f(g(x)), the chain rule states that the derivative equals the derivative of the outer function evaluated at the inner function, multiplied by the derivative of the inner function. In notation, d/dx[f(g(x))] equals f prime of g(x) times g prime of x. This rule is essential because many real-world functions are compositions of simpler functions, and without the chain rule, differentiating them would require expanding and simplifying complex expressions first, which is often impractical or impossible.

Can the chain rule be applied multiple times?

Yes, the chain rule can be applied repeatedly for functions with multiple layers of composition. If you have f(g(h(x))), a three-layer composition, you apply the chain rule twice. The derivative is f prime of g(h(x)) times g prime of h(x) times h prime of x. Each additional layer of composition adds another factor to the product. For example, to differentiate sin(cos(x squared)), you have three layers: the outer sin, the middle cos, and the inner x squared. The derivative is cos(cos(x squared)) times negative sin(x squared) times 2x. This multi-layer application is sometimes called the generalized chain rule and is common in neural network backpropagation algorithms used in machine learning.

What is the Leibniz notation for the chain rule?

In Leibniz notation, the chain rule is written as dy/dx equals dy/du times du/dx, where u represents the inner function. This notation makes the chain rule look like a fraction multiplication where du cancels out, which is a helpful mnemonic even though derivatives are not actually fractions. For example, if y equals u cubed and u equals 2x plus 1, then dy/du equals 3u squared and du/dx equals 2, giving dy/dx equals 3u squared times 2 equals 6(2x plus 1) squared. Leibniz notation extends naturally to multiple compositions: dy/dx equals dy/du times du/dv times dv/dx for three layers. This notation is particularly intuitive for related rates problems and implicit differentiation.

How does the chain rule relate to implicit differentiation?

Implicit differentiation is fundamentally an application of the chain rule. When you have an equation like x squared plus y squared equals 25, where y is implicitly defined as a function of x, differentiating the y terms requires the chain rule because y itself is a function of x. The derivative of y squared with respect to x is 2y times dy/dx, where 2y comes from the power rule and dy/dx comes from the chain rule treating y as the inner function. Without the chain rule, implicit differentiation would not work. This technique is essential for finding derivatives of curves that cannot be expressed as explicit functions, such as circles, ellipses, and other algebraic curves defined by equations in x and y.

What are common mistakes when applying the chain rule?

The most frequent mistake is forgetting to multiply by the derivative of the inner function entirely. For example, differentiating sin(3x) as just cos(3x) instead of 3cos(3x), missing the factor of 3 from the inner derivative. Another common error is applying the chain rule when it is not needed, such as treating the product xy as a composition instead of using the product rule. Students also frequently confuse the order, applying the inner derivative first instead of the outer derivative. With nested compositions, losing track of which layer you are differentiating is common. A useful verification technique is to check your result numerically by computing the difference quotient at a specific point and comparing it to your analytical derivative.

How is the chain rule used in related rates problems?

Related rates problems involve finding how one rate of change relates to another, and the chain rule is the mathematical bridge connecting them. For example, if a balloon radius r is increasing at 2 cm per second, and you want the rate of volume change, the chain rule gives dV/dt equals dV/dr times dr/dt. Since V equals four-thirds pi r cubed, dV/dr equals 4 pi r squared, and dr/dt equals 2, so dV/dt equals 8 pi r squared. The chain rule allows you to relate rates of change of different quantities through their functional relationships. Every related rates problem at its core is a chain rule application, making it one of the most practically important differentiation techniques in physics and engineering.

References